summaryrefslogtreecommitdiff
path: root/examples/libsmbclient
diff options
context:
space:
mode:
authorDerrell Lipman <derrell@samba.org>2006-01-07 20:43:28 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:06:02 -0500
commit9a8ca1901c7520a140eaf9208e0b056c93d8471c (patch)
tree65993e47ffd281260d5a79de3a7e0d53fd0368ff /examples/libsmbclient
parent850b7c4e87fe50beb785e95241d592065f616826 (diff)
downloadsamba-9a8ca1901c7520a140eaf9208e0b056c93d8471c.tar.gz
samba-9a8ca1901c7520a140eaf9208e0b056c93d8471c.tar.bz2
samba-9a8ca1901c7520a140eaf9208e0b056c93d8471c.zip
r12757: r12126@cabra: derrell | 2006-01-03 15:21:36 -0500
added flag to not request authentication information (This used to be commit 8396c4b26c9911887ed1c1ce17c31af462ee6883)
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 b5337ae983..ca126c9510 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 (;