summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2014-07-11 17:53:59 +0200
committerJakub Hrozek <jhrozek@redhat.com>2014-07-11 17:54:50 +0200
commit2228001f0025ab7229b79fdf14718e1428e34007 (patch)
treebe312791a338f86e327a8f646fd25994f2a2009a
parentc6291e9989994c56ab1ac5b88a6863388783458e (diff)
downloadsssd-rhel6.5.tar.gz
sssd-rhel6.5.tar.xz
sssd-rhel6.5.zip
SIMPLE: Some extra debuggingrhel6.5
-rw-r--r--src/providers/simple/simple_access_check.c6
-rw-r--r--src/util/sss_utf8.c2
2 files changed, 8 insertions, 0 deletions
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;
}