mirror of
https://github.com/samba-team/samba.git
synced 2025-03-27 22:50:26 +03:00
selftest: Set winbind separator = /
This avoids a pile of shell-script escape pain, and fixes some tests. Andrew Bartlett Change-Id: Ie1d0e32ab484a5b0ddbc4073831fe6de27e38e92 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
parent
b2c0a6a851
commit
2b558f2096
@ -74,24 +74,24 @@ testit "add ldap group mapping record" $VALGRIND $ldbadd -H ldap://$DC_SERVER -U
|
||||
|
||||
rm -f $PREFIX/tmpldbmodify
|
||||
|
||||
testit "wbinfo --name-to-sid" $wbinfo --name-to-sid "$DOMAIN\\$USERNAME" || failed=$(expr $failed + 1)
|
||||
user_sid=$($wbinfo -n "$DOMAIN\\$USERNAME" | cut -d " " -f1)
|
||||
echo "$DOMAIN\\$USERNAME resolved to $user_sid"
|
||||
testit "wbinfo --name-to-sid" $wbinfo --name-to-sid "$DOMAIN/$USERNAME" || failed=$(expr $failed + 1)
|
||||
user_sid=$($wbinfo -n "$DOMAIN/$USERNAME" | cut -d " " -f1)
|
||||
echo "$DOMAIN/$USERNAME resolved to $user_sid"
|
||||
|
||||
testit "wbinfo --sid-to-uid=$user_sid" $wbinfo --sid-to-uid=$user_sid || failed=$(expr $failed + 1)
|
||||
user_uid=$($wbinfo --sid-to-uid=$user_sid | cut -d " " -f1)
|
||||
echo "$DOMAIN\\$USERNAME resolved to $user_uid"
|
||||
echo "$DOMAIN/$USERNAME resolved to $user_uid"
|
||||
|
||||
testit "test $user_uid -eq $USERUID" test $user_uid -eq $USERUID || failed=$(expr $failed + 1)
|
||||
|
||||
# Not sure how to get group names with spaces to resolve through testit
|
||||
#testit "wbinfo --name-to-sid" $wbinfo --name-to-sid="$DOMAIN\\$GROUPNAME" || failed=$(expr $failed + 1)
|
||||
group_sid=$($wbinfo --name-to-sid="$DOMAIN\\$GROUPNAME" | cut -d " " -f1)
|
||||
echo "$DOMAIN\\$GROUPNAME resolved to $group_sid"
|
||||
#testit "wbinfo --name-to-sid" $wbinfo --name-to-sid="$DOMAIN/$GROUPNAME" || failed=$(expr $failed + 1)
|
||||
group_sid=$($wbinfo --name-to-sid="$DOMAIN/$GROUPNAME" | cut -d " " -f1)
|
||||
echo "$DOMAIN/$GROUPNAME resolved to $group_sid"
|
||||
|
||||
testit "wbinfo --sid-to-gid=$group_sid" $wbinfo --sid-to-gid=$group_sid || failed=$(expr $failed + 1)
|
||||
group_gid=$($wbinfo --sid-to-gid=$group_sid | cut -d " " -f1)
|
||||
echo "$DOMAIN\\$GROUPNAME resolved to $group_gid"
|
||||
echo "$DOMAIN/$GROUPNAME resolved to $group_gid"
|
||||
|
||||
testit "test $group_gid -eq $GROUPGID" test $group_gid -eq $GROUPGID || failed=$(expr $failed + 1)
|
||||
|
||||
|
@ -242,7 +242,6 @@
|
||||
#
|
||||
# The Samba4 winbind does not cover the full winbind protocol, so these are expected
|
||||
#
|
||||
^samba3.winbind.struct.info\(plugin_s4_dc\)
|
||||
^samba3.winbind.struct.show_sequence\(plugin_s4_dc\)
|
||||
^samba3.winbind.wbclient.wbcPingDc\(plugin_s4_dc\)
|
||||
^samba3.winbind.wbclient.wbcPingDc2\(plugin_s4_dc\)
|
||||
|
@ -545,6 +545,7 @@ sub write_clientconf($$$)
|
||||
resolv:host file = $prefix_abs/dns_host_file
|
||||
#We don't want to run 'speed' tests for very long
|
||||
torture:timelimit = 1
|
||||
winbind separator = /
|
||||
";
|
||||
close(CF);
|
||||
}
|
||||
|
@ -1020,6 +1020,7 @@ sub provision($$$$$$)
|
||||
idmap config * : range = 100000-200000
|
||||
winbind enum users = yes
|
||||
winbind enum groups = yes
|
||||
winbind separator = /
|
||||
|
||||
# min receivefile size = 4000
|
||||
|
||||
|
@ -15,7 +15,7 @@ def flush_cache():
|
||||
|
||||
domain = subprocess.Popen([wbinfo, "--own-domain"],
|
||||
stdout=subprocess.PIPE).communicate()[0].strip()
|
||||
domsid = subprocess.Popen([wbinfo, "-n", domain + "\\"],
|
||||
domsid = subprocess.Popen([wbinfo, "-n", domain + "/"],
|
||||
stdout=subprocess.PIPE).communicate()[0]
|
||||
domsid = domsid.split(' ')[0]
|
||||
|
||||
|
@ -126,7 +126,7 @@ for env in ["s3dc", "member", "s3member", "dc", "s4member"]:
|
||||
|
||||
for env in ["s3dc", "member", "s3member"]:
|
||||
plantestsuite("samba3.blackbox.smbclient_auth.plain (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IP', '$DC_USERNAME', '$DC_PASSWORD', smbclient3, configuration])
|
||||
plantestsuite("samba3.blackbox.smbclient_auth.plain (%s) member creds" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IP', '$SERVER\\\\$USERNAME', '$PASSWORD', smbclient3, configuration])
|
||||
plantestsuite("samba3.blackbox.smbclient_auth.plain (%s) member creds" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IP', '$SERVER/$USERNAME', '$PASSWORD', smbclient3, configuration])
|
||||
|
||||
tests = ["--ping", "--separator",
|
||||
"--own-domain",
|
||||
@ -144,10 +144,10 @@ for env in ["s3dc", "member", "s3member"]:
|
||||
#Didn't pass yet# "--domain-users",
|
||||
"--domain-groups",
|
||||
"--name-to-sid=$DC_USERNAME",
|
||||
"--name-to-sid=$DOMAIN\\\\$DC_USERNAME",
|
||||
"--name-to-sid=$DOMAIN/$DC_USERNAME",
|
||||
#Didn't pass yet# "--user-info=$USERNAME",
|
||||
"--user-groups=$DOMAIN\\\\$DC_USERNAME",
|
||||
"--authenticate=$DOMAIN\\\\$DC_USERNAME%$DC_PASSWORD",
|
||||
"--user-groups=$DOMAIN/$DC_USERNAME",
|
||||
"--authenticate=$DOMAIN/$DC_USERNAME%$DC_PASSWORD",
|
||||
"--allocate-uid",
|
||||
"--allocate-gid"]
|
||||
|
||||
@ -168,7 +168,7 @@ for env in ["member", "s3member"]:
|
||||
plantestsuite("samba3.blackbox.net_cred_change.(%s:local)" % env, "%s:local" % env, [os.path.join(samba3srcdir, "script/tests/test_net_cred_change.sh"), configuration])
|
||||
|
||||
env = "s3member"
|
||||
t = "--krb5auth=$DOMAIN\\\\$DC_USERNAME%$DC_PASSWORD"
|
||||
t = "--krb5auth=$DOMAIN/$DC_USERNAME%$DC_PASSWORD"
|
||||
plantestsuite("samba3.wbinfo_simple.(%s:local).%s" % (env, t), "%s:local" % env, [os.path.join(srcdir(), "nsswitch/tests/test_wbinfo_simple.sh"), t])
|
||||
|
||||
plantestsuite("samba3.ntlm_auth.krb5(ktest:local) old ccache", "ktest:local", [os.path.join(samba3srcdir, "script/tests/test_ntlm_auth_krb5.sh"), valgrindify(python), samba3srcdir, ntlm_auth3, '$PREFIX/ktest/krb5_ccache-2', '$SERVER', configuration])
|
||||
@ -187,13 +187,13 @@ for env in ["s3dc"]:
|
||||
plantestsuite("samba3.blackbox.smbclient_s3.plain (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_s3.sh"), '$SERVER', '$SERVER_IP', '$DOMAIN', '$DC_USERNAME', '$DC_PASSWORD', '$USERID', '$LOCAL_PATH', '$PREFIX', smbclient3, wbinfo, net, configuration])
|
||||
|
||||
for env in ["member", "s3member"]:
|
||||
plantestsuite("samba3.blackbox.smbclient_s3.plain (%s) member creds" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_s3.sh"), '$SERVER', '$SERVER_IP', '$SERVER', '$SERVER\\\\$USERNAME', '$PASSWORD', '$USERID', '$LOCAL_PATH', '$PREFIX', smbclient3, wbinfo, net, configuration])
|
||||
plantestsuite("samba3.blackbox.smbclient_s3.plain (%s) member creds" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_s3.sh"), '$SERVER', '$SERVER_IP', '$SERVER', '$SERVER/$USERNAME', '$PASSWORD', '$USERID', '$LOCAL_PATH', '$PREFIX', smbclient3, wbinfo, net, configuration])
|
||||
|
||||
for env in ["s3dc"]:
|
||||
plantestsuite("samba3.blackbox.smbclient_s3.sign (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_s3.sh"), '$SERVER', '$SERVER_IP', '$DOMAIN', '$DC_USERNAME', '$DC_PASSWORD', '$USERID', '$LOCAL_PATH', '$PREFIX', smbclient3, wbinfo, net, configuration, "--signing=required"])
|
||||
|
||||
for env in ["member", "s3member"]:
|
||||
plantestsuite("samba3.blackbox.smbclient_s3.sign (%s) member creds" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_s3.sh"), '$SERVER', '$SERVER_IP', '$SERVER', '$SERVER\\\\$USERNAME', '$PASSWORD', '$USERID', '$LOCAL_PATH', '$PREFIX', smbclient3, wbinfo, net, configuration, "--signing=required"])
|
||||
plantestsuite("samba3.blackbox.smbclient_s3.sign (%s) member creds" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_s3.sh"), '$SERVER', '$SERVER_IP', '$SERVER', '$SERVER/$USERNAME', '$PASSWORD', '$USERID', '$LOCAL_PATH', '$PREFIX', smbclient3, wbinfo, net, configuration, "--signing=required"])
|
||||
|
||||
for env in ["s3dc"]:
|
||||
# encrypted
|
||||
|
@ -1034,7 +1034,7 @@ static bool torture_winbind_struct_lookup_name_sid(struct torture_context *tortu
|
||||
get_winbind_domain(torture, &domain);
|
||||
do {
|
||||
count++;
|
||||
invalid_name = talloc_asprintf(torture, "%s\\%s%u",
|
||||
invalid_name = talloc_asprintf(torture, "%s/%s%u",
|
||||
domain,
|
||||
invalid_user, count);
|
||||
} while(name_is_in_list(invalid_name, (const char **)users) ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user