diff options
author | Gerald Carter <jerry@samba.org> | 2005-10-17 16:44:26 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:05:01 -0500 |
commit | 846d52efaed2c3272c2327dcded76b2d335d53d2 (patch) | |
tree | 8c7049bf719814414ab246aa9bef3e365e7f93f3 /source3/libsmb | |
parent | c246649e3d7fb828b6d1c9531dfea40c92e2e368 (diff) | |
download | samba-846d52efaed2c3272c2327dcded76b2d335d53d2.tar.gz samba-846d52efaed2c3272c2327dcded76b2d335d53d2.tar.bz2 samba-846d52efaed2c3272c2327dcded76b2d335d53d2.zip |
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)
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/libsmbclient.c | 36 |
1 files changed, 19 insertions, 17 deletions
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); |