diff options
Diffstat (limited to 'modules/pam_limits/pam_limits.c')
-rw-r--r-- | modules/pam_limits/pam_limits.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/pam_limits/pam_limits.c b/modules/pam_limits/pam_limits.c index bf6f09df..b7ed0adc 100644 --- a/modules/pam_limits/pam_limits.c +++ b/modules/pam_limits/pam_limits.c @@ -401,7 +401,9 @@ process_limit (const pam_handle_t *pamh, int source, const char *lim_type, case RLIMIT_NICE: if (int_value > 19) int_value = 19; - rlimit_value = 19 - int_value; + if (int_value < -20) + int_value = -20; + rlimit_value = 20 - int_value; #endif break; } |