mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08:00
* nis/nss_nisplus/nisplus-ethers.c: Add missing null pointer check.
* nis/nss_nisplus/nisplus-hosts.c: Likewise. * nis/nss_nisplus/nisplus-network.c: Likewise. * nis/nss_nisplus/nisplus-proto.c: Likewise. * nis/nss_nisplus/nisplus-rpc.c: Likewise. * nis/nss_nisplus/nisplus-service.c: Likewise. * nis/nss_nisplus/nisplus-spwd.c: Likewise.
This commit is contained in:
parent
d08a1d404d
commit
487609e313
@ -1,5 +1,13 @@
|
||||
2006-04-29 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* nis/nss_nisplus/nisplus-ethers.c: Add missing null pointer check.
|
||||
* nis/nss_nisplus/nisplus-hosts.c: Likewise.
|
||||
* nis/nss_nisplus/nisplus-network.c: Likewise.
|
||||
* nis/nss_nisplus/nisplus-proto.c: Likewise.
|
||||
* nis/nss_nisplus/nisplus-rpc.c: Likewise.
|
||||
* nis/nss_nisplus/nisplus-service.c: Likewise.
|
||||
* nis/nss_nisplus/nisplus-spwd.c: Likewise.
|
||||
|
||||
* nis/nisplus-parser.h (_nss_nisplus_parse_pwent): Add entry
|
||||
parameter.
|
||||
(_nss_nisplus_parse_pwent_chk): New prototype.
|
||||
|
@ -176,6 +176,11 @@ internal_nisplus_getetherent_r (struct etherent *ether, char *buffer,
|
||||
{
|
||||
saved_result = NULL;
|
||||
result = nis_first_entry (tablename_val);
|
||||
if (result == NULL)
|
||||
{
|
||||
*errnop = errno;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
}
|
||||
if (niserr2nss (result->status) != NSS_STATUS_SUCCESS)
|
||||
return niserr2nss (result->status);
|
||||
}
|
||||
@ -183,6 +188,11 @@ internal_nisplus_getetherent_r (struct etherent *ether, char *buffer,
|
||||
{
|
||||
saved_result = result;
|
||||
result = nis_next_entry (tablename_val, &result->cookie);
|
||||
if (result == NULL)
|
||||
{
|
||||
*errnop = errno;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
}
|
||||
if (niserr2nss (result->status) != NSS_STATUS_SUCCESS)
|
||||
{
|
||||
nis_freeresult (saved_result);
|
||||
|
@ -265,6 +265,11 @@ internal_nisplus_gethostent_r (struct hostent *host, char *buffer,
|
||||
}
|
||||
|
||||
result = nis_first_entry (tablename_val);
|
||||
if (result == NULL)
|
||||
{
|
||||
*errnop = errno;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
}
|
||||
if (niserr2nss (result->status) != NSS_STATUS_SUCCESS)
|
||||
{
|
||||
enum nss_status retval = niserr2nss (result->status);
|
||||
@ -279,11 +284,13 @@ internal_nisplus_gethostent_r (struct hostent *host, char *buffer,
|
||||
}
|
||||
else
|
||||
{
|
||||
nis_result *res2;
|
||||
|
||||
saved_res = result;
|
||||
res2 = nis_next_entry(tablename_val, &result->cookie);
|
||||
result = res2;
|
||||
result = nis_next_entry (tablename_val, &result->cookie);
|
||||
if (result == NULL)
|
||||
{
|
||||
*errnop = errno;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
}
|
||||
if (niserr2nss (result->status) != NSS_STATUS_SUCCESS)
|
||||
{
|
||||
enum nss_status retval= niserr2nss (result->status);
|
||||
|
@ -232,6 +232,11 @@ internal_nisplus_getnetent_r (struct netent *network, char *buffer,
|
||||
}
|
||||
|
||||
result = nis_first_entry (tablename_val);
|
||||
if (result == NULL)
|
||||
{
|
||||
*errnop = errno;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
}
|
||||
if (niserr2nss (result->status) != NSS_STATUS_SUCCESS)
|
||||
{
|
||||
int retval = niserr2nss (result->status);
|
||||
@ -249,9 +254,13 @@ internal_nisplus_getnetent_r (struct netent *network, char *buffer,
|
||||
}
|
||||
else
|
||||
{
|
||||
nis_result *res = nis_next_entry (tablename_val, &result->cookie);
|
||||
saved_res = result;
|
||||
result = res;
|
||||
result = nis_next_entry (tablename_val, &result->cookie);
|
||||
if (result == NULL)
|
||||
{
|
||||
*errnop = errno;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
}
|
||||
if (niserr2nss (result->status) != NSS_STATUS_SUCCESS)
|
||||
{
|
||||
int retval = niserr2nss (result->status);
|
||||
|
@ -227,6 +227,11 @@ internal_nisplus_getprotoent_r (struct protoent *proto, char *buffer,
|
||||
}
|
||||
|
||||
result = nis_first_entry (tablename_val);
|
||||
if (result == NULL)
|
||||
{
|
||||
*errnop = errno;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
}
|
||||
if (niserr2nss (result->status) != NSS_STATUS_SUCCESS)
|
||||
return niserr2nss (result->status);
|
||||
}
|
||||
@ -234,7 +239,11 @@ internal_nisplus_getprotoent_r (struct protoent *proto, char *buffer,
|
||||
{
|
||||
saved_res = result;
|
||||
result = nis_next_entry (tablename_val, &result->cookie);
|
||||
|
||||
if (result == NULL)
|
||||
{
|
||||
*errnop = errno;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
}
|
||||
if (niserr2nss (result->status) != NSS_STATUS_SUCCESS)
|
||||
{
|
||||
nis_freeresult (saved_res);
|
||||
|
@ -229,6 +229,11 @@ internal_nisplus_getrpcent_r (struct rpcent *rpc, char *buffer,
|
||||
}
|
||||
|
||||
result = nis_first_entry (tablename_val);
|
||||
if (result == NULL)
|
||||
{
|
||||
*errnop = errno;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
}
|
||||
if (niserr2nss (result->status) != NSS_STATUS_SUCCESS)
|
||||
return niserr2nss (result->status);
|
||||
}
|
||||
@ -236,6 +241,11 @@ internal_nisplus_getrpcent_r (struct rpcent *rpc, char *buffer,
|
||||
{
|
||||
saved_res = result;
|
||||
result = nis_next_entry (tablename_val, &result->cookie);
|
||||
if (result == NULL)
|
||||
{
|
||||
*errnop = errno;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
}
|
||||
if (niserr2nss (result->status) != NSS_STATUS_SUCCESS)
|
||||
{
|
||||
nis_freeresult (saved_res);
|
||||
|
@ -234,6 +234,11 @@ internal_nisplus_getservent_r (struct servent *serv, char *buffer,
|
||||
}
|
||||
|
||||
result = nis_first_entry (tablename_val);
|
||||
if (result == NULL)
|
||||
{
|
||||
*errnop = errno;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
}
|
||||
if (niserr2nss (result->status) != NSS_STATUS_SUCCESS)
|
||||
return niserr2nss (result->status);
|
||||
}
|
||||
@ -241,6 +246,11 @@ internal_nisplus_getservent_r (struct servent *serv, char *buffer,
|
||||
{
|
||||
saved_res = result;
|
||||
result = nis_next_entry (tablename_val, &result->cookie);
|
||||
if (result == NULL)
|
||||
{
|
||||
*errnop = errno;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
}
|
||||
if (niserr2nss (result->status) != NSS_STATUS_SUCCESS)
|
||||
{
|
||||
nis_freeresult (saved_res);
|
||||
|
@ -99,6 +99,11 @@ internal_nisplus_getspent_r (struct spwd *sp, char *buffer, size_t buflen,
|
||||
}
|
||||
|
||||
result = nis_first_entry (pwd_tablename_val);
|
||||
if (result == NULL)
|
||||
{
|
||||
*errnop = errno;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
}
|
||||
if (niserr2nss (result->status) != NSS_STATUS_SUCCESS)
|
||||
return niserr2nss (result->status);
|
||||
}
|
||||
@ -106,6 +111,11 @@ internal_nisplus_getspent_r (struct spwd *sp, char *buffer, size_t buflen,
|
||||
{
|
||||
saved_res = result;
|
||||
result = nis_next_entry (pwd_tablename_val, &result->cookie);
|
||||
if (result == NULL)
|
||||
{
|
||||
*errnop = errno;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
}
|
||||
if (niserr2nss (result->status) != NSS_STATUS_SUCCESS)
|
||||
{
|
||||
nis_freeresult (saved_res);
|
||||
|
Loading…
Reference in New Issue
Block a user