r24335: Fix -N support.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 11 Aug 2007 18:31:27 +0000 (18:31 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 20:01:39 +0000 (15:01 -0500)
(This used to be commit 18ea767d396bf6d956fd83ee3d2687d98897ae36)

source4/lib/cmdline/popt_credentials.c
testprogs/blackbox/test_smbclient.sh

index e4931cd1ce618d1e25db1a5db248fcbfa93b8a9d..259dbf8ee14a20ef40fe54c4759d1e0ef877f291 100644 (file)
@@ -132,7 +132,7 @@ static void popt_common_credentials_callback(poptContext con,
 struct poptOption popt_common_credentials[] = {
        { NULL, 0, POPT_ARG_CALLBACK|POPT_CBFLAG_PRE|POPT_CBFLAG_POST, (void *)popt_common_credentials_callback },
        { "user", 'U', POPT_ARG_STRING, NULL, 'U', "Set the network username", "[DOMAIN/]USERNAME[%PASSWORD]" },
-       { "no-pass", 'N', POPT_ARG_NONE, &dont_ask, True, "Don't ask for a password" },
+       { "no-pass", 'N', POPT_ARG_NONE, &dont_ask, 'N', "Don't ask for a password" },
        { "password", 0, POPT_ARG_STRING, NULL, OPT_PASSWORD, "Password" },
        { "authentication-file", 'A', POPT_ARG_STRING, NULL, 'A', "Get the credentials from a file", "FILE" },
        { "signing", 'S', POPT_ARG_STRING, NULL, 'S', "Set the client signing state", "on|off|required" },
index f92445d64afd3f07b4d52c65ceac4e88138b7123..b2787e5260513083c74e02cada639d5c72a8ab30 100755 (executable)
@@ -51,6 +51,8 @@ runcmd() {
 
 testit "share and server list" $VALGRIND bin/smbclient -L $SERVER $CONFIGURATION  -W "$DOMAIN" -U"$USERNAME%$PASSWORD" $@ || failed=`expr $failed + 1`
 
+testit "share and server list anonymously" $VALGRIND bin/smbclient -N -L $SERVER $CONFIGURATION $@ || failed=`expr $failed + 1`
+
 testit "domain join" $VALGRIND bin/net join $DOMAIN $CONFIGURATION  -W "$DOMAIN" -U"$USERNAME%$PASSWORD" $@ || failed=`expr $failed + 1`
 
 # Generate random file