summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1999-11-24 19:27:18 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1999-11-24 19:27:18 +0000
commitdd3fb3473fec908b6e655a7105db7198b435a324 (patch)
treed05ab1f02e3e5b99537479ba09641885363e6be6 /usr.sbin
parent5ec5aac162474636cfe286c34e1499603e6d7b3b (diff)
Limit newaliases to root and trusted users; sendmail+gshapiro@sendmail.orG
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/sendmail/src/main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/usr.sbin/sendmail/src/main.c b/usr.sbin/sendmail/src/main.c
index cea9d158d71..cb6fd57e44c 100644
--- a/usr.sbin/sendmail/src/main.c
+++ b/usr.sbin/sendmail/src/main.c
@@ -984,6 +984,18 @@ main(argc, argv, envp)
usrerr("Permission denied");
finis(FALSE, EX_USAGE);
}
+ if (OpMode == MD_INITALIAS &&
+ RealUid != 0 &&
+ RealUid != TrustedUid &&
+ !wordinclass(RealUserName, 't'))
+ {
+ if (LogLevel > 1)
+ sm_syslog(LOG_ALERT, NOQID,
+ "user %d attempted to rebuild the alias map",
+ RealUid);
+ usrerr("Permission denied");
+ finis(FALSE, EX_USAGE);
+ }
if (MeToo)
BlankEnvelope.e_flags |= EF_METOO;