Skip to content

Commit

Permalink
2006-08-07 Jakub Jelinek <jakub@redhat.com>
Browse files Browse the repository at this point in the history
            Ulrich Drepper  <drepper@redhat.com>

	* nis/nis_call.c (rec_dirsearch) [case LOWER_NAME]: Don't take
	short cut if only one name component is stripped away.
  • Loading branch information
Ulrich Drepper committed Aug 7, 2006
1 parent bd1ebae commit 13a0293
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2006-08-07 Jakub Jelinek <jakub@redhat.com>
Ulrich Drepper <drepper@redhat.com>

* nis/nis_call.c (rec_dirsearch) [case LOWER_NAME]: Don't take
short cut if only one name component is stripped away.

2006-08-07 Ulrich Drepper <drepper@redhat.com>

* nis/nis_call.c: Minor cleanups throughout.
Expand Down
8 changes: 0 additions & 8 deletions nis/nis_call.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,6 @@ rec_dirsearch (const_nis_name name, directory_obj *dir, nis_error *status)
char domain[namelen + 3];
char ndomain[namelen + 3];
char *cp;
u_int run = 0;

strcpy (domain, name);

Expand All @@ -400,16 +399,9 @@ rec_dirsearch (const_nis_name name, directory_obj *dir, nis_error *status)
nis_leaf_of_r (domain, leaf, sizeof (leaf));
nis_domain_of_r (domain, ndomain, sizeof (ndomain));
strcpy (domain, ndomain);
++run;
}
while (nis_dir_cmp (domain, dir->do_name) != SAME_NAME);

if (run == 1)
{
/* We have found the directory above. Use it. */
return dir;
}

cp = rawmemchr (leaf, '\0');
*cp++ = '.';
strcpy (cp, domain);
Expand Down

0 comments on commit 13a0293

Please sign in to comment.