From 846d52efaed2c3272c2327dcded76b2d335d53d2 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 17 Oct 2005 16:44:26 +0000 Subject: r11124: Commit Chris' fixes for libmsrpc after the rpc_client rewrite. His comments: I've gotten the libmsrpc code to work with TRUNK. I've put the patch at: www.uoguelph.ca/~cnicholl/libmsrpc_trunk_v1.patch.gz It is from revision 11093. I also fixed a minor bug in the svcctl code, the timeout parameter for all the control functions was working in milliseconds instead of seconds. Also fixed bug in Makefile when building libmsrpc.a (This used to be commit d3a52900ec223316779e59a13cea87ecb500bccc) --- source3/libsmb/libsmbclient.c | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) (limited to 'source3/libsmb') diff --git a/source3/libsmb/libsmbclient.c b/source3/libsmb/libsmbclient.c index 9c7376da44..8a8211d34a 100644 --- a/source3/libsmb/libsmbclient.c +++ b/source3/libsmb/libsmbclient.c @@ -853,27 +853,29 @@ SMBCSRV *smbc_attr_server(SMBCCTX *context, return NULL; } + if(pol) { pipe_hnd = cli_rpc_pipe_open_noauth(ipc_cli, PI_LSARPC, &nt_status); - if (!pipe_hnd) { - DEBUG(1, ("cli_nt_session_open fail!\n")); - errno = ENOTSUP; - cli_shutdown(ipc_cli); - return NULL; - } + if (!pipe_hnd) { + DEBUG(1, ("cli_nt_session_open fail!\n")); + errno = ENOTSUP; + cli_shutdown(ipc_cli); + return NULL; + } - /* Some systems don't support SEC_RIGHTS_MAXIMUM_ALLOWED, - but NT sends 0x2000000 so we might as well do it too. */ + /* Some systems don't support SEC_RIGHTS_MAXIMUM_ALLOWED, + but NT sends 0x2000000 so we might as well do it too. */ - nt_status = rpccli_lsa_open_policy(pipe_hnd, - ipc_cli->mem_ctx, - True, - GENERIC_EXECUTE_ACCESS, - pol); + nt_status = rpccli_lsa_open_policy(pipe_hnd, + ipc_cli->mem_ctx, + True, + GENERIC_EXECUTE_ACCESS, + pol); - if (!NT_STATUS_IS_OK(nt_status)) { - errno = smbc_errno(context, ipc_cli); - cli_shutdown(ipc_cli); - return NULL; + if (!NT_STATUS_IS_OK(nt_status)) { + errno = smbc_errno(context, ipc_cli); + cli_shutdown(ipc_cli); + return NULL; + } } ipc_srv = SMB_MALLOC_P(SMBCSRV); -- cgit