search for: setrlimit_value

Displaying 1 result from an estimated 1 matches for "setrlimit_value".

2001 Feb 08
0
openssh2.3.0p1 and /etc/limits
...dif + +#define memzero(ptr, size) memset((void *)(ptr), 0, (size)) + +#define LOGIN_ERROR_RLIMIT 1 +#define LOGIN_ERROR_LOGIN 2 + +/* Set a limit on a resource */ +/* + * rlimit - RLIMIT_XXXX + * value - string value to be read + * multiplier - value*multiplier is the actual limit + */ +static int +setrlimit_value(unsigned int rlimit, const char *value, unsigned int multiplier) +{ + struct rlimit rlim; + long limit; + char **endptr = (char **) &value; + const char *value_orig = value; + + limit = strtol(value, endptr, 10); + if (limit == 0 && value_orig == *endptr) /* no chars read */ + return 0...