projects
/
platform
/
upstream
/
linaro-glibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e2779f6
)
(nis_getnames): Make sure that we always return at least one entry consisting of...
author
Ulrich Drepper
<drepper@redhat.com>
Wed, 11 Oct 2006 01:22:51 +0000
(
01:22
+0000)
committer
Ulrich Drepper
<drepper@redhat.com>
Wed, 11 Oct 2006 01:22:51 +0000
(
01:22
+0000)
nis/nis_subr.c
patch
|
blob
|
history
diff --git
a/nis/nis_subr.c
b/nis/nis_subr.c
index
40c9270
..
93e34f1
100644
(file)
--- a/
nis/nis_subr.c
+++ b/
nis/nis_subr.c
@@
-275,6
+275,13
@@
nis_getnames (const_nis_name name)
cp = __strtok_r (NULL, ":", &saveptr);
}
+ if (pos == 0
+ && __asprintf (&getnames[pos++], "%s%s%s%s",
+ name, name[name_len - 1] == '.' ? "" : ".",
+ local_domain,
+ local_domain[local_domain_len - 1] == '.' ? "" : ".") < 0)
+ goto free_null;
+
getnames[pos] = NULL;
return getnames;