]> granicus.if.org Git - sudo/commitdiff
add FLAG_NO_CHECK
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 26 Aug 1999 09:06:41 +0000 (09:06 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 26 Aug 1999 09:06:41 +0000 (09:06 +0000)
logging.c
parse.c
sudo.h

index bf8743c28b1bd11cf75d958f3249c18bf2fe5928..abb7ad5aacb391a6456eef3440387923c8775f00 100644 (file)
--- a/logging.c
+++ b/logging.c
@@ -298,6 +298,9 @@ log_auth(status, inform_user)
        else if (status & FLAG_NO_HOST)
            (void) fprintf(stderr, "%s is not allowed to run sudo on %s.  %s",
                user_name, user_shost, "This incident will be reported.\n");
+       else if (status & FLAG_NO_CHECK)
+           (void) fprintf(stderr, "Sorry, user %s may not run sudo on %s.\n",
+               user_name, user_shost);
        else
            (void) fprintf(stderr,
                "Sorry, user %s is not allowed to execute '%s%s%s' as %s on %s.\n",
diff --git a/parse.c b/parse.c
index eae5dcd141f2329a072ac8cad43d75b2a689d75a..95cc0bcc50282008fad90d02ed15a73476afe639 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -147,7 +147,8 @@ sudoers_lookup(check_cmnd)
        error |= FLAG_NO_HOST;
        if (!top)
            error |= FLAG_NO_USER;
-    }
+    } else
+       error |= FLAG_NO_CHECK;
 
     /*
      * Only check the actual command if the check_cmnd flag is set.
diff --git a/sudo.h b/sudo.h
index 0d5a6a0a081e9094ef22522583f0b9256408143b..062d45d4d7b81ddc318f6119abd33e492ab1ccc9 100644 (file)
--- a/sudo.h
+++ b/sudo.h
@@ -68,6 +68,7 @@ struct sudo_user {
 #define FLAG_NOPASS            0x10
 #define FLAG_NO_USER           0x20
 #define FLAG_NO_HOST           0x40
+#define FLAG_NO_CHECK          0x80
 
 /*
  * Boolean values