diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 1997-02-27 00:24:05 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 1997-02-27 00:24:05 +0000 |
commit | d02fc8ee49f041934e70818685eaa60366006846 (patch) | |
tree | 8547a40398d1245830480c6300746a42c01d2358 /libutil/login_cap.c | |
parent | 3b5017053956d3793524691fbf45b2ab22c6d872 (diff) | |
download | pw-darwin-d02fc8ee49f041934e70818685eaa60366006846.tar.gz pw-darwin-d02fc8ee49f041934e70818685eaa60366006846.tar.zst pw-darwin-d02fc8ee49f041934e70818685eaa60366006846.zip |
"infinity" check was missed from login_getcapsize(), add it
One manifestation of this bug: all networking users have coredumpsize=0
Diffstat (limited to 'libutil/login_cap.c')
-rw-r--r-- | libutil/login_cap.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libutil/login_cap.c b/libutil/login_cap.c index 0ded0bd..f507715 100644 --- a/libutil/login_cap.c +++ b/libutil/login_cap.c @@ -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) { |