summaryrefslogtreecommitdiff
path: root/source3/libsmb/libsmbclient.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-09-03 16:40:05 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:03:30 -0500
commita44e97c99f61916db3f7cc02cd2581c8d64be73a (patch)
treeeddb0858f3c436be25c984ec686aad6c04048ce1 /source3/libsmb/libsmbclient.c
parent99c909c2fa2b847e6f55f6f5706d5f46014f8b86 (diff)
downloadsamba-a44e97c99f61916db3f7cc02cd2581c8d64be73a.tar.gz
samba-a44e97c99f61916db3f7cc02cd2581c8d64be73a.tar.bz2
samba-a44e97c99f61916db3f7cc02cd2581c8d64be73a.zip
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)
Diffstat (limited to 'source3/libsmb/libsmbclient.c')
-rw-r--r--source3/libsmb/libsmbclient.c43
1 files changed, 23 insertions, 20 deletions
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);