diff options
author | Jeremy Allison <jra@samba.org> | 2011-06-01 20:38:48 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2011-06-14 12:58:50 +0200 |
commit | b152f505a9b0fe310ea1d0899c70b395290fade9 (patch) | |
tree | 06cc8cfb6191c9873338061848b3c711e62c727f /source3/lib | |
parent | e4df1eded1a1951cafc247b3f116d504e668dd2d (diff) | |
download | samba-b152f505a9b0fe310ea1d0899c70b395290fade9.tar.gz |
Fix bug #7528 - Solaris with NIS autohome.
(cherry picked from commit 0ffdf2288b1e6798e43259568818378c43b979e5)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/util.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c index 46be349a2c2..238981debc1 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -1312,6 +1312,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; |