mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
Fix bug 7528 - Solaris with NIS autohome.
Ensure entries containing "\n" are stripped. Jeremy.
This commit is contained in:
parent
1e897f6561
commit
37264e5917
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user