summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorRichard Sharpe <sharpe@samba.org>2003-04-04 23:39:16 +0000
committerRichard Sharpe <sharpe@samba.org>2003-04-04 23:39:16 +0000
commita59565bf3803c09e41559b2424baf812a1f49d33 (patch)
tree2947980714031f33f36fdba359c3031d9b7d520b /source3/utils
parent8f19f822564cbf87359ed908292d0a5ae198fa25 (diff)
downloadsamba-a59565bf3803c09e41559b2424baf812a1f49d33.tar.gz
samba-a59565bf3803c09e41559b2424baf812a1f49d33.tar.bz2
samba-a59565bf3803c09e41559b2424baf812a1f49d33.zip
Some more good stuff from coolo.
(This used to be commit 41b320ffc560117c0184999e30cc69723f40acbe)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/smbtree.c61
1 files changed, 0 insertions, 61 deletions
diff --git a/source3/utils/smbtree.c b/source3/utils/smbtree.c
index d245c324dd..cbe1bd448f 100644
--- a/source3/utils/smbtree.c
+++ b/source3/utils/smbtree.c
@@ -65,67 +65,6 @@ static void add_name(const char *machine_name, uint32 server_type,
DLIST_ADD(*name_list, new_name);
}
-/* Return a cli_state pointing at the IPC$ share for the given server */
-
-static struct cli_state *get_ipc_connect(char *server, struct in_addr *server_ip,
- struct user_auth_info *user_info)
-{
- struct cli_state *cli;
- pstring myname;
- NTSTATUS nt_status;
-
- get_myname(myname);
-
- nt_status = cli_full_connection(&cli, myname, server, server_ip, 0, "IPC$", "IPC",
- user_info->username, lp_workgroup(), user_info->password,
- CLI_FULL_CONNECTION_ANNONYMOUS_FALLBACK, NULL);
-
- if (NT_STATUS_IS_OK(nt_status)) {
- return cli;
- } else {
- return NULL;
- }
-}
-
-/* Return the IP address and workgroup of a master browser on the
- network. */
-
-static struct cli_state *get_ipc_connect_master_ip_bcast(pstring workgroup, struct user_auth_info *user_info)
-{
- struct in_addr *ip_list;
- struct cli_state *cli;
- int i, count;
- struct in_addr server_ip;
-
- /* Go looking for workgroups by broadcasting on the local network */
-
- if (!name_resolve_bcast(MSBROWSE, 1, &ip_list, &count)) {
- return False;
- }
-
- for (i = 0; i < count; i++) {
- static fstring name;
-
- if (!name_status_find("*", 0, 0x1d, ip_list[i], name))
- continue;
-
- if (!find_master_ip(name, &server_ip))
- continue;
-
- pstrcpy(workgroup, name);
-
- DEBUG(4, ("found master browser %s, %s\n",
- name, inet_ntoa(ip_list[i])));
-
- if (!(cli = get_ipc_connect(inet_ntoa(server_ip), &server_ip, user_info)))
- continue;
-
- return cli;
- }
-
- return NULL;
-}
-
/****************************************************************************
display tree of smb workgroups, servers and shares
****************************************************************************/