diff options
author | Derrell Lipman <derrell@samba.org> | 2005-12-14 04:00:58 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:05:50 -0500 |
commit | 62a02b8f2a1fcb66881a9c9636e0b27e3049c5a1 (patch) | |
tree | cc418c07846dede32cd3753c83ae86a607f11548 /source/libsmb/clientgen.c | |
parent | e461143639889da78cd4de47df40ac59a5a758a4 (diff) | |
download | samba-62a02b8f2a1fcb66881a9c9636e0b27e3049c5a1.tar.gz |
r12225: r11729@cabra: derrell | 2005-12-13 22:59:45 -0500
1. Fix a crash bug which should have reared its ugly head ages ago, but for
some reason, remained dormant until recently. The bug pertained to
libsmbclient doing a structure assignment of a cli after having opened a
pipe. The pipe open code makes a copy of the cli pointer that was passed
to it. If the cli is later copied (and that cli pointer that was saved
is no longer valid), the pipe code will cause a crash during shutdown or
when the copied cli is closed.
2. The 'type' field in enumerated shares was not being set correctly with
the new RPC-based mechanism for enumerating shares.
Diffstat (limited to 'source/libsmb/clientgen.c')
-rw-r--r-- | source/libsmb/clientgen.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/libsmb/clientgen.c b/source/libsmb/clientgen.c index 6dc7386c03b..2f980adcf87 100644 --- a/source/libsmb/clientgen.c +++ b/source/libsmb/clientgen.c @@ -358,11 +358,13 @@ struct cli_state *cli_initialise(struct cli_state *cli) void cli_rpc_pipe_close(struct rpc_pipe_client *cli) { if (!cli_close(cli->cli, cli->fnum)) { - DEBUG(0,("cli_rpc_pipe_close: cli_close failed on pipe %s " - "to machine %s. Error was %s\n", - cli->pipe_name, - cli->cli->desthost, - cli_errstr(cli->cli))); + DEBUG(0,("cli_rpc_pipe_close: cli_close failed on pipe %s, " + "fnum 0x%x " + "to machine %s. Error was %s\n", + cli->pipe_name, + (int) cli->fnum, + cli->cli->desthost, + cli_errstr(cli->cli))); } if (cli->auth.cli_auth_data_free_func) { |