diff options
author | Ulrich Drepper <drepper@redhat.com> | 1997-03-17 03:56:41 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1997-03-17 03:56:41 +0000 |
commit | 79df061031cc3f271ad5b1bd685942607d682b68 (patch) | |
tree | cacc4ca2dceb41d3bd384f2cd2a645e2ae947cfc | |
parent | 375676b1b6613028afc262fb4386dc8ed7025c04 (diff) |
Rewrite NIS code to allow empty keys.
-rw-r--r-- | nis/nss_nis/nis-publickey.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/nis/nss_nis/nis-publickey.c b/nis/nss_nis/nis-publickey.c index b9eda6a742..aad4da5cc2 100644 --- a/nis/nss_nis/nis-publickey.c +++ b/nis/nss_nis/nis-publickey.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996. @@ -130,6 +130,7 @@ parse_netid_str (const char *s, uid_t *uidp, gid_t *gidp, int *gidlenp, gid_t *gidlist) { char *p; + int gidlen; if (!s || !isdigit (*s)) { @@ -162,14 +163,15 @@ parse_netid_str (const char *s, uid_t *uidp, gid_t *gidp, int *gidlenp, *gidp = (atoi (p)); - *gidlenp = 0; -#if 0 + gidlen = 0; + while ((p = strchr (p, ',')) != NULL) { p++; - gidlist[*gidlenp++] = atoi (p); + gidlist[gidlen++] = atoi (p); } -#endif + + *gidlenp = gidlen; return NSS_STATUS_SUCCESS; } |