mirror of
git://sourceware.org/git/glibc.git
synced 2025-04-24 14:41:06 +08:00
* nis/nis_subr.c (nis_getnames): Add trailing dot to NIS_PATH
components which lack them. * nis/nis_subr.c (nis_getnames): Make sure that we always return at least one entry consisting of the parameter concatenated with the domain.
This commit is contained in:
parent
ef4ae86af0
commit
2a6ee54934
@ -1,3 +1,12 @@
|
|||||||
|
2006-10-10 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* nis/nis_subr.c (nis_getnames): Add trailing dot to NIS_PATH
|
||||||
|
components which lack them.
|
||||||
|
|
||||||
|
* nis/nis_subr.c (nis_getnames): Make sure that we always return
|
||||||
|
at least one entry consisting of the parameter concatenated with
|
||||||
|
the domain.
|
||||||
|
|
||||||
2006-10-10 Roland McGrath <roland@frob.com>
|
2006-10-10 Roland McGrath <roland@frob.com>
|
||||||
|
|
||||||
* sysdeps/mach/hurd/utimes.c: Use a union to avoid an improper cast.
|
* sysdeps/mach/hurd/utimes.c: Use a union to avoid an improper cast.
|
||||||
|
@ -251,13 +251,16 @@ nis_getnames (const_nis_name name)
|
|||||||
{
|
{
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
tmp = malloc (cplen + name_len + 2);
|
tmp = malloc (cplen + name_len + 3);
|
||||||
if (__builtin_expect (tmp == NULL, 0))
|
if (__builtin_expect (tmp == NULL, 0))
|
||||||
goto free_null;
|
goto free_null;
|
||||||
|
|
||||||
p = __stpcpy (tmp, name);
|
p = __mempcpy (tmp, name, name_len);
|
||||||
*p++ = '.';
|
*p++ = '.';
|
||||||
memcpy (p, cp, cplen + 1);
|
p = __mempcpy (p, cp, cplen);
|
||||||
|
if (p[-1] != '.')
|
||||||
|
*p++ = '.';
|
||||||
|
*p = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pos >= count)
|
if (pos >= count)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user