add restrictqrun privacy option
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Mon, 23 Aug 1993 08:07:55 +0000 (00:07 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Mon, 23 Aug 1993 08:07:55 +0000 (00:07 -0800)
SCCS-vsn: usr.sbin/sendmail/src/main.c 8.25
SCCS-vsn: usr.sbin/sendmail/src/queue.c 8.14
SCCS-vsn: usr.sbin/sendmail/src/conf.c 8.25

usr/src/usr.sbin/sendmail/src/conf.c
usr/src/usr.sbin/sendmail/src/main.c
usr/src/usr.sbin/sendmail/src/queue.c

index 9ed0b30..30555de 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)conf.c     8.24 (Berkeley) %G%";
+static char sccsid[] = "@(#)conf.c     8.25 (Berkeley) %G%";
 #endif /* not lint */
 
 # include "sendmail.h"
 #endif /* not lint */
 
 # include "sendmail.h"
@@ -118,7 +118,8 @@ struct prival PrivacyValues[] =
        "needvrfyhelo",         PRIV_NEEDVRFYHELO,
        "noexpn",               PRIV_NOEXPN,
        "novrfy",               PRIV_NOVRFY,
        "needvrfyhelo",         PRIV_NEEDVRFYHELO,
        "noexpn",               PRIV_NOEXPN,
        "novrfy",               PRIV_NOVRFY,
-       "restrictmailq",        PRIV_RESTRMAILQ,
+       "restrictmailq",        PRIV_RESTRICTMAILQ,
+       "restrictqrun",         PRIV_RESTRICTQRUN,
        "authwarnings",         PRIV_AUTHWARNINGS,
        "goaway",               PRIV_GOAWAY,
        NULL,                   0,
        "authwarnings",         PRIV_AUTHWARNINGS,
        "goaway",               PRIV_GOAWAY,
        NULL,                   0,
index 9a058cf..71c6e02 100644 (file)
@@ -13,7 +13,7 @@ static char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)main.c     8.24 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c     8.25 (Berkeley) %G%";
 #endif /* not lint */
 
 #define        _DEFINE
 #endif /* not lint */
 
 #define        _DEFINE
@@ -622,7 +622,7 @@ main(argc, argv, envp)
                BlankEnvelope.e_flags |= EF_METOO;
 
 # ifdef QUEUE
                BlankEnvelope.e_flags |= EF_METOO;
 
 # ifdef QUEUE
-       if (queuemode && RealUid != 0)
+       if (queuemode && RealUid != 0 && bitset(PRIV_RESTRICTQRUN, PrivacyFlags))
        {
                struct stat stbuf;
 
        {
                struct stat stbuf;
 
@@ -632,7 +632,7 @@ main(argc, argv, envp)
                if (stbuf.st_uid != RealUid)
                {
                        /* nope, really a botch */
                if (stbuf.st_uid != RealUid)
                {
                        /* nope, really a botch */
-                       usrerr("Permission denied");
+                       usrerr("You do not have permission to process the queue");
                        exit (EX_NOPERM);
                }
        }
                        exit (EX_NOPERM);
                }
        }
index dd3c426..f1d5094 100644 (file)
@@ -10,9 +10,9 @@
 
 #ifndef lint
 #ifdef QUEUE
 
 #ifndef lint
 #ifdef QUEUE
-static char sccsid[] = "@(#)queue.c    8.13 (Berkeley) %G% (with queueing)";
+static char sccsid[] = "@(#)queue.c    8.14 (Berkeley) %G% (with queueing)";
 #else
 #else
-static char sccsid[] = "@(#)queue.c    8.13 (Berkeley) %G% (without queueing)";
+static char sccsid[] = "@(#)queue.c    8.14 (Berkeley) %G% (without queueing)";
 #endif
 #endif /* not lint */
 
 #endif
 #endif /* not lint */
 
@@ -1140,7 +1140,7 @@ printqueue()
        **  Check for permission to print the queue
        */
 
        **  Check for permission to print the queue
        */
 
-       if (bitset(PRIV_RESTRMAILQ, PrivacyFlags) && RealUid != 0)
+       if (bitset(PRIV_RESTRICTMAILQ, PrivacyFlags) && RealUid != 0)
        {
                struct stat st;
 # ifdef NGROUPS
        {
                struct stat st;
 # ifdef NGROUPS