From 2228001f0025ab7229b79fdf14718e1428e34007 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Fri, 11 Jul 2014 17:53:59 +0200 Subject: SIMPLE: Some extra debugging --- src/providers/simple/simple_access_check.c | 6 ++++++ src/util/sss_utf8.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/providers/simple/simple_access_check.c b/src/providers/simple/simple_access_check.c index d490328b0..20dab784e 100644 --- a/src/providers/simple/simple_access_check.c +++ b/src/providers/simple/simple_access_check.c @@ -50,6 +50,9 @@ simple_check_users(struct simple_ctx *ctx, const char *username, /* First, check whether the user is in the allowed users list */ if (ctx->allow_users != NULL) { for(i = 0; ctx->allow_users[i] != NULL; i++) { + DEBUG(SSSDBG_TRACE_INTERNAL, + ("Comparing [%s] to [%s]\n", username, ctx->allow_users[i])); + if (sss_string_equal(cs, username, ctx->allow_users[i])) { DEBUG(SSSDBG_TRACE_LIBS, ("User [%s] found in allow list, access granted.\n", @@ -74,6 +77,9 @@ simple_check_users(struct simple_ctx *ctx, const char *username, /* Next check whether this user has been specifically denied */ if (ctx->deny_users != NULL) { for(i = 0; ctx->deny_users[i] != NULL; i++) { + DEBUG(SSSDBG_TRACE_INTERNAL, + ("Comparing [%s] to [%s]\n", username, ctx->deny_users[i])); + if (sss_string_equal(cs, username, ctx->deny_users[i])) { DEBUG(SSSDBG_TRACE_LIBS, ("User [%s] found in deny list, access denied.\n", diff --git a/src/util/sss_utf8.c b/src/util/sss_utf8.c index 27c5cb60a..fd0bfb654 100644 --- a/src/util/sss_utf8.c +++ b/src/util/sss_utf8.c @@ -175,8 +175,10 @@ errno_t sss_utf8_case_eq(const uint8_t *s1, const uint8_t *s2) bool sss_string_equal(bool cs, const char *s1, const char *s2) { if (cs) { + DEBUG(SSSDBG_TRACE_ALL, ("Case-sensitive comparison of [%s] and [%s]\n", s1, s2)); return strcmp(s1, s2) == 0; } + DEBUG(SSSDBG_TRACE_ALL, ("Case-insensitive comparison of [%s] and [%s]\n", s1, s2)); return sss_utf8_case_eq((const uint8_t *)s1, (const uint8_t *)s2) == EOK; } -- cgit