summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-06-22 12:19:05 -0700
committerJeremy Allison <jra@samba.org>2010-06-22 12:19:05 -0700
commit37264e5917cace1582f41d6029a857fd4059eff6 (patch)
treeeb21b53f19ba2fa235d655142116a243ae5ef084 /source3
parent1e897f656104f29769b204dc443f1684395d8173 (diff)
downloadsamba-37264e5917cace1582f41d6029a857fd4059eff6.tar.gz
samba-37264e5917cace1582f41d6029a857fd4059eff6.tar.bz2
samba-37264e5917cace1582f41d6029a857fd4059eff6.zip
Fix bug 7528 - Solaris with NIS autohome.
Ensure entries containing "\n" are stripped. Jeremy.
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 88e4557d60..d7e765d1af 100644
--- 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;