diff options
author | Thorsten Kukuk <kukuk@thkukuk.de> | 2005-06-07 07:41:23 +0000 |
---|---|---|
committer | Thorsten Kukuk <kukuk@thkukuk.de> | 2005-06-07 07:41:23 +0000 |
commit | fa433b9e2fa1a00e13df36a8b709ffda9e3e715b (patch) | |
tree | b039e9ebc37c01d2f60d06b24d990a1c84b82045 /modules/pam_limits/pam_limits.c | |
parent | 346893dbef4b4697e3efbffd05d9de94d93263c3 (diff) | |
download | pam-fa433b9e2fa1a00e13df36a8b709ffda9e3e715b.tar.gz pam-fa433b9e2fa1a00e13df36a8b709ffda9e3e715b.tar.bz2 pam-fa433b9e2fa1a00e13df36a8b709ffda9e3e715b.zip |
Relevant BUGIDs: Novell #81690
Purpose of commit: bugfix
Commit summary:
---------------
If the process priority is not specified in the limits.conf file,
pam_limits should not reset the current one to zero.
Diffstat (limited to 'modules/pam_limits/pam_limits.c')
-rw-r--r-- | modules/pam_limits/pam_limits.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/pam_limits/pam_limits.c b/modules/pam_limits/pam_limits.c index f7b228b8..eec3917a 100644 --- a/modules/pam_limits/pam_limits.c +++ b/modules/pam_limits/pam_limits.c @@ -248,7 +248,10 @@ static int init_limits(struct pam_limit_s *pl) } } - pl->priority = 0; + errno = 0; + pl->priority = getpriority (PRIO_PROCESS, 0); + if (pl->priority == -1 && errno != 0) + retval = !PAM_SUCCESS; pl->login_limit = -2; pl->login_limit_def = LIMITS_DEF_NONE; |