]> granicus.if.org Git - sudo/commitdiff
added NO_MESSAGE
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 29 Aug 1996 20:56:11 +0000 (20:56 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 29 Aug 1996 20:56:11 +0000 (20:56 +0000)
OPTIONS
check.c
options.h

diff --git a/OPTIONS b/OPTIONS
index e8b0cd2274eaa1cc089ceacb4d05ac01632c3125..76057a1b309569a116ffe52a5e0a87aa5e2c7a08 100644 (file)
--- a/OPTIONS
+++ b/OPTIONS
@@ -76,6 +76,11 @@ SHORT_MESSAGE
     sudo for the first time on a machine.
     This is on by default.
 
+NO_MESSAGE
+    Omits the "lecture" one gets when running sudo for the first time
+    on a machine.
+    This is off by default.
+
 TIMEOUT
     Number of minutes that can elapse before sudo will ask for a passwd again.
     The default is 5, set this to 0 to always prompt for a password.
diff --git a/check.c b/check.c
index 5d98e0833451900191cd6fbf967eb52901608c97..024ff5794772725dc212474192ca44f6f5a4275d 100644 (file)
--- a/check.c
+++ b/check.c
@@ -151,8 +151,10 @@ void check_user()
 
     rtn = check_timestamp();
     if (rtn && user_uid) {     /* if timestamp is not current... */
+#ifndef NO_MESSAGE
        if (rtn == 2)
            reminder();         /* do the reminder if ticket file is new */
+#endif /* NO_MESSAGE */
        check_passwd();
     }
 
@@ -731,6 +733,7 @@ static char *sudo_skeyprompt(user_skey, p)
 #endif /* HAVE_SKEY */
 
 
+#ifndef NO_MESSAGE
 /********************************************************************
  *
  *  reminder()
@@ -757,3 +760,4 @@ static void reminder()
     
     (void) fflush(stderr);
 }
+#endif /* NO_MESSAGE */
index 6a14454fece5e42000f48887d9a1c903d94f178c..fdebcec7b0f3c00d0e0b533eaab0b3c7116b67de 100644 (file)
--- a/options.h
+++ b/options.h
@@ -42,6 +42,7 @@
 /*#define EXEMPTGROUP "sudo"   /* no passwd needed for users in this group */
 /*#define ENV_EDITOR           /* visudo honors EDITOR and VISUAL envars */
 #define SHORT_MESSAGE          /* short sudo message, no copyright printed */
+/*#define NO_MESSAGE           /* no sudo "lecture" message */
 #define TIMEOUT 5              /* minutes before sudo asks for passwd again */
 #define PASSWORD_TIMEOUT 5     /* passwd prompt timeout (in minutes) */
 #define TRIES_FOR_PASSWORD 3   /* number of tries to enter passwd correctly */