summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2013-10-01 13:46:11 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-10-01 21:14:42 +0200
commit55fdd0d28e7c88f333ad78183b0ba37a1da34160 (patch)
treeeccb455dc1abe7af9cf3fe79bfb7429d777afe18 /src
parentd1f3610aefcb634f212d4c099fac102b3e4dee59 (diff)
downloadsssd-55fdd0d28e7c88f333ad78183b0ba37a1da34160.tar.gz
sssd-55fdd0d28e7c88f333ad78183b0ba37a1da34160.tar.bz2
sssd-55fdd0d28e7c88f333ad78183b0ba37a1da34160.zip
sudo: improve time restrictions debug messages
Diffstat (limited to 'src')
-rw-r--r--src/db/sysdb_sudo.c8
-rw-r--r--src/responder/sudo/sudosrv_cmd.c7
2 files changed, 15 insertions, 0 deletions
diff --git a/src/db/sysdb_sudo.c b/src/db/sysdb_sudo.c
index 65481f13..d7d7fe0b 100644
--- a/src/db/sysdb_sudo.c
+++ b/src/db/sysdb_sudo.c
@@ -154,6 +154,14 @@ static errno_t sysdb_sudo_check_time(struct sysdb_attrs *rule,
*result = true;
}
+ if (result) {
+ DEBUG(SSSDBG_TRACE_ALL, ("Rule [%s] matches time restrictions\n",
+ name));
+ } else {
+ DEBUG(SSSDBG_TRACE_ALL, ("Rule [%s] does not match time "
+ "restrictions\n", name));
+ }
+
ret = EOK;
done:
talloc_free(tmp_ctx);
diff --git a/src/responder/sudo/sudosrv_cmd.c b/src/responder/sudo/sudosrv_cmd.c
index ee25b53d..8f07e8b3 100644
--- a/src/responder/sudo/sudosrv_cmd.c
+++ b/src/responder/sudo/sudosrv_cmd.c
@@ -108,12 +108,19 @@ errno_t sudosrv_cmd_done(struct sudo_cmd_ctx *cmd_ctx, int ret)
*/
if (cmd_ctx->sudo_ctx->timed) {
/* filter rules by time */
+
+ DEBUG(SSSDBG_TRACE_FUNC, ("Applying time restrictions on"
+ "%u rules\n", cmd_ctx->num_rules));
+
ret = sysdb_sudo_filter_rules_by_time(cmd_ctx, cmd_ctx->num_rules,
cmd_ctx->rules, 0,
&num_rules, &rules);
if (ret != EOK) {
return EFAULT;
}
+
+ DEBUG(SSSDBG_TRACE_FUNC, ("Got %u rules after time filter\n",
+ num_rules));
}
/* send result */