git.samba.org
/
abartlet
/
samba.git
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e897f6
)
Fix bug 7528 - Solaris with NIS autohome.
author
Jeremy Allison
<jra@samba.org>
Tue, 22 Jun 2010 19:19:05 +0000
(12:19 -0700)
committer
Jeremy Allison
<jra@samba.org>
Tue, 22 Jun 2010 19:19:05 +0000
(12:19 -0700)
Ensure entries containing "\n" are stripped.
Jeremy.
source3/lib/util.c
patch
|
blob
|
history
diff --git
a/source3/lib/util.c
b/source3/lib/util.c
index 88e4557d60b247e90fee2f5a0ac27c1046bf5cab..d7e765d1aff279b85c763b0e7ee7a066db0ebe62 100644
(file)
--- a/
source3/lib/util.c
+++ b/
source3/lib/util.c
@@
-1253,6
+1253,9
@@
char *automount_lookup(TALLOC_CTX *ctx, const char *user_name)
if ((nis_error = yp_match(nis_domain, nis_map, user_name,
strlen(user_name), &nis_result,
&nis_result_len)) == 0) {
+ if (nis_result_len > 0 && nis_result[nis_result_len] == '\n') {
+ nis_result[nis_result_len] = '\0';
+ }
value = talloc_strdup(ctx, nis_result);
if (!value) {
return NULL;