From a44e97c99f61916db3f7cc02cd2581c8d64be73a Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Sat, 3 Sep 2005 16:40:05 +0000 Subject: r10001: adding in libmsrpc from Chris Nicholls (SoC project). not built by default per conversation with Jeremy until the rpc changes from trunk are merged back (This used to be commit e813de1e522692a6471828bf1fdf503d33f8cd72) --- source3/libsmb/libsmbclient.c | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) (limited to 'source3/libsmb') diff --git a/source3/libsmb/libsmbclient.c b/source3/libsmb/libsmbclient.c index 9104a083f5..ce47277c26 100644 --- a/source3/libsmb/libsmbclient.c +++ b/source3/libsmb/libsmbclient.c @@ -835,26 +835,29 @@ SMBCSRV *smbc_attr_server(SMBCCTX *context, return NULL; } - if (!cli_nt_session_open(ipc_cli, PI_LSARPC)) { - 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. */ - - nt_status = cli_lsa_open_policy(ipc_cli, - 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(pol) { + + if (!cli_nt_session_open(ipc_cli, PI_LSARPC)) { + 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. */ + + nt_status = cli_lsa_open_policy(ipc_cli, + 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; + } } ipc_srv = SMB_MALLOC_P(SMBCSRV); -- cgit