diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1999-11-24 19:27:18 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1999-11-24 19:27:18 +0000 |
commit | dd3fb3473fec908b6e655a7105db7198b435a324 (patch) | |
tree | d05ab1f02e3e5b99537479ba09641885363e6be6 /usr.sbin | |
parent | 5ec5aac162474636cfe286c34e1499603e6d7b3b (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.c | 12 |
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; |