git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3eba960
)
added -b option
author
Andrew Tridgell
<tridge@samba.org>
Mon, 20 Aug 2001 17:38:37 +0000
(17:38 +0000)
committer
Andrew Tridgell
<tridge@samba.org>
Mon, 20 Aug 2001 17:38:37 +0000
(17:38 +0000)
source/utils/smbtree.c
patch
|
blob
|
history
diff --git
a/source/utils/smbtree.c
b/source/utils/smbtree.c
index f3d3d2ae312da8a1b926bd78a643215661866bbf..0f824f7ecf3b429f3ce494d90ebc6685df1e7f11 100644
(file)
--- a/
source/utils/smbtree.c
+++ b/
source/utils/smbtree.c
@@
-22,6
+22,8
@@
#include "includes.h"
#include "includes.h"
+static BOOL use_bcast;
+
struct user_auth_info {
pstring username;
pstring password;
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-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\
\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());
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)) {
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 */
/* Parse command line args */
- while ((opt = getopt(argc, argv, "U:hd:W:DS")) != EOF) {
+ while ((opt = getopt(argc, argv, "U:hd:W:DS
b
")) != EOF) {
switch (opt) {
case 'U':
pstrcpy(user_info.username,optarg);
switch (opt) {
case 'U':
pstrcpy(user_info.username,optarg);
@@
-370,6
+373,10
@@
static BOOL print_tree(struct user_auth_info *user_info)
}
break;
}
break;
+ case 'b':
+ use_bcast = True;
+ break;
+
case 'h':
usage();
exit(1);
case 'h':
usage();
exit(1);