From 17e272555291e67c238ddf030ced72187ca03c15 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Mon, 11 Jan 2016 12:50:04 +0100 Subject: [PATCH 4/6] IPA: log real hbac function The string "hbac" wsa logged previously. Real hbac function will be logged with this patch. --- src/providers/ipa/hbac_evaluator.c | 3 ++- src/providers/ipa/ipa_access.c | 3 ++- src/providers/ipa/ipa_hbac.h | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/providers/ipa/hbac_evaluator.c b/src/providers/ipa/hbac_evaluator.c index a4973045db522b981165fadb920aa1eee462906f..026502f31567b037e86d7db9da974e330b0d0ba1 100644 --- a/src/providers/ipa/hbac_evaluator.c +++ b/src/providers/ipa/hbac_evaluator.c @@ -43,7 +43,8 @@ typedef int errno_t; /* debug macro */ #define HBAC_DEBUG(level, format, ...) do { \ if (hbac_debug_fn != NULL) { \ - hbac_debug_fn(__FILE__, __LINE__, level, format, ##__VA_ARGS__); \ + hbac_debug_fn(__FILE__, __LINE__, __FUNCTION__, \ + level, format, ##__VA_ARGS__); \ } \ } while (0) diff --git a/src/providers/ipa/ipa_access.c b/src/providers/ipa/ipa_access.c index ae4c5a9f186ba217e136f63199cdc21aab3f451c..ad12f21fc36e52a2e8d7affcfc7128f018c50e4c 100644 --- a/src/providers/ipa/ipa_access.c +++ b/src/providers/ipa/ipa_access.c @@ -37,6 +37,7 @@ /* External logging function for HBAC. */ void hbac_debug_messages(const char *file, int line, + const char *function, enum hbac_debug_level level, const char *fmt, ...) { @@ -67,7 +68,7 @@ void hbac_debug_messages(const char *file, int line, va_list ap; va_start(ap, fmt); - sss_vdebug_fn(file, line, "hbac", loglevel, fmt, ap); + sss_vdebug_fn(file, line, function, loglevel, fmt, ap); va_end(ap); } } diff --git a/src/providers/ipa/ipa_hbac.h b/src/providers/ipa/ipa_hbac.h index 9e85890e78c5cf0cda759f6132ab09290e637c1d..09da919e63adfb471b45e1b775f52aae5bb2eef9 100644 --- a/src/providers/ipa/ipa_hbac.h +++ b/src/providers/ipa/ipa_hbac.h @@ -54,6 +54,7 @@ enum hbac_debug_level { * Function pointer to HBAC external debugging function. */ typedef void (*hbac_debug_fn_t)(const char *file, int line, + const char *function, enum hbac_debug_level, const char *format, ...); -- 2.5.0