If compiled without PAM support, enforce the limits from /etc/limits when

one of the -, -l, or --login options is set, even if called by root.
Thanks to Justin Bronder.
This commit is contained in:
nekral-guest 2007-10-12 22:36:26 +00:00
parent 756b6812a6
commit e3f303fdb5
3 changed files with 13 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2007-10-13 Nicolas François <nicolas.francois@centraliens.net>
* NEWS, src/su.c: If compiled without PAM support, enforce the
limits from /etc/limits when one of the -, -l, or --login options
is set, even if called by root. Thanks to Justin Bronder.
2007-10-07 Nicolas François <nicolas.francois@centraliens.net>
* NEWS, Changelog: Convert the Changelog and NEWS files to UTF-8

5
NEWS
View File

@ -1,6 +1,6 @@
$Id: NEWS,v 1.492 2007/02/01 20:49:25 kloczek Exp $
shadow-4.0.18.1 -> shadow-4.0.18.2 09-08-2006
shadow-4.0.18.1 -> shadow-4.0.18.2 13-10-2007
*** general:
- usermod: fixed handle -a option (by Benno Schulenberg
@ -9,6 +9,9 @@ shadow-4.0.18.1 -> shadow-4.0.18.2 09-08-2006
(https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=211659),
- groupadd, groupdel, groupmod, useradd, userdel, usermod: flush nscd cashes
after close /etc/{group,passwd} files,
- su: If compiled without PAM support, enforce the limits from /etc/limits
when one of the -, -l, or --login options is set, even if called by root.
*** documentation:
- updated translations: ja, nl, tl.
- groupadd.8, groupmod.8, login.1, useradd.8, userdel.8, usermod.8: grammar
mistakes and other correctstions (by Schulenberg <bensberg@justemail.net>),

View File

@ -791,7 +791,8 @@ int main (int argc, char **argv)
#else /* !USE_PAM */
environ = newenvp; /* make new environment active */
if (!amroot) /* no limits if su from root */
/* no limits if su from root (unless su must fake login's behavior) */
if (!amroot || fakelogin)
setup_limits (&pwent);
if (setup_uid_gid (&pwent, is_console))