diff options
author | Ulrich Drepper <drepper@redhat.com> | 2006-08-07 16:03:46 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2006-08-07 16:03:46 +0000 |
commit | bd1ebae0eb756824f9a8dbc66aa2913733c06354 (patch) | |
tree | ba51c6a301fe6be75fbd23ad5e1073dc0962d5cf /nis/nis_lookup.c | |
parent | fe710250508e0710ac5db1fff1596ac5b092ab64 (diff) | |
download | glibc-bd1ebae0eb756824f9a8dbc66aa2913733c06354.tar glibc-bd1ebae0eb756824f9a8dbc66aa2913733c06354.tar.gz glibc-bd1ebae0eb756824f9a8dbc66aa2913733c06354.tar.bz2 glibc-bd1ebae0eb756824f9a8dbc66aa2913733c06354.zip |
* nis/nis_call.c: Minor cleanups throughout.
(rec_dirsearch) [HIGHER_NAME]: Correctly size ndomain array.
(first_shoot): Add search_parent_first parameter. Only if it is set
search parent server first.
If directory for table found through cold start cache is not the same
as referenced in the cache, don't use it.
(__nisfind_server): Take additional parameter. Pass it on to
first_shoot.
(__prepare_niscall): Adjust __nisfind_server call.
* nis/rpcsvc/nislib.h: Adjust __nisfind_server prototype.
* nis/nis_table.c: Adjust __nisfind_server call.
* nis/nis_lookup.c: Likewise.
(nis_lookup): Don't loop endlessly if name is reduced to ".".
Diffstat (limited to 'nis/nis_lookup.c')
-rw-r--r-- | nis/nis_lookup.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/nis/nis_lookup.c b/nis/nis_lookup.c index c198376464..839ee4ee42 100644 --- a/nis/nis_lookup.c +++ b/nis/nis_lookup.c @@ -127,7 +127,7 @@ nis_lookup (const_nis_name name, const unsigned int flags) /* Otherwise __nisfind_server will not do anything. */ dir = NULL; - if (__nisfind_server (req.ns_name, &dir) + if (__nisfind_server (req.ns_name, 1, &dir) != NIS_SUCCESS) goto out; @@ -147,6 +147,11 @@ nis_lookup (const_nis_name name, const unsigned int flags) nis_domain_of_r (req.ns_name, ndomain, sizeof (ndomain)); req.ns_name = strdupa (ndomain); + if (strcmp (ndomain, ".") == 0) + { + NIS_RES_STATUS (res) = NIS_NAMEUNREACHABLE; + goto out; + } __nisbind_destroy (&bptr); nis_free_directory (dir); |