summaryrefslogtreecommitdiff
path: root/source/utils
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-08-20 17:38:37 +0000
committerAndrew Tridgell <tridge@samba.org>2001-08-20 17:38:37 +0000
commit1c2618df450ddde7e52ab8784fcdd2b64a85771e (patch)
tree0f2c1a65c957c0ed383204793083266385712879 /source/utils
parent3eba9606f71f90bfd9820af26f8676277ed22390 (diff)
downloadsamba-1c2618df450ddde7e52ab8784fcdd2b64a85771e.tar.gz
added -b option
Diffstat (limited to 'source/utils')
-rw-r--r--source/utils/smbtree.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source/utils/smbtree.c b/source/utils/smbtree.c
index f3d3d2ae312..0f824f7ecf3 100644
--- a/source/utils/smbtree.c
+++ b/source/utils/smbtree.c
@@ -22,6 +22,8 @@
#include "includes.h"
+static BOOL use_bcast;
+
struct user_auth_info {
pstring username;
pstring password;
@@ -43,6 +45,7 @@ static void usage(void)
\t-W workgroup workgroup of user to authenticate as\n\
\t-D list only domains (workgroups) of tree\n\
\t-S list domains and servers of tree\n\
+\t-b use bcast instead of using the master browser\n\
\n\
The username can be of the form username%%password or\n\
workgroup\\username%%password.\n\n\
@@ -211,7 +214,7 @@ static BOOL get_workgroups(struct user_auth_info *user_info)
pstrcpy(master_workgroup, lp_workgroup());
- if (!find_master_ip(lp_workgroup(), &server_ip)) {
+ if (use_bcast || !find_master_ip(lp_workgroup(), &server_ip)) {
DEBUG(4, ("Unable to find master browser for workgroup %s\n",
master_workgroup));
if (!find_master_ip_bcast(master_workgroup, &server_ip)) {
@@ -358,7 +361,7 @@ static BOOL print_tree(struct user_auth_info *user_info)
/* Parse command line args */
- while ((opt = getopt(argc, argv, "U:hd:W:DS")) != EOF) {
+ while ((opt = getopt(argc, argv, "U:hd:W:DSb")) != EOF) {
switch (opt) {
case 'U':
pstrcpy(user_info.username,optarg);
@@ -370,6 +373,10 @@ static BOOL print_tree(struct user_auth_info *user_info)
}
break;
+ case 'b':
+ use_bcast = True;
+ break;
+
case 'h':
usage();
exit(1);