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 | 65f50b7f27a8d5d3c010b2ad5681e1f7e51448ef (patch) | |
| tree | 44f0707a7cda18d6b9df065b4728358bac49d3eb /lib/libutil | |
| parent | 8d2cd1c6b6426580b0015949e0d1aacb511031ce (diff) | |
Notes
Diffstat (limited to 'lib/libutil')
| -rw-r--r-- | lib/libutil/login_cap.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/libutil/login_cap.c b/lib/libutil/login_cap.c index 0ded0bdeb54e..f5077153539b 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 <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) { |
