lib/limits.c: setup_limits(): Simplify, by calling str2si() instead of str2sl()
Reviewed-by: "Serge E. Hallyn" <serge@hallyn.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
@@ -496,9 +496,9 @@ void setup_limits (const struct passwd *info)
|
||||
continue;
|
||||
}
|
||||
if (strncmp (cp, "ulimit=", 7) == 0) {
|
||||
long blocks;
|
||||
if ( (str2sl(&blocks, cp + 7) == -1)
|
||||
|| (blocks != (int) blocks)
|
||||
int blocks;
|
||||
|
||||
if ( (str2si(&blocks, cp + 7) == -1)
|
||||
|| (set_filesize_limit (blocks) != 0)) {
|
||||
SYSLOG ((LOG_WARN,
|
||||
"Can't set the ulimit for user %s",
|
||||
|
||||
Reference in New Issue
Block a user