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
|
else
|
||||||
rlim.rlim_cur = rlim.rlim_max; /* soft not specd, use hard */
|
rlim.rlim_cur = rlim.rlim_max; /* soft not specd, use hard */
|
||||||
} else {
|
} else {
|
||||||
/* No hard limit set, try soft limit. */
|
/* No hard limit set, try soft limit, if it exists. */
|
||||||
if (aix_getlimit(user, aix_limits[n].soft, &val) == 0)
|
if (aix_getlimit(user, aix_limits[n].soft, &val) == -1)
|
||||||
|
continue;
|
||||||
rlim.rlim_cur = val == -1 ? RLIM64_INFINITY : val * aix_limits[n].factor;
|
rlim.rlim_cur = val == -1 ? RLIM64_INFINITY : val * aix_limits[n].factor;
|
||||||
|
|
||||||
/* Set hard limit per AIX /etc/security/limits documentation. */
|
/* Set hard limit per AIX /etc/security/limits documentation. */
|
||||||
|
Reference in New Issue
Block a user