diff options
-rw-r--r-- | usr.sbin/smtpd/smtpctl.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/smtpctl.c b/usr.sbin/smtpd/smtpctl.c index e652986bb3a..756236d4e1e 100644 --- a/usr.sbin/smtpd/smtpctl.c +++ b/usr.sbin/smtpd/smtpctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtpctl.c,v 1.32 2009/08/08 00:16:49 gilles Exp $ */ +/* $OpenBSD: smtpctl.c,v 1.33 2009/08/08 19:16:41 ian Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -96,7 +96,12 @@ main(int argc, char *argv[]) /* parse options */ if (strcmp(__progname, "sendmail") == 0 || strcmp(__progname, "send-mail") == 0) sendmail = 1; - else if (strcmp(__progname, "smtpctl") == 0) { + else if (strcmp(__progname, "mailq") == 0) { + if (geteuid()) + errx(1, "need root privileges"); + show_queue(PATH_QUEUE, 0); + return 0; + } else if (strcmp(__progname, "smtpctl") == 0) { /* check for root privileges */ if (geteuid()) errx(1, "need root privileges"); |