Do not set a resource limit to zero when we are unable to fetch a
value from /etc/security/limits.
This commit is contained in:
@@ -108,8 +108,9 @@ aix_setlimits(char *user)
|
||||
else
|
||||
rlim.rlim_cur = rlim.rlim_max; /* soft not specd, use hard */
|
||||
} else {
|
||||
/* No hard limit set, try soft limit. */
|
||||
if (aix_getlimit(user, aix_limits[n].soft, &val) == 0)
|
||||
/* No hard limit set, try soft limit, if it exists. */
|
||||
if (aix_getlimit(user, aix_limits[n].soft, &val) == -1)
|
||||
continue;
|
||||
rlim.rlim_cur = val == -1 ? RLIM64_INFINITY : val * aix_limits[n].factor;
|
||||
|
||||
/* Set hard limit per AIX /etc/security/limits documentation. */
|
||||
|
Reference in New Issue
Block a user