From 4815b9da378492da3eee817f136130ed28fa75fe Mon Sep 17 00:00:00 2001 From: ache Date: Thu, 27 Feb 1997 00:24:05 +0000 Subject: "infinity" check was missed from login_getcapsize(), add it One manifestation of this bug: all networking users have coredumpsize=0 --- lib/libutil/login_cap.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/libutil') diff --git a/lib/libutil/login_cap.c b/lib/libutil/login_cap.c index 0ded0bd..f507715 100644 --- a/lib/libutil/login_cap.c +++ b/lib/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 @@ -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) { -- cgit v1.1