diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-10-08 17:16:17 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-10-08 17:16:17 +0000 |
commit | b5c6276a6ea23cf92e30132b92cf14119235b257 (patch) | |
tree | 546237363815c2c2fd8e2516dd89169b91c5c1c9 /nis | |
parent | 9640bbe1c1fab7e1373e59160889b1fbc0bd000c (diff) | |
download | glibc-b5c6276a6ea23cf92e30132b92cf14119235b257.tar.gz glibc-b5c6276a6ea23cf92e30132b92cf14119235b257.tar.xz glibc-b5c6276a6ea23cf92e30132b92cf14119235b257.zip |
Update.
1999-10-08 Ulrich Drepper <drepper@cygnus.com> * nis/nss_nisplus/nisplus-parser.c (_nss_nisplus_parse_spent): Fix handling of empty entries. Patch by Thorsten Kukuk <kukuk@suse.de>. 1999-10-08 Andreas Schwab <schwab@suse.de> * debug/xtrace.sh: Fix quoting bugs. Implement --help and --version. 1999-10-08 Andreas Schwab <schwab@suse.de> * debug/pcprofiledump.c: Fix typos. 1999-10-07 Andreas Jaeger <aj@suse.de> * math/Makefile (tests): Added basic-tests. * math/basic-test.c: New file. Contains function basic_tests from libm-test. 1999-10-07 Andreas Schwab <schwab@suse.de> * malloc/memprof.sh: Fix quoting bugs. 1999-10-08 Ulrich Drepper <drepper@cygnus.com> * timezone/europe: Update from tzdata1999h.
Diffstat (limited to 'nis')
-rw-r--r-- | nis/nss_nisplus/nisplus-parser.c | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/nis/nss_nisplus/nisplus-parser.c b/nis/nss_nisplus/nisplus-parser.c index e8d107922b..7a91992764 100644 --- a/nis/nss_nisplus/nisplus-parser.c +++ b/nis/nss_nisplus/nisplus-parser.c @@ -307,7 +307,8 @@ _nss_nisplus_parse_spent (nis_result *result, struct spwd *sp, first_unused += (len + 1); sp->sp_lstchg = sp->sp_min = sp->sp_max = sp->sp_warn = sp->sp_inact = - sp->sp_expire = sp->sp_flag = -1; + sp->sp_expire = -1; + sp->sp_flag = ~0ul; if (NISENTRYLEN (0, 7, result) > 0) { @@ -316,49 +317,56 @@ _nss_nisplus_parse_spent (nis_result *result, struct spwd *sp, line = NISENTRYVAL (0, 7, result); cp = strchr (line, ':'); if (cp == NULL) - return 0; + return 1; *cp++ = '\0'; - sp->sp_lstchg = atol (line); + if (*line) + sp->sp_lstchg = atol (line); line = cp; cp = strchr (line, ':'); if (cp == NULL) - return 0; + return 1; *cp++ = '\0'; - sp->sp_min = atol (line); + if (*line) + sp->sp_min = atol (line); line = cp; cp = strchr (line, ':'); if (cp == NULL) - return 0; + return 1; *cp++ = '\0'; - sp->sp_max = atol (line); + if (*line) + sp->sp_max = atol (line); line = cp; cp = strchr (line, ':'); if (cp == NULL) - return 0; + return 1; *cp++ = '\0'; - sp->sp_warn = atol (line); + if (*line) + sp->sp_warn = atol (line); line = cp; cp = strchr (line, ':'); if (cp == NULL) - return 0; + return 1; *cp++ = '\0'; - sp->sp_inact = atol (line); + if (*line) + sp->sp_inact = atol (line); line = cp; cp = strchr (line, ':'); if (cp == NULL) - return 0; + return 1; *cp++ = '\0'; - sp->sp_expire = atol (line); + if (*line) + sp->sp_expire = atol (line); line = cp; if (line == NULL) - return 0; - sp->sp_flag = atol (line); + return 1; + if (*line) + sp->sp_flag = atol (line); } return 1; |