summaryrefslogtreecommitdiff
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
commit5eccc9061bcaa1e225dea189ec99e9f53df66bca (patch)
tree2d7f1ed3b99588f93d91bff49c570d144367b48f
parent11ce0f4d2d493702386c0bd49c8e2dd2aad84d56 (diff)
downloadsamba-5eccc9061bcaa1e225dea189ec99e9f53df66bca.tar.gz
samba-5eccc9061bcaa1e225dea189ec99e9f53df66bca.tar.bz2
samba-5eccc9061bcaa1e225dea189ec99e9f53df66bca.zip
added -b option
(This used to be commit 1c2618df450ddde7e52ab8784fcdd2b64a85771e)
-rw-r--r--source3/utils/smbtree.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source3/utils/smbtree.c b/source3/utils/smbtree.c
index f3d3d2ae31..0f824f7ecf 100644
--- a/source3/utils/smbtree.c
+++ b/source3/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);