From 4e2c4cdcd62c4ab1d5e884e8afaa0bbe1b981e42 Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Tue, 7 Dec 1999 02:32:22 +0100 Subject: Imported Debian patch 8.9.3-3slink1 --- src/main.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index cea9d15..d1c7186 100644 --- a/src/main.c +++ b/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; -- cgit v1.2.3