This is needed for make_session_info_from_username() to fill in the domain
name. The callchain goes like this:
make_session_info_from_username()
-> make_server_info_pw()
-> passwd_to_SamInfo3()
Other callers of passwd_to_SamInfo3() are also affected. A subsequent change
will let set_conn_force_user_group() user the domainname from the session_info
returned from make_session_info_from_username() to create substitution
context. Without this fix domain name would be NULL.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
goto done;
}
+ info3->base.logon_domain.string = talloc_strdup(info3, domain_name);
+ if (info3->base.logon_domain.string == NULL) {
+ status = NT_STATUS_NO_MEMORY;
+ goto done;
+ }
+
ZERO_STRUCT(domain_sid);
status = SamInfo3_handle_sids(unix_username,