diff options
author | Alexander Bokovoy <ab@samba.org> | 2008-04-21 11:38:20 +0400 |
---|---|---|
committer | Alexander Bokovoy <ab@samba.org> | 2008-04-21 11:38:20 +0400 |
commit | ff615f232968979f57a31f43a4f668c2c4fd20df (patch) | |
tree | 8e4d6e1181001dd35e32008a3401020c013e288b /source3/client | |
parent | 09caab9f37d6ecd4fd6fe9ce3c284730b232651a (diff) | |
parent | 0db7aba8af80a01150d1061a4192ab814e4234b7 (diff) | |
download | samba-ff615f232968979f57a31f43a4f668c2c4fd20df.tar.gz samba-ff615f232968979f57a31f43a4f668c2c4fd20df.tar.bz2 samba-ff615f232968979f57a31f43a4f668c2c4fd20df.zip |
Merge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into v3-2-test
(This used to be commit 2c3ffc1c53550c8e6feeca8fc0270ef9ac1ec70a)
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/client.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index 882ed4dbdd..b4e1985a83 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -3650,7 +3650,7 @@ static bool browse_host_rpc(bool sort) info_ctr.ctr.ctr1 = &ctr1; status = rpccli_srvsvc_NetShareEnumAll(pipe_hnd, frame, - pipe_hnd->cli->desthost, + pipe_hnd->desthost, &info_ctr, 0xffffffff, &total_entries, @@ -3658,7 +3658,7 @@ static bool browse_host_rpc(bool sort) &werr); if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(werr)) { - cli_rpc_pipe_close(pipe_hnd); + TALLOC_FREE(pipe_hnd); TALLOC_FREE(frame); return false; } @@ -3668,7 +3668,7 @@ static bool browse_host_rpc(bool sort) browse_fn(info.name, info.type, info.comment, NULL); } - cli_rpc_pipe_close(pipe_hnd); + TALLOC_FREE(pipe_hnd); TALLOC_FREE(frame); return true; } @@ -4514,6 +4514,8 @@ static int process(const char *base_directory) static int do_host_query(const char *query_host) { + struct sockaddr_storage ss; + cli = cli_cm_open(talloc_tos(), NULL, query_host, "IPC$", true, smb_encrypt); if (!cli) @@ -4521,6 +4523,12 @@ static int do_host_query(const char *query_host) browse_host(true); + if (interpret_string_addr(&ss, query_host, 0) && (ss.ss_family != AF_INET)) { + d_printf("%s is an IPv6 address -- no workgroup available\n", + query_host); + return 1; + } + if (port != 139) { /* Workgroups simply don't make sense over anything |