]> granicus.if.org Git - sudo/commitdiff
Sprinkle a few more debugging printfs.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 1 Sep 2017 15:22:31 +0000 (09:22 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 1 Sep 2017 15:22:31 +0000 (09:22 -0600)
plugins/sudoers/check.c
plugins/sudoers/defaults.c

index 67cd7bf3b66e1cbfdac41128a1d12341cd4f77ad..28ec7b952ebcd2f98e76c62aee9818b7d561907a 100644 (file)
@@ -127,6 +127,8 @@ check_user_interactive(int validated, int mode, struct passwd *auth_pw)
            ret = true;
            break;
        }
+       sudo_debug_printf(SUDO_DEBUG_INFO,
+           "%s: check user flag overrides time stamp", __func__);
        /* FALLTHROUGH */
 
     default:
@@ -192,6 +194,9 @@ check_user(int validated, int mode)
      * If the user is not changing uid/gid, no need for a password.
      */
     if (!def_authenticate || user_is_exempt()) {
+       sudo_debug_printf(SUDO_DEBUG_INFO, "%s: %s", __func__,
+           !def_authenticate ? "authentication disabled" :
+           "user exempt from authentication");
        ret = true;
        goto done;
     }
@@ -204,6 +209,8 @@ check_user(int validated, int mode)
        if (runas_privs == NULL && runas_limitprivs == NULL)
 #endif
        {
+           sudo_debug_printf(SUDO_DEBUG_INFO,
+               "%s: user running command as self", __func__);
            ret = true;
            goto done;
        }
index ab2e7cfd3e3422f592d552d242b2ace2a52978d9..39115007ac9253eabec2c02aa109c1f0152c4019 100644 (file)
@@ -238,6 +238,9 @@ parse_default_entry(struct sudo_defs_types *def, const char *val, int op,
     int rc;
     debug_decl(parse_default_entry, SUDOERS_DEBUG_DEFAULTS)
 
+    sudo_debug_printf(SUDO_DEBUG_INFO, "%s: %s:%d %s=%s op=%d",
+       __func__, file, lineno, def->name, val ? val : "", op);
+
     /*
      * If no value specified, the boolean flag must be set for non-flags.
      * Only flags and tuples support boolean "true".