mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
s4:torture/winbind: add torture:winbindd_domain_without_prefix option
We should not assume that names in the domain specified by 'torture:winbindd_netbios_domain' have no DOMAIN\ prefix. On an AD DC we prefix all principals. Bug: https://bugzilla.samba.org/show_bug.cgi?id=11183 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Apr 9 19:35:38 CEST 2015 on sn-devel-104
This commit is contained in:
parent
86f29d62a6
commit
0c6c081dc4
@ -368,11 +368,13 @@ plansmbtorture4testsuite('base.xcopy', "ad_dc_ntvfs", ['//$NETBIOSNAME/xcopy_sha
|
||||
plansmbtorture4testsuite('base.xcopy', "s4member", ['//$NETBIOSNAME/xcopy_share', '-k', 'no', '--signing=no', '-U%'], modname="samba4.smb.signing --signing=no anon")
|
||||
|
||||
|
||||
wb_opts = ["--option=\"torture:strict mode=no\"", "--option=\"torture:timelimit=1\"", "--option=\"torture:winbindd_separator=/\"", "--option=\"torture:winbindd_netbios_name=$SERVER\"", "--option=\"torture:winbindd_netbios_domain=$DOMAIN\""]
|
||||
wb_opts_default = ["--option=\"torture:strict mode=no\"", "--option=\"torture:timelimit=1\"", "--option=\"torture:winbindd_separator=/\"", "--option=\"torture:winbindd_netbios_name=$SERVER\"", "--option=\"torture:winbindd_netbios_domain=$DOMAIN\""]
|
||||
|
||||
winbind_ad_client_tests = smbtorture4_testsuites("winbind.struct") + smbtorture4_testsuites("winbind.pac")
|
||||
winbind_wbclient_tests = smbtorture4_testsuites("winbind.wbclient")
|
||||
for env in ["ad_dc", "s4member", "ad_member"]:
|
||||
wb_opts = wb_opts_default
|
||||
wb_opts += ["--option=\"torture:winbindd_domain_without_prefix=$DOMAIN\""]
|
||||
for t in winbind_ad_client_tests:
|
||||
plansmbtorture4testsuite(t, "%s:local" % env, wb_opts + ['//$SERVER/tmp', '--realm=$REALM', '--machine-pass', '--option=torture:addc=$DC_SERVER'])
|
||||
|
||||
|
@ -929,8 +929,8 @@ static bool lookup_name_sid_list(struct torture_context *torture, char **list)
|
||||
char *sid;
|
||||
char *name;
|
||||
const char *domain_name = torture_setting_string(torture,
|
||||
"winbindd_netbios_domain",
|
||||
lpcfg_workgroup(torture->lp_ctx));
|
||||
"winbindd_domain_without_prefix",
|
||||
NULL);
|
||||
|
||||
ZERO_STRUCT(req);
|
||||
ZERO_STRUCT(rep);
|
||||
@ -949,7 +949,9 @@ static bool lookup_name_sid_list(struct torture_context *torture, char **list)
|
||||
|
||||
DO_STRUCT_REQ_REP(WINBINDD_LOOKUPSID, &req, &rep);
|
||||
|
||||
if (strequal(rep.data.name.dom_name, domain_name)) {
|
||||
if (domain_name != NULL &&
|
||||
strequal(rep.data.name.dom_name, domain_name))
|
||||
{
|
||||
name = talloc_asprintf(torture, "%s",
|
||||
rep.data.name.name);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user