"infinity" check was missed from login_getcapsize(), add it

One manifestation of this bug: all networking users have coredumpsize=0
This commit is contained in:
Andrey A. Chernov 1997-02-27 00:24:05 +00:00
parent 8d2cd1c6b6
commit 65f50b7f27
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=23144

View File

@ -21,7 +21,7 @@
*
* Low-level routines relating to the user capabilities database
*
* $Id$
* $Id: login_cap.c,v 1.10 1997/02/22 15:08:20 peter Exp $
*/
#include <stdio.h>
@ -457,6 +457,12 @@ login_getcapsize(login_cap_t *lc, const char *cap, rlim_t def, rlim_t error) {
else if (ret < 0)
return error;
/*
* "inf" and "infinity" are two special cases for this.
*/
if (!strcasecmp(res, "infinity") || !strcasecmp(res, "inf"))
return RLIM_INFINITY;
errno = 0;
tot = 0;
while (*res) {