Update NIS+.
1998-01-24 Thorsten Kukuk <kukuk@vt.uni-paderborn.de> * nis/Makefile: Distribute nis_cache2.h, add nis cache functions to routines. * nis/nis_cache.c: New. * nis/nis_cache2.h: New. * nis/nis_cache2_xdr.c: New. * nis/nis_call.c: Changes for cache2_info parameter. * nis/nis_checkpoint.c: Likewise. * nis/nis_intern.h: Likewise. * nis/nis_mkdir.c: Likewise. * nis/nis_ping.c: Likewise. * nis/nis_rmdir.c: Likewise. * nis/nis_server.c: Likewise. * nis/nis_util.c: Likewise. 1997-12-30 Thorsten Kukuk <kukuk@vt.uni-paderborn.de> * nis/nss_nisplus/nisplus-alias.c: Fix bogus if case and return/errnop codes. * 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-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. 1997-12-28 Thorsten Kukuk <kukuk@vt.uni-paderborn.de> * nis/nss_nis/nis-alias.c: Use errnop, not __set_errno(). * nis/nss_nis/nis-ethers.c: Likewise. * nis/nss_nis/nis-grp.c: Likewise. * nis/nss_nis/nis-hosts.c: Likewise. * nis/nss_nis/nis-network.c: Likewise. * nis/nss_nis/nis-proto.c: Likewise. * nis/nss_nis/nis-hosts.c: Likewise. * nis/nss_nis/nis-network.c: Likewise. * nis/nss_nis/nis-proto.c: Likewise. * nis/nss_nis/nis-publickey.c: Likewise. * nis/nss_nis/nis-pwd.c: Likewise. * nis/nss_nis/nis-rpc.c: Likewise. * nis/nss_nis/nis-service.c: Likewise. * nis/nss_nis/nis-spwd.c: Likewise.
This commit is contained in:
parent
ecb9d3e182
commit
ac9f45cfd1
47
ChangeLog
47
ChangeLog
@ -1,3 +1,50 @@
|
||||
1998-01-24 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
|
||||
|
||||
* nis/Makefile: Distribute nis_cache2.h, add nis cache functions
|
||||
to routines.
|
||||
* nis/nis_cache.c: New.
|
||||
* nis/nis_cache2.h: New.
|
||||
* nis/nis_cache2_xdr.c: New.
|
||||
* nis/nis_call.c: Changes for cache2_info parameter.
|
||||
* nis/nis_checkpoint.c: Likewise.
|
||||
* nis/nis_intern.h: Likewise.
|
||||
* nis/nis_mkdir.c: Likewise.
|
||||
* nis/nis_ping.c: Likewise.
|
||||
* nis/nis_rmdir.c: Likewise.
|
||||
* nis/nis_server.c: Likewise.
|
||||
* nis/nis_util.c: Likewise.
|
||||
|
||||
1997-12-30 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
|
||||
|
||||
* nis/nss_nisplus/nisplus-alias.c: Fix bogus if case and
|
||||
return/errnop codes.
|
||||
* 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-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.
|
||||
|
||||
1997-12-28 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
|
||||
|
||||
* nis/nss_nis/nis-alias.c: Use errnop, not __set_errno().
|
||||
* nis/nss_nis/nis-ethers.c: Likewise.
|
||||
* nis/nss_nis/nis-grp.c: Likewise.
|
||||
* nis/nss_nis/nis-hosts.c: Likewise.
|
||||
* nis/nss_nis/nis-network.c: Likewise.
|
||||
* nis/nss_nis/nis-proto.c: Likewise.
|
||||
* nis/nss_nis/nis-hosts.c: Likewise.
|
||||
* nis/nss_nis/nis-network.c: Likewise.
|
||||
* nis/nss_nis/nis-proto.c: Likewise.
|
||||
* nis/nss_nis/nis-publickey.c: Likewise.
|
||||
* nis/nss_nis/nis-pwd.c: Likewise.
|
||||
* nis/nss_nis/nis-rpc.c: Likewise.
|
||||
* nis/nss_nis/nis-service.c: Likewise.
|
||||
* nis/nss_nis/nis-spwd.c: Likewise.
|
||||
|
||||
1998-01-24 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/net/if.h (ifr_bandwidth, ifr_qlen):
|
||||
|
@ -1 +1 @@
|
||||
NIS(YP)/NIS+ NSS modules 0.15 by Thorsten Kukuk
|
||||
NIS(YP)/NIS+ NSS modules 0.16 by Thorsten Kukuk
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
|
||||
# The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -23,7 +23,7 @@ subdir := nis
|
||||
|
||||
headers := $(wildcard rpcsvc/*.[hx])
|
||||
distribute := nss-nis.h nss-nisplus.h nis_intern.h Banner \
|
||||
nisplus-parser.h
|
||||
nisplus-parser.h nis_cache2.h
|
||||
|
||||
# These are the databases available for the nis (and perhaps later nisplus)
|
||||
# service. This must be a superset of the services in nss.
|
||||
@ -44,8 +44,8 @@ vpath %.c $(subdir-dirs)
|
||||
|
||||
libnsl-routines = yp_xdr ypclnt ypupdate_xdr \
|
||||
nis_subr nis_local_names nis_free nis_file \
|
||||
nis_print nis_error nis_call nis_lookup\
|
||||
nis_table nis_xdr nis_server nis_ping\
|
||||
nis_print nis_error nis_call nis_lookup nis_cache\
|
||||
nis_table nis_xdr nis_server nis_ping nis_cache2_xdr\
|
||||
nis_checkpoint nis_mkdir nis_rmdir nis_getservlist\
|
||||
nis_verifygroup nis_ismember nis_addmember nis_util\
|
||||
nis_removemember nis_creategroup nis_destroygroup\
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1997 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
|
||||
|
||||
@ -186,7 +186,8 @@ __bind_connect (dir_binding *dbp)
|
||||
}
|
||||
|
||||
static dir_binding *
|
||||
__bind_create (const nis_server *serv_val, u_int serv_len, u_long flags)
|
||||
__bind_create (const nis_server *serv_val, u_int serv_len, u_long flags,
|
||||
cache2_info *cinfo)
|
||||
{
|
||||
dir_binding *dbp;
|
||||
u_int i;
|
||||
@ -268,7 +269,14 @@ __bind_create (const nis_server *serv_val, u_int serv_len, u_long flags)
|
||||
dbp->server_val[i].pkey.n_bytes = NULL;
|
||||
}
|
||||
|
||||
if (__nis_findfastest (dbp) < 1)
|
||||
dbp->class = -1;
|
||||
if (cinfo != NULL && cinfo->server_used >= 0)
|
||||
{
|
||||
dbp->server_used = cinfo->server_used;
|
||||
dbp->current_ep = cinfo->current_ep;
|
||||
dbp->class = cinfo->class;
|
||||
}
|
||||
else if (__nis_findfastest (dbp) < 1)
|
||||
{
|
||||
__bind_destroy (dbp);
|
||||
return NULL;
|
||||
@ -280,7 +288,7 @@ __bind_create (const nis_server *serv_val, u_int serv_len, u_long flags)
|
||||
nis_error
|
||||
__do_niscall2 (const nis_server *server, u_int server_len, u_long prog,
|
||||
xdrproc_t xargs, caddr_t req, xdrproc_t xres, caddr_t resp,
|
||||
u_long flags, nis_cb *cb)
|
||||
u_long flags, nis_cb *cb, cache2_info *cinfo)
|
||||
{
|
||||
enum clnt_stat result;
|
||||
nis_error retcode;
|
||||
@ -289,7 +297,8 @@ __do_niscall2 (const nis_server *server, u_int server_len, u_long prog,
|
||||
if (flags & MASTER_ONLY)
|
||||
server_len = 1;
|
||||
|
||||
if ((dbp = __bind_create (server, server_len, flags)) == NULL)
|
||||
dbp = __bind_create (server, server_len, flags, cinfo);
|
||||
if (dbp == NULL)
|
||||
return NIS_NAMEUNREACHABLE;
|
||||
while (__bind_connect (dbp) != NIS_SUCCESS)
|
||||
{
|
||||
@ -549,10 +558,15 @@ __do_niscall (const_nis_name name, u_long prog, xdrproc_t xargs,
|
||||
directory_obj *dir = NULL;
|
||||
nis_server *server;
|
||||
u_int server_len;
|
||||
cache2_info cinfo = {-1, -1, -1};
|
||||
|
||||
if (name == NULL)
|
||||
return NIS_BADNAME;
|
||||
|
||||
/* Search in local cache. In the moment, we ignore the fastest server */
|
||||
if (!(flags & NO_CACHE))
|
||||
dir = __nis_cache_search (name, flags, &cinfo);
|
||||
|
||||
if (dir == NULL)
|
||||
{
|
||||
nis_error status;
|
||||
@ -578,7 +592,7 @@ __do_niscall (const_nis_name name, u_long prog, xdrproc_t xargs,
|
||||
|
||||
|
||||
retcode = __do_niscall2 (server, server_len, prog, xargs, req, xres, resp,
|
||||
flags, cb);
|
||||
flags, cb, &cinfo);
|
||||
|
||||
nis_free_directory (dir);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 1997 Free Software Foundation, Inc.
|
||||
/* Copyright (c) 1997, 1998 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
|
||||
|
||||
@ -51,7 +51,7 @@ nis_checkpoint(const_nis_name dirname)
|
||||
if (__do_niscall2 (&NIS_RES_OBJECT(res2)->DI_data.do_servers.do_servers_val[i],
|
||||
1, NIS_CHECKPOINT, (xdrproc_t) xdr_nis_name,
|
||||
(caddr_t) &dirname, (xdrproc_t) xdr_cp_result,
|
||||
(caddr_t) &cpres, 0, NULL) != RPC_SUCCESS)
|
||||
(caddr_t) &cpres, 0, NULL, NULL) != RPC_SUCCESS)
|
||||
NIS_RES_STATUS (res) = NIS_RPCERROR;
|
||||
else
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 1997 Free Software Foundation, Inc.
|
||||
/* Copyright (c) 1997, 1998 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
|
||||
|
||||
@ -32,6 +32,7 @@ struct dir_binding
|
||||
u_int server_used; /* Which server we are bind in the moment ? */
|
||||
u_int current_ep; /* Which endpoint of the server are in use? */
|
||||
u_int trys; /* How many server have we tried ? */
|
||||
u_int class; /* From which class is server_val ? */
|
||||
bool_t master_only; /* Is only binded to the master */
|
||||
bool_t use_auth; /* Do we use AUTH ? */
|
||||
bool_t use_udp; /* Do we use UDP ? */
|
||||
@ -42,6 +43,14 @@ struct dir_binding
|
||||
};
|
||||
typedef struct dir_binding dir_binding;
|
||||
|
||||
struct cache2_info
|
||||
{
|
||||
long server_used;
|
||||
long current_ep;
|
||||
long class;
|
||||
};
|
||||
typedef struct cache2_info cache2_info;
|
||||
|
||||
struct nis_cb
|
||||
{
|
||||
nis_server *serv;
|
||||
@ -59,7 +68,8 @@ extern long __nis_findfastest __P ((dir_binding *bind));
|
||||
extern nis_error __do_niscall2 __P ((const nis_server *serv, u_int serv_len,
|
||||
u_long prog, xdrproc_t xargs, caddr_t req,
|
||||
xdrproc_t xres, caddr_t resp,
|
||||
u_long flags, nis_cb *cb));
|
||||
u_long flags, nis_cb *cb,
|
||||
cache2_info *cinfo));
|
||||
extern nis_error __do_niscall __P ((const_nis_name name, u_long prog,
|
||||
xdrproc_t xargs, caddr_t req,
|
||||
xdrproc_t xres, caddr_t resp,
|
||||
@ -75,6 +85,13 @@ extern struct nis_cb *__nis_create_callback
|
||||
const void *userdata, u_long flags));
|
||||
extern nis_error __nis_destroy_callback __P ((struct nis_cb *cb));
|
||||
|
||||
#ifdef _LIBC
|
||||
/* NIS+ Cache functions */
|
||||
extern directory_obj *__nis_cache_search __P ((const_nis_name name,
|
||||
u_long flags,
|
||||
cache2_info *cinfo));
|
||||
#endif
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 1997 Free Software Foundation, Inc.
|
||||
/* Copyright (c) 1997, 1998 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
|
||||
|
||||
@ -33,7 +33,7 @@ nis_mkdir (const_nis_name dir, const nis_server *server)
|
||||
res2 = __do_niscall2 (server, 1, NIS_MKDIR,
|
||||
(xdrproc_t) xdr_nis_name,
|
||||
(caddr_t) &dir, (xdrproc_t) xdr_nis_error,
|
||||
(caddr_t) &res, 0, NULL);
|
||||
(caddr_t) &res, 0, NULL, NULL);
|
||||
if (res2 != NIS_SUCCESS)
|
||||
return res2;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 1997 Free Software Foundation, Inc.
|
||||
/* Copyright (c) 1997, 1998 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
|
||||
|
||||
@ -59,7 +59,7 @@ nis_ping (const_nis_name dirname, u_long utime, const nis_object *dirobj)
|
||||
__do_niscall2 (&obj->DI_data.do_servers.do_servers_val[i], 1,
|
||||
NIS_PING, (xdrproc_t) xdr_ping_args,
|
||||
(caddr_t) &args, (xdrproc_t) xdr_void,
|
||||
(caddr_t) NULL, 0, NULL);
|
||||
(caddr_t) NULL, 0, NULL, NULL);
|
||||
if (res)
|
||||
nis_freeresult (res);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 1997 Free Software Foundation, Inc.
|
||||
/* Copyright (c) 1997, 1998 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
|
||||
|
||||
@ -31,7 +31,7 @@ nis_rmdir (const_nis_name dir, const nis_server *server)
|
||||
res2 = __do_niscall2 (server, 1, NIS_RMDIR,
|
||||
(xdrproc_t) xdr_nis_name,
|
||||
(caddr_t) &dir, (xdrproc_t) xdr_nis_error,
|
||||
(caddr_t) &res, 0, NULL);
|
||||
(caddr_t) &res, 0, NULL, NULL);
|
||||
if (res2 != NIS_SUCCESS)
|
||||
return res2;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 1997 Free Software Foundation, Inc.
|
||||
/* Copyright (c) 1997, 1998 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
|
||||
|
||||
@ -39,7 +39,7 @@ nis_servstate (const nis_server *serv, const nis_tag *tags,
|
||||
|
||||
if (__do_niscall2 (serv, 1, NIS_SERVSTATE, (xdrproc_t) xdr_nis_taglist,
|
||||
(caddr_t) &taglist, (xdrproc_t) xdr_nis_taglist,
|
||||
(caddr_t) &tagres, 0, NULL) != RPC_SUCCESS)
|
||||
(caddr_t) &tagres, 0, NULL, NULL) != RPC_SUCCESS)
|
||||
return NIS_RPCERROR;
|
||||
|
||||
*result = tagres.tags.tags_val;
|
||||
@ -65,7 +65,7 @@ nis_stats (const nis_server *serv, const nis_tag *tags,
|
||||
|
||||
if (__do_niscall2 (serv, 1, NIS_STATUS, (xdrproc_t) xdr_nis_taglist,
|
||||
(caddr_t) &taglist, (xdrproc_t) xdr_nis_taglist,
|
||||
(caddr_t) &tagres, 0, NULL) != RPC_SUCCESS)
|
||||
(caddr_t) &tagres, 0, NULL, NULL) != RPC_SUCCESS)
|
||||
return NIS_RPCERROR;
|
||||
|
||||
*result = tagres.tags.tags_val;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 1997 Free Software Foundation, Inc.
|
||||
/* Copyright (c) 1997, 1998 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
|
||||
|
||||
@ -32,12 +32,12 @@ __nis_finddirectory (directory_obj *dir, const_nis_name name)
|
||||
fd_args.requester = nis_local_host();
|
||||
fd_res = calloc (1, sizeof (fd_result));
|
||||
|
||||
if ((status = __do_niscall2 (dir->do_servers.do_servers_val,
|
||||
dir->do_servers.do_servers_len,
|
||||
NIS_FINDDIRECTORY, (xdrproc_t) xdr_fd_args,
|
||||
(caddr_t) &fd_args, (xdrproc_t) xdr_fd_result,
|
||||
(caddr_t) fd_res,
|
||||
NO_AUTHINFO|USE_DGRAM, NULL)) != NIS_SUCCESS)
|
||||
status = __do_niscall2 (dir->do_servers.do_servers_val,
|
||||
dir->do_servers.do_servers_len,
|
||||
NIS_FINDDIRECTORY, (xdrproc_t) xdr_fd_args,
|
||||
(caddr_t) &fd_args, (xdrproc_t) xdr_fd_result,
|
||||
(caddr_t) fd_res, NO_AUTHINFO|USE_DGRAM, NULL, NULL);
|
||||
if (status != NIS_SUCCESS)
|
||||
fd_res->status = status;
|
||||
|
||||
return fd_res;
|
||||
|
@ -231,7 +231,7 @@ _nss_nis_getaliasbyname_r (const char *name, struct aliasent *alias,
|
||||
|
||||
if (name == NULL)
|
||||
{
|
||||
__set_errno (EINVAL);
|
||||
*errnop = EINVAL;
|
||||
return NSS_STATUS_UNAVAIL;
|
||||
}
|
||||
|
||||
@ -262,11 +262,13 @@ _nss_nis_getaliasbyname_r (const char *name, struct aliasent *alias,
|
||||
|
||||
alias->alias_local = 0;
|
||||
parse_res = _nss_nis_parse_aliasent (name, p, alias, buffer, buflen, errnop);
|
||||
if (parse_res == -1)
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
if (parse_res < 1)
|
||||
{
|
||||
if (parse_res == -1)
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
else
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
}
|
||||
|
||||
if (parse_res)
|
||||
return NSS_STATUS_SUCCESS;
|
||||
else
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
return NSS_STATUS_SUCCESS;
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ _nss_nis_gethostton_r (const char *name, struct ether *eth,
|
||||
|
||||
if (name == NULL)
|
||||
{
|
||||
__set_errno (EINVAL);
|
||||
*errnop = EINVAL;
|
||||
return NSS_STATUS_UNAVAIL;
|
||||
}
|
||||
|
||||
@ -231,13 +231,14 @@ _nss_nis_gethostton_r (const char *name, struct ether *eth,
|
||||
free (result);
|
||||
|
||||
parse_res = _nss_files_parse_etherent (p, eth, data, buflen, errnop);
|
||||
if (parse_res == -1)
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
|
||||
if (!parse_res)
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
else
|
||||
return NSS_STATUS_SUCCESS;
|
||||
if (parse_res < 1)
|
||||
{
|
||||
if (parse_res == -1)
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
else
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
}
|
||||
return NSS_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
enum nss_status
|
||||
@ -252,7 +253,7 @@ _nss_nis_getntohost_r (struct ether_addr *addr, struct ether *eth,
|
||||
|
||||
if (addr == NULL)
|
||||
{
|
||||
__set_errno (EINVAL);
|
||||
*errnop = EINVAL;
|
||||
return NSS_STATUS_UNAVAIL;
|
||||
}
|
||||
|
||||
@ -291,11 +292,12 @@ _nss_nis_getntohost_r (struct ether_addr *addr, struct ether *eth,
|
||||
free (result);
|
||||
|
||||
parse_res = _nss_files_parse_etherent (p, eth, data, buflen, errnop);
|
||||
if (parse_res == -1)
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
|
||||
if (!parse_res)
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
else
|
||||
return NSS_STATUS_SUCCESS;
|
||||
if (parse_res < 1)
|
||||
{
|
||||
if (parse_res == -1)
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
else
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
}
|
||||
return NSS_STATUS_SUCCESS;
|
||||
}
|
||||
|
@ -166,7 +166,7 @@ _nss_nis_getgrnam_r (const char *name, struct group *grp,
|
||||
|
||||
if (name == NULL)
|
||||
{
|
||||
__set_errno (EINVAL);
|
||||
*errnop = EINVAL;
|
||||
return NSS_STATUS_UNAVAIL;
|
||||
}
|
||||
|
||||
@ -197,13 +197,14 @@ _nss_nis_getgrnam_r (const char *name, struct group *grp,
|
||||
free (result);
|
||||
|
||||
parse_res = _nss_files_parse_grent (p, grp, data, buflen, errnop);
|
||||
if (parse_res == -1)
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
|
||||
if (parse_res)
|
||||
return NSS_STATUS_SUCCESS;
|
||||
else
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
if (parse_res < 1)
|
||||
{
|
||||
if (parse_res == -1)
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
else
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
}
|
||||
return NSS_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
enum nss_status
|
||||
@ -245,11 +246,12 @@ _nss_nis_getgrgid_r (gid_t gid, struct group *grp,
|
||||
free (result);
|
||||
|
||||
parse_res = _nss_files_parse_grent (p, grp, data, buflen, errnop);
|
||||
if (parse_res == -1)
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
|
||||
if (parse_res)
|
||||
return NSS_STATUS_SUCCESS;
|
||||
else
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
if (parse_res < 1)
|
||||
{
|
||||
if (parse_res == -1)
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
else
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
}
|
||||
return NSS_STATUS_SUCCESS;
|
||||
}
|
||||
|
@ -246,7 +246,7 @@ _nss_nis_gethostbyname2_r (const char *name, int af, struct hostent *host,
|
||||
|
||||
if (name == NULL)
|
||||
{
|
||||
__set_errno (EINVAL);
|
||||
*errnop = EINVAL;
|
||||
return NSS_STATUS_UNAVAIL;
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ internal_nis_getnetent_r (struct netent *net, char *buffer, size_t buflen,
|
||||
if ((size_t) (len + 1) > buflen)
|
||||
{
|
||||
free (result);
|
||||
__set_errno (ERANGE);
|
||||
*errnop = ERANGE;
|
||||
*herrnop = NETDB_INTERNAL;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
}
|
||||
@ -171,7 +171,7 @@ _nss_nis_getnetbyname_r (const char *name, struct netent *net, char *buffer,
|
||||
|
||||
if (name == NULL)
|
||||
{
|
||||
__set_errno (EINVAL);
|
||||
*errnop = EINVAL;
|
||||
*herrnop = NETDB_INTERNAL;
|
||||
return NSS_STATUS_UNAVAIL;
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ _nss_nis_getprotobyname_r (const char *name, struct protoent *proto,
|
||||
|
||||
if (name == NULL)
|
||||
{
|
||||
__set_errno (EINVAL);
|
||||
*errnop = EINVAL;
|
||||
return NSS_STATUS_UNAVAIL;
|
||||
}
|
||||
|
||||
@ -223,13 +223,14 @@ _nss_nis_getprotobyname_r (const char *name, struct protoent *proto,
|
||||
free (result);
|
||||
|
||||
parse_res = _nss_files_parse_protoent (p, proto, data, buflen, errnop);
|
||||
if (parse_res == -1)
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
|
||||
if (parse_res)
|
||||
return NSS_STATUS_SUCCESS;
|
||||
else
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
if (parse_res < 1)
|
||||
{
|
||||
if (parse_res == -1)
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
else
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
}
|
||||
return NSS_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
enum nss_status
|
||||
@ -271,11 +272,12 @@ _nss_nis_getprotobynumber_r (int number, struct protoent *proto,
|
||||
free (result);
|
||||
|
||||
parse_res = _nss_files_parse_protoent (p, proto, data, buflen, errnop);
|
||||
if (parse_res == -1)
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
|
||||
if (parse_res)
|
||||
return NSS_STATUS_SUCCESS;
|
||||
else
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
if (parse_res < 1)
|
||||
{
|
||||
if (parse_res == -1)
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
else
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
}
|
||||
return NSS_STATUS_SUCCESS;
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ _nss_nis_getpublickey (const char *netname, char *pkey, int *errnop)
|
||||
|
||||
if (netname == NULL)
|
||||
{
|
||||
__set_errno (EINVAL);
|
||||
*errnop = EINVAL;
|
||||
return NSS_STATUS_UNAVAIL;
|
||||
}
|
||||
|
||||
@ -84,7 +84,7 @@ _nss_nis_getsecretkey (const char *netname, char *skey, char *passwd,
|
||||
|
||||
if (netname == NULL || passwd == NULL)
|
||||
{
|
||||
__set_errno (EINVAL);
|
||||
*errnop = EINVAL;
|
||||
return NSS_STATUS_UNAVAIL;
|
||||
}
|
||||
|
||||
|
@ -166,7 +166,7 @@ _nss_nis_getpwnam_r (const char *name, struct passwd *pwd,
|
||||
|
||||
if (name == NULL)
|
||||
{
|
||||
__set_errno (EINVAL);
|
||||
*errnop = EINVAL;
|
||||
return NSS_STATUS_UNAVAIL;
|
||||
}
|
||||
|
||||
|
@ -207,7 +207,7 @@ _nss_nis_getrpcbyname_r (const char *name, struct rpcent *rpc,
|
||||
|
||||
if (name == NULL)
|
||||
{
|
||||
__set_errno (EINVAL);
|
||||
*errnop = EINVAL;
|
||||
return NSS_STATUS_UNAVAIL;
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,6 @@ extern int _nss_files_parse_servent (char *line, struct servent *result,
|
||||
char *data, size_t datalen, int *errnop);
|
||||
|
||||
|
||||
|
||||
__libc_lock_define_initialized (static, lock)
|
||||
|
||||
struct response_t
|
||||
@ -208,7 +207,7 @@ _nss_nis_getservbyname_r (const char *name, char *protocol,
|
||||
|
||||
if (name == NULL)
|
||||
{
|
||||
__set_errno (EINVAL);
|
||||
*errnop = EINVAL;
|
||||
return NSS_STATUS_UNAVAIL;
|
||||
}
|
||||
|
||||
@ -252,7 +251,7 @@ _nss_nis_getservbyport_r (int port, char *protocol, struct servent *serv,
|
||||
|
||||
if (protocol == NULL)
|
||||
{
|
||||
__set_errno (EINVAL);
|
||||
*errnop = EINVAL;
|
||||
return NSS_STATUS_UNAVAIL;
|
||||
}
|
||||
|
||||
|
@ -166,7 +166,7 @@ _nss_nis_getspnam_r (const char *name, struct spwd *sp,
|
||||
|
||||
if (name == NULL)
|
||||
{
|
||||
__set_errno (EINVAL);
|
||||
*errnop = EINVAL;
|
||||
return NSS_STATUS_UNAVAIL;
|
||||
}
|
||||
|
||||
@ -197,11 +197,12 @@ _nss_nis_getspnam_r (const char *name, struct spwd *sp,
|
||||
free (result);
|
||||
|
||||
parse_res = _nss_files_parse_spent (p, sp, data, buflen, errnop);
|
||||
if (parse_res == -1)
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
|
||||
if (parse_res)
|
||||
return NSS_STATUS_SUCCESS;
|
||||
else
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
if (parse_res < 1)
|
||||
{
|
||||
if (parse_res == -1)
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
else
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
}
|
||||
return NSS_STATUS_SUCCESS;
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ _nss_nisplus_parse_aliasent (nis_result *result, unsigned long entry,
|
||||
{
|
||||
/* Skip leading blanks. */
|
||||
while (isspace (*line))
|
||||
line++;
|
||||
++line;
|
||||
|
||||
if (*line == '\0')
|
||||
break;
|
||||
@ -138,12 +138,11 @@ _nss_nisplus_parse_aliasent (nis_result *result, unsigned long entry,
|
||||
alias->alias_members[alias->alias_members_len] = line;
|
||||
|
||||
while (*line != '\0' && *line != ',')
|
||||
line++;
|
||||
++line;
|
||||
|
||||
if (line != alias->alias_members[alias->alias_members_len])
|
||||
{
|
||||
*line = '\0';
|
||||
line++;
|
||||
*line++ = '\0';
|
||||
alias->alias_members_len++;
|
||||
}
|
||||
}
|
||||
@ -265,7 +264,12 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias,
|
||||
return status;
|
||||
}
|
||||
|
||||
if (name != NULL || strlen (name) <= 8)
|
||||
if (name != NULL)
|
||||
{
|
||||
*errnop = EINVAL;
|
||||
return NSS_STATUS_UNAVAIL;
|
||||
}
|
||||
else
|
||||
{
|
||||
nis_result *result;
|
||||
char buf[strlen (name) + 30 + tablename_len];
|
||||
@ -279,11 +283,13 @@ _nss_nisplus_getaliasbyname_r (const char *name, struct aliasent *alias,
|
||||
|
||||
parse_res = _nss_nisplus_parse_aliasent (result, 0, alias,
|
||||
buffer, buflen, errnop);
|
||||
if (parse_res == -1)
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
|
||||
if (parse_res)
|
||||
return NSS_STATUS_SUCCESS;
|
||||
if (parse_res < 1)
|
||||
{
|
||||
if (parse_res == -1)
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
else
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
}
|
||||
return NSS_STATUS_SUCCESS;
|
||||
}
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
}
|
||||
|
@ -232,6 +232,11 @@ _nss_nisplus_gethostton_r (const char *name, struct etherent *eth,
|
||||
}
|
||||
|
||||
if (name != NULL)
|
||||
{
|
||||
*errnop = EINVAL;
|
||||
return NSS_STATUS_UNAVAIL;
|
||||
}
|
||||
else
|
||||
{
|
||||
nis_result *result;
|
||||
char buf[strlen (name) + 40 + tablename_len];
|
||||
@ -249,17 +254,19 @@ _nss_nisplus_gethostton_r (const char *name, struct etherent *eth,
|
||||
|
||||
parse_res = _nss_nisplus_parse_etherent (result, eth, buffer,
|
||||
buflen, errnop);
|
||||
if (parse_res == -1)
|
||||
if (parse_res < 1)
|
||||
{
|
||||
nis_freeresult (result);
|
||||
*errnop = ERANGE;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
if (parse_res == -1)
|
||||
{
|
||||
nis_freeresult (result);
|
||||
*errnop = ERANGE;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
}
|
||||
else
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
}
|
||||
|
||||
if (parse_res)
|
||||
return NSS_STATUS_SUCCESS;
|
||||
return NSS_STATUS_SUCCESS;
|
||||
}
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
}
|
||||
|
||||
enum nss_status
|
||||
@ -303,15 +310,17 @@ _nss_nisplus_getntohost_r (const struct ether_addr *addr,
|
||||
|
||||
parse_res = _nss_nisplus_parse_etherent (result, eth, buffer,
|
||||
buflen, errnop);
|
||||
if (parse_res == -1)
|
||||
if (parse_res < 1)
|
||||
{
|
||||
nis_freeresult (result);
|
||||
*errnop = ERANGE;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
if (parse_res == -1)
|
||||
{
|
||||
nis_freeresult (result);
|
||||
*errnop = ERANGE;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
}
|
||||
else
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
}
|
||||
|
||||
if (parse_res)
|
||||
return NSS_STATUS_SUCCESS;
|
||||
return NSS_STATUS_SUCCESS;
|
||||
}
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
}
|
||||
|
@ -171,8 +171,11 @@ _nss_nisplus_getgrnam_r (const char *name, struct group *gr,
|
||||
return status;
|
||||
}
|
||||
|
||||
if (name == NULL || strlen (name) > 8)
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
if (name == NULL)
|
||||
{
|
||||
*errnop = EINVAL;
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
}
|
||||
else
|
||||
{
|
||||
nis_result *result;
|
||||
@ -193,16 +196,17 @@ _nss_nisplus_getgrnam_r (const char *name, struct group *gr,
|
||||
parse_res = _nss_nisplus_parse_grent (result, 0, gr, buffer, buflen,
|
||||
errnop);
|
||||
nis_freeresult (result);
|
||||
|
||||
if (parse_res == -1)
|
||||
if (parse_res < 1)
|
||||
{
|
||||
*errnop = ERANGE;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
if (parse_res == -1)
|
||||
{
|
||||
*errnop = ERANGE;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
}
|
||||
else
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
}
|
||||
if (parse_res)
|
||||
return NSS_STATUS_SUCCESS;
|
||||
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
return NSS_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
@ -239,16 +243,16 @@ _nss_nisplus_getgrgid_r (const gid_t gid, struct group *gr,
|
||||
errnop);
|
||||
|
||||
nis_freeresult (result);
|
||||
|
||||
if (parse_res == -1)
|
||||
if (parse_res < 1)
|
||||
{
|
||||
*errnop = ERANGE;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
if (parse_res == -1)
|
||||
{
|
||||
*errnop = ERANGE;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
}
|
||||
else
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
}
|
||||
|
||||
if (parse_res)
|
||||
return NSS_STATUS_SUCCESS;
|
||||
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
return NSS_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
@ -285,7 +285,7 @@ internal_nisplus_gethostent_r (struct hostent *host, char *buffer,
|
||||
if (parse_res < 1 && *errnop != ERANGE)
|
||||
parse_res = _nss_nisplus_parse_hostent (result, AF_INET, host,
|
||||
buffer, buflen, errnop);
|
||||
if (parse_res < 1 && *errnop == ERANGE)
|
||||
if (parse_res == -1)
|
||||
{
|
||||
nis_freeresult (result);
|
||||
result = saved_res;
|
||||
|
@ -323,15 +323,17 @@ _nss_nisplus_getprotobyname_r (const char *name, struct protoent *proto,
|
||||
|
||||
nis_freeresult (result);
|
||||
|
||||
if (parse_res == -1)
|
||||
if (parse_res < 1)
|
||||
{
|
||||
*errnop = ERANGE;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
if (parse_res == -1)
|
||||
{
|
||||
*errnop = ERANGE;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
}
|
||||
else
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
}
|
||||
if (parse_res)
|
||||
return NSS_STATUS_SUCCESS;
|
||||
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
return NSS_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
@ -369,15 +371,16 @@ _nss_nisplus_getprotobynumber_r (const int number, struct protoent *proto,
|
||||
|
||||
nis_freeresult (result);
|
||||
|
||||
if (parse_res == -1)
|
||||
if (parse_res < 1)
|
||||
{
|
||||
*errnop = ERANGE;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
if (parse_res == -1)
|
||||
{
|
||||
*errnop = ERANGE;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
}
|
||||
else
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
}
|
||||
|
||||
if (parse_res)
|
||||
return NSS_STATUS_SUCCESS;
|
||||
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
return NSS_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
@ -290,8 +290,8 @@ _nss_nisplus_netname2user (char netname[MAXNETNAMELEN + 1], uid_t *uidp,
|
||||
return NSS_STATUS_UNAVAIL;
|
||||
|
||||
/*
|
||||
* 3. Use principal name to look up uid/gid information in
|
||||
* LOCAL entry in **local** cred table.
|
||||
* 3. Use principal name to look up uid/gid information in
|
||||
* LOCAL entry in **local** cred table.
|
||||
*/
|
||||
domain = nis_local_directory ();
|
||||
if ((strlen (principal) + strlen (domain) + 45) > (size_t) NIS_MAXNAMELEN)
|
||||
|
@ -179,8 +179,11 @@ _nss_nisplus_getpwnam_r (const char *name, struct passwd *pw,
|
||||
return status;
|
||||
}
|
||||
|
||||
if (name == NULL || strlen (name) > 8)
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
if (name == NULL)
|
||||
{
|
||||
*errnop = EINVAL;
|
||||
return NSS_STATUS_UNAVAIL;
|
||||
}
|
||||
else
|
||||
{
|
||||
nis_result *result;
|
||||
@ -203,16 +206,17 @@ _nss_nisplus_getpwnam_r (const char *name, struct passwd *pw,
|
||||
|
||||
nis_freeresult (result);
|
||||
|
||||
if (parse_res == -1)
|
||||
if (parse_res < 1)
|
||||
{
|
||||
*errnop = ERANGE;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
if (parse_res == -1)
|
||||
{
|
||||
*errnop = ERANGE;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
}
|
||||
else
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
}
|
||||
|
||||
if (parse_res)
|
||||
return NSS_STATUS_SUCCESS;
|
||||
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
return NSS_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
@ -249,15 +253,16 @@ _nss_nisplus_getpwuid_r (const uid_t uid, struct passwd *pw,
|
||||
|
||||
nis_freeresult (result);
|
||||
|
||||
if (parse_res == -1)
|
||||
if (parse_res < 1)
|
||||
{
|
||||
*errnop = ERANGE;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
if (parse_res == -1)
|
||||
{
|
||||
*errnop = ERANGE;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
}
|
||||
else
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
}
|
||||
|
||||
if (parse_res)
|
||||
return NSS_STATUS_SUCCESS;
|
||||
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
return NSS_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
@ -320,16 +320,16 @@ _nss_nisplus_getrpcbyname_r (const char *name, struct rpcent *rpc,
|
||||
|
||||
nis_freeresult (result);
|
||||
|
||||
if (parse_res == -1)
|
||||
if (parse_res < 1)
|
||||
{
|
||||
*errnop = ERANGE;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
if (parse_res == -1)
|
||||
{
|
||||
*errnop = ERANGE;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
}
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
}
|
||||
|
||||
if (parse_res)
|
||||
return NSS_STATUS_SUCCESS;
|
||||
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
return NSS_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
@ -367,15 +367,16 @@ _nss_nisplus_getrpcbynumber_r (const int number, struct rpcent *rpc,
|
||||
|
||||
nis_freeresult (result);
|
||||
|
||||
if (parse_res == -1)
|
||||
if (parse_res < 1)
|
||||
{
|
||||
*errnop = ERANGE;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
if (parse_res == -1)
|
||||
{
|
||||
*errnop = ERANGE;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
}
|
||||
else
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
}
|
||||
|
||||
if (parse_res)
|
||||
return NSS_STATUS_SUCCESS;
|
||||
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
return NSS_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ _nss_nisplus_parse_servent (nis_result *result, struct servent *serv,
|
||||
{
|
||||
/* Skip leading blanks. */
|
||||
while (isspace (*line))
|
||||
line++;
|
||||
++line;
|
||||
|
||||
if (*line == '\0')
|
||||
break;
|
||||
@ -332,16 +332,17 @@ _nss_nisplus_getservbyname_r (const char *name, const char *protocol,
|
||||
errnop);
|
||||
nis_freeresult (result);
|
||||
|
||||
if (parse_res == -1)
|
||||
if (parse_res < 1)
|
||||
{
|
||||
*errnop = ERANGE;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
if (parse_res == -1)
|
||||
{
|
||||
*errnop = ERANGE;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
}
|
||||
else
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
}
|
||||
|
||||
if (parse_res)
|
||||
return NSS_STATUS_SUCCESS;
|
||||
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
return NSS_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
@ -386,15 +387,16 @@ _nss_nisplus_getservbynumber_r (const int number, const char *protocol,
|
||||
errnop);
|
||||
nis_freeresult (result);
|
||||
|
||||
if (parse_res == -1)
|
||||
if (parse_res < 1)
|
||||
{
|
||||
*errnop = ERANGE;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
if (parse_res == -1)
|
||||
{
|
||||
*errnop = ERANGE;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
}
|
||||
else
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
}
|
||||
|
||||
if (parse_res)
|
||||
return NSS_STATUS_SUCCESS;
|
||||
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
return NSS_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
@ -177,8 +177,11 @@ _nss_nisplus_getspnam_r (const char *name, struct spwd *sp,
|
||||
return status;
|
||||
}
|
||||
|
||||
if (name == NULL || strlen (name) > 8)
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
if (name == NULL)
|
||||
{
|
||||
*errnop = EINVAL;
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
}
|
||||
else
|
||||
{
|
||||
nis_result *result;
|
||||
@ -200,15 +203,16 @@ _nss_nisplus_getspnam_r (const char *name, struct spwd *sp,
|
||||
errnop);
|
||||
nis_freeresult (result);
|
||||
|
||||
if (parse_res == -1)
|
||||
if (parse_res < 1)
|
||||
{
|
||||
*errnop = ERANGE;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
if (parse_res == -1)
|
||||
{
|
||||
*errnop = ERANGE;
|
||||
return NSS_STATUS_TRYAGAIN;
|
||||
}
|
||||
else
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
}
|
||||
|
||||
if (parse_res)
|
||||
return NSS_STATUS_SUCCESS;
|
||||
|
||||
return NSS_STATUS_NOTFOUND;
|
||||
return NSS_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user