From 103f72061705ec79f44aa9ec85af0f6468750ae1 Mon Sep 17 00:00:00 2001 From: Derrell Lipman Date: Wed, 14 Dec 2005 18:15:54 +0000 Subject: r12235: r11738@cabra: derrell | 2005-12-14 13:15:14 -0500 Ensure that when libsmbclient copies a cli, it prevents the cli from later being freed, by turning off the 'allocated' flag. Change a DEBUG message in pipe_open code from level 0 to level 1 since libsmbclient is now regularly attempting to open a pipe for share enumeration, and falling back to RAP if RPC is unavailable (e.g. win98). We don't want the debug message to display when the pipe open fails, under these normal circumstances. (This used to be commit 965025c057d9e00fb68ea0819e675fcf9ad2f819) --- source3/libsmb/libsmbclient.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/libsmb') diff --git a/source3/libsmb/libsmbclient.c b/source3/libsmb/libsmbclient.c index ba57c03aba..15210664b0 100644 --- a/source3/libsmb/libsmbclient.c +++ b/source3/libsmb/libsmbclient.c @@ -774,6 +774,7 @@ SMBCSRV *smbc_server(SMBCCTX *context, ZERO_STRUCTP(srv); srv->cli = c; + srv->cli.allocated = False; srv->dev = (dev_t)(str_checksum(server) ^ str_checksum(share)); srv->no_pathinfo = False; srv->no_pathinfo2 = False; @@ -863,6 +864,7 @@ SMBCSRV *smbc_attr_server(SMBCCTX *context, ZERO_STRUCTP(ipc_srv); ipc_srv->cli = *ipc_cli; + ipc_srv->cli.allocated = False; free(ipc_cli); -- cgit