Re: Limit user actions in .procmailrc
Andrew Edelstein <[email protected]> Wed, 20 May 2015 12:20:15 -0500
| Newsgroups | gmane.mail.procmail |
|---|---|
| Message-ID | <[email protected]> |
On May 20, 2015, at 11:46 AM, Alan Clifford <[email protected]> wrote: >> From man procmailrc > > "DROPPRIVS If set to `yes' procmail will drop all privileges it might have had (suid or sgid). This is only useful if you want to guarantee that the bottom half of the /etc/procmailrc file is executed on behalf of the recipient." > > My understanding is that as soon as the recipes in /etc/procmailrc have been done and the program moves on to the the user's ~/.procmailrc, any privileges are automatically dropped. Exactly. This is so procmail doesn’t execute ~/.procmailrc (which, generally, the user can edit) with root privileges. Since a user could execute arbitrary commands, they could trigger a root exploit (`cp /bin/sh ~/bin/sh && chmod 4775 ~/bin/sh` anyone?)