mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
selftest: add samba3.blackbox.registry_share
This demonstrates the regression introduced by
f03665bb7e
, where
registry shares are no longer listed.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15243
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15266
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Walker <awalker@ixsystems.com>
This commit is contained in:
parent
08be04bb93
commit
a00c7395fb
1
selftest/knownfail.d/registry_share
Normal file
1
selftest/knownfail.d/registry_share
Normal file
@ -0,0 +1 @@
|
||||
^samba3.blackbox.registry_share.Test.for.share.enum.with.registry.share.clusteredmember
|
@ -532,6 +532,36 @@ sub setup_clusteredmember
|
||||
return undef;
|
||||
}
|
||||
|
||||
my $registry_share_template = "$node_ret->{SERVERCONFFILE}.registry_share_template";
|
||||
unless (open(REGISTRYCONF, ">$registry_share_template")) {
|
||||
warn("Unable to open $registry_share_template");
|
||||
teardown_env($self, $node_ret);
|
||||
teardown_env($self, $ctdb_data);
|
||||
return undef;
|
||||
}
|
||||
|
||||
print REGISTRYCONF "
|
||||
[registry_share]
|
||||
copy = tmp
|
||||
comment = smb username is [%U]
|
||||
";
|
||||
|
||||
close(REGISTRYCONF);
|
||||
|
||||
my $net = Samba::bindir_path($self, "net");
|
||||
my $cmd = "";
|
||||
|
||||
$cmd .= "UID_WRAPPER_ROOT=1 ";
|
||||
$cmd .= "$net conf import $node_ret->{CONFIGURATION} ${registry_share_template}";
|
||||
|
||||
my $net_ret = system($cmd);
|
||||
if ($net_ret != 0) {
|
||||
warn("net conf import failed: $net_ret\n$cmd");
|
||||
teardown_env($self, $node_ret);
|
||||
teardown_env($self, $ctdb_data);
|
||||
return undef;
|
||||
}
|
||||
|
||||
my $nmblookup = Samba::bindir_path($self, "nmblookup");
|
||||
do {
|
||||
print "Waiting for the LOGON SERVER registration ...\n";
|
||||
|
39
source3/script/tests/test_registry_share.sh
Executable file
39
source3/script/tests/test_registry_share.sh
Executable file
@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
# Blackbox tests for registry shares
|
||||
#
|
||||
|
||||
if [ $# -lt 3 ]; then
|
||||
cat <<EOF
|
||||
Usage: test_registry_share.sh SERVER USERNAME PASSWORD
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SERVER=$1
|
||||
USERNAME=$2
|
||||
PASSWORD=$3
|
||||
shift 3
|
||||
failed=0
|
||||
|
||||
samba_bindir="$BINDIR"
|
||||
samba_srcdir="$SRCDIR"
|
||||
smbclient="$samba_bindir/smbclient"
|
||||
rpcclient="$samba_bindir/rpcclient"
|
||||
|
||||
. $samba_srcdir/testprogs/blackbox/subunit.sh
|
||||
. $samba_srcdir/testprogs/blackbox/common_test_fns.inc
|
||||
|
||||
test_smbclient \
|
||||
"Test access to registry share [${USERNAME}]" \
|
||||
"ls" "//${SERVER}/registry_share" "-U$USERNAME%$PASSWORD" ||
|
||||
failed=$((failed + 1))
|
||||
|
||||
testit_grep_count \
|
||||
"Test for share enum with registry share" \
|
||||
"netname: registry_share" \
|
||||
1 \
|
||||
${rpcclient} "ncacn_np:${SERVER}" "-U$USERNAME%$PASSWORD" \
|
||||
-c netshareenum ||
|
||||
failed=$((failed + 1))
|
||||
|
||||
testok "$0" "$failed"
|
@ -1497,6 +1497,10 @@ plantestsuite("samba3.blackbox.smbXsrv_client_cross_node", "clusteredmember:loca
|
||||
configuration,
|
||||
'ctdb0', 'ctdb1',
|
||||
"tmp"])
|
||||
plantestsuite("samba3.blackbox.registry_share", "clusteredmember",
|
||||
[os.path.join(samba3srcdir,
|
||||
"script/tests/test_registry_share.sh"),
|
||||
"$SERVER", '$DC_USERNAME', "$DC_PASSWORD"])
|
||||
|
||||
env = 'fileserver'
|
||||
plantestsuite("samba3.blackbox.virus_scanner", "%s:local" % (env),
|
||||
|
Loading…
Reference in New Issue
Block a user