mirror of
https://github.com/samba-team/samba.git
synced 2025-01-13 13:18:06 +03:00
ntlm_auth: test should honour configfile option to run on build farm.
(This used to be commit 11c9c1536b
)
This commit is contained in:
parent
582e224af5
commit
5b5d56d84a
source3
@ -13,9 +13,9 @@ then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
testit "ntlm_auth" $VALGRIND $SRCDIR/torture/test_ntlm_auth.py $BINDIR/ntlm_auth || failed=`expr $failed + 1`
|
testit "ntlm_auth" $VALGRIND $SRCDIR/torture/test_ntlm_auth.py $BINDIR/ntlm_auth --configfile $CONFFILE || failed=`expr $failed + 1`
|
||||||
# This should work even with NTLMv2
|
# This should work even with NTLMv2
|
||||||
testit "ntlm_auth" $VALGRIND $SRCDIR/torture/test_ntlm_auth.py $BINDIR/ntlm_auth --client-domain=fOo --server-domain=fOo || failed=`expr $failed + 1`
|
testit "ntlm_auth" $VALGRIND $SRCDIR/torture/test_ntlm_auth.py $BINDIR/ntlm_auth --configfile $CONFFILE --client-domain=fOo --server-domain=fOo || failed=`expr $failed + 1`
|
||||||
|
|
||||||
|
|
||||||
testok $0 $failed
|
testok $0 $failed
|
||||||
|
@ -70,6 +70,7 @@ def parseCommandLine():
|
|||||||
parser.set_defaults(server_password="secret")
|
parser.set_defaults(server_password="secret")
|
||||||
parser.set_defaults(server_domain="FOO")
|
parser.set_defaults(server_domain="FOO")
|
||||||
parser.set_defaults(server_helper="squid-2.5-ntlmssp")
|
parser.set_defaults(server_helper="squid-2.5-ntlmssp")
|
||||||
|
parser.set_defaults(config_file="/etc/samba/smb.conf")
|
||||||
|
|
||||||
parser.add_option("--client-username", dest="client_username",\
|
parser.add_option("--client-username", dest="client_username",\
|
||||||
help="User name for the client. [default: foo]")
|
help="User name for the client. [default: foo]")
|
||||||
@ -89,6 +90,9 @@ def parseCommandLine():
|
|||||||
parser.add_option("--server-helper", dest="server_helper",\
|
parser.add_option("--server-helper", dest="server_helper",\
|
||||||
help="Helper mode for the ntlm_auth server. [default: squid-2.5-server]")
|
help="Helper mode for the ntlm_auth server. [default: squid-2.5-server]")
|
||||||
|
|
||||||
|
parser.add_option("-s", "--configfile", dest="config_file",\
|
||||||
|
help="Path to smb.conf file. [default:/etc/samba/smb.conf")
|
||||||
|
|
||||||
(opts, args) = parser.parse_args()
|
(opts, args) = parser.parse_args()
|
||||||
if len(args) != 1:
|
if len(args) != 1:
|
||||||
parser.error("Invalid number of arguments.")
|
parser.error("Invalid number of arguments.")
|
||||||
@ -129,6 +133,7 @@ def main():
|
|||||||
client_args.append("--username=%s" % opts.client_username)
|
client_args.append("--username=%s" % opts.client_username)
|
||||||
client_args.append("--password=%s" % opts.client_password)
|
client_args.append("--password=%s" % opts.client_password)
|
||||||
client_args.append("--domain=%s" % opts.client_domain)
|
client_args.append("--domain=%s" % opts.client_domain)
|
||||||
|
client_args.append("--configfile=%s" % opts.config_file)
|
||||||
|
|
||||||
os.execv(ntlm_auth_path, client_args)
|
os.execv(ntlm_auth_path, client_args)
|
||||||
|
|
||||||
@ -161,6 +166,7 @@ def main():
|
|||||||
server_args.append("--username=%s" % opts.server_username)
|
server_args.append("--username=%s" % opts.server_username)
|
||||||
server_args.append("--password=%s" % opts.server_password)
|
server_args.append("--password=%s" % opts.server_password)
|
||||||
server_args.append("--domain=%s" % opts.server_domain)
|
server_args.append("--domain=%s" % opts.server_domain)
|
||||||
|
server_args.append("--configfile=%s" % opts.config_file)
|
||||||
|
|
||||||
os.execv(ntlm_auth_path, server_args)
|
os.execv(ntlm_auth_path, server_args)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user