summaryrefslogtreecommitdiffstats
path: root/examples/libsmbclient
diff options
context:
space:
mode:
authorDerrell Lipman <derrell@samba.org>2006-01-07 20:43:28 +0000
committerDerrell Lipman <derrell@samba.org>2006-01-07 20:43:28 +0000
commitfcb173fdc537604a91c2e8d9950dc3960cbdc010 (patch)
treec325ac26fcc0aee10264ed7076cd2eb589cd0532 /examples/libsmbclient
parent4ee0b368a90d4cf71f9ae61da353e665c859653a (diff)
downloadsamba-fcb173fdc537604a91c2e8d9950dc3960cbdc010.tar.gz
samba-fcb173fdc537604a91c2e8d9950dc3960cbdc010.tar.xz
samba-fcb173fdc537604a91c2e8d9950dc3960cbdc010.zip
r12757: r12126@cabra: derrell | 2006-01-03 15:21:36 -0500
added flag to not request authentication information
Diffstat (limited to 'examples/libsmbclient')
-rw-r--r--examples/libsmbclient/testbrowse.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/examples/libsmbclient/testbrowse.c b/examples/libsmbclient/testbrowse.c
index b5337ae983a..ca126c9510f 100644
--- a/examples/libsmbclient/testbrowse.c
+++ b/examples/libsmbclient/testbrowse.c
@@ -30,6 +30,7 @@ main(int argc, char * argv[])
{
int debug = 0;
int debug_stderr = 0;
+ int no_auth = 0;
int scan = 0;
int iterations = -1;
int again;
@@ -59,6 +60,10 @@ main(int argc, char * argv[])
0, "Iterations", "integer"
},
{
+ "noauth", 'A', POPT_ARG_NONE, &no_auth,
+ 0, "Do not request authentication data", "integer"
+ },
+ {
NULL
}
};
@@ -82,9 +87,14 @@ main(int argc, char * argv[])
return 1;
}
+ /* If we're scanning, do no requests for authentication data */
+ if (scan) {
+ no_auth = 1;
+ }
+
/* Set mandatory options (is that a contradiction in terms?) */
context->debug = debug;
- context->callbacks.auth_fn = (scan ? no_auth_data_fn : get_auth_data_fn);
+ context->callbacks.auth_fn = (no_auth ? no_auth_data_fn : get_auth_data_fn);
/* If we've been asked to log to stderr instead of stdout... */
if (debug_stderr) {
@@ -102,7 +112,6 @@ main(int argc, char * argv[])
/* Tell the compatibility layer to use this context */
smbc_set_context(context);
-
if (scan)
{
for (;