diff options
author | Gerald Carter <jerry@samba.org> | 2005-10-17 16:44:26 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2005-10-17 16:44:26 +0000 |
commit | 1be49f2db6ea98b1a9a4ef324756c264251e9c45 (patch) | |
tree | 77d7935291e28374e17376cb9e40c453fb36b736 /source/libsmb/libsmbclient.c | |
parent | 7e6a8983f19613564cce05b2c0b1187f79eb767a (diff) | |
download | samba-1be49f2db6ea98b1a9a4ef324756c264251e9c45.tar.gz samba-1be49f2db6ea98b1a9a4ef324756c264251e9c45.tar.xz samba-1be49f2db6ea98b1a9a4ef324756c264251e9c45.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
Diffstat (limited to 'source/libsmb/libsmbclient.c')
-rw-r--r-- | source/libsmb/libsmbclient.c | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/source/libsmb/libsmbclient.c b/source/libsmb/libsmbclient.c index 9c7376da449..8a8211d34a2 100644 --- a/source/libsmb/libsmbclient.c +++ b/source/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); |