diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-09-25 19:44:55 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-09-25 19:44:55 +0000 |
commit | 901956a52a8b376daa61730f6560cdaddda4b6e2 (patch) | |
tree | 9b1a19dcbd4563fd13a412a0fe37b8d3191b3c56 /nis/nss_nisplus/nisplus-publickey.c | |
parent | ed91314ee80dfdda09b365c4bb87d338bd43861d (diff) | |
download | glibc-901956a52a8b376daa61730f6560cdaddda4b6e2.tar.gz glibc-901956a52a8b376daa61730f6560cdaddda4b6e2.tar.xz glibc-901956a52a8b376daa61730f6560cdaddda4b6e2.zip |
Update.
* nis/nis_table.c (nis_list): Always strdup string used with ibreq->ibr_name. Add several NULL pointer checks. * nis/nss_nisplus/nisplus-alias.c: Add check for NULL return value of nis_list. * nis/nss_nisplus/nisplus-ethers.c: Likewise. * nis/nss_nisplus/nisplus-grp.c: Likewise. * nis/nss_nisplus/nisplus-hosts.c: Likewise. * nis/nss_nisplus/nisplus-netgrp.c: Likewise. * nis/nss_nisplus/nisplus-network.c: Likewise. * nis/nss_nisplus/nisplus-proto.c: Likewise. * nis/nss_nisplus/nisplus-publickey.c: Likewise. * nis/nss_nisplus/nisplus-pwd.c: Likewise. * nis/nss_nisplus/nisplus-rpc.c: Likewise. * nis/nss_nisplus/nisplus-service.c: Likewise. * nis/nss_nisplus/nisplus-spwd.c: Likewise.
Diffstat (limited to 'nis/nss_nisplus/nisplus-publickey.c')
-rw-r--r-- | nis/nss_nisplus/nisplus-publickey.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/nis/nss_nisplus/nisplus-publickey.c b/nis/nss_nisplus/nisplus-publickey.c index ec1290a683..58ae7012af 100644 --- a/nis/nss_nisplus/nisplus-publickey.c +++ b/nis/nss_nisplus/nisplus-publickey.c @@ -1,4 +1,4 @@ -/* Copyright (c) 1997, 1999, 2001 Free Software Foundation, Inc. +/* Copyright (c) 1997, 1999, 2001, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997. @@ -74,6 +74,11 @@ _nss_nisplus_getpublickey (const char *netname, char *pkey, int *errnop) res = nis_list (buf, USE_DGRAM+NO_AUTHINFO+FOLLOW_LINKS+FOLLOW_PATH, NULL, NULL); + if (res == NULL) + { + *errnop = ENOMEM; + return NSS_STATUS_TRYAGAIN; + } retval = niserr2nss (res->status); if (retval != NSS_STATUS_SUCCESS) @@ -152,6 +157,11 @@ _nss_nisplus_getsecretkey (const char *netname, char *skey, char *passwd, res = nis_list (buf, USE_DGRAM+NO_AUTHINFO+FOLLOW_LINKS+FOLLOW_PATH, NULL, NULL); + if (res == NULL) + { + *errnop = ENOMEM; + return NSS_STATUS_TRYAGAIN; + } retval = niserr2nss (res->status); if (retval != NSS_STATUS_SUCCESS) @@ -269,6 +279,11 @@ _nss_nisplus_netname2user (char netname[MAXNETNAMELEN + 1], uid_t *uidp, /* XXX but we cant, for now. XXX */ res = nis_list (sname, USE_DGRAM+NO_AUTHINFO+FOLLOW_LINKS+FOLLOW_PATH, NULL, NULL); + if (res == NULL) + { + *errnop = ENOMEM; + return NSS_STATUS_TRYAGAIN; + } switch (res->status) { case NIS_SUCCESS: @@ -337,6 +352,11 @@ _nss_nisplus_netname2user (char netname[MAXNETNAMELEN + 1], uid_t *uidp, /* XXX but we cant, for now. XXX */ res = nis_list (sname, USE_DGRAM+NO_AUTHINFO+FOLLOW_LINKS+FOLLOW_PATH, NULL, NULL); + if (res == NULL) + { + *errnop = ENOMEM; + return NSS_STATUS_TRYAGAIN; + } switch(res->status) { case NIS_NOTFOUND: |