summaryrefslogtreecommitdiffstats
path: root/source/librpc/rpc/dcerpc.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-08-25 02:25:20 +0000
committerAndrew Bartlett <abartlet@samba.org>2004-08-25 02:25:20 +0000
commit56b2200255403923db85cd765cf280995d1a6235 (patch)
treeeed660087492d51f9a553aa84a54a5a54c9acb13 /source/librpc/rpc/dcerpc.c
parentee1ff3d1c792183fcf03f188849592722e826c06 (diff)
downloadsamba-56b2200255403923db85cd765cf280995d1a6235.tar.gz
samba-56b2200255403923db85cd765cf280995d1a6235.tar.xz
samba-56b2200255403923db85cd765cf280995d1a6235.zip
r2041: Fix NTLMSSP RPC sealing, client -> win2k3 server.
The bug (found by tridge) is that Win2k3 is being tighter about the NTLMSSP flags. If we don't negotiate sealing, we can't use it. We now have a way to indicate to the GENSEC implementation mechanisms what things we want for a connection. Andrew Bartlett
Diffstat (limited to 'source/librpc/rpc/dcerpc.c')
-rw-r--r--source/librpc/rpc/dcerpc.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/source/librpc/rpc/dcerpc.c b/source/librpc/rpc/dcerpc.c
index 31db6df7382..b605b4d110e 100644
--- a/source/librpc/rpc/dcerpc.c
+++ b/source/librpc/rpc/dcerpc.c
@@ -942,3 +942,21 @@ const char *dcerpc_server_name(struct dcerpc_pipe *p)
}
return p->transport.peer_name(p);
}
+
+/*
+ a useful function to get the auth_level
+*/
+
+uint32 dcerpc_auth_level(struct dcerpc_pipe *p)
+{
+ uint8_t auth_level;
+
+ if (p->flags & DCERPC_SEAL) {
+ auth_level = DCERPC_AUTH_LEVEL_PRIVACY;
+ } else if (p->flags & DCERPC_SIGN) {
+ auth_level = DCERPC_AUTH_LEVEL_INTEGRITY;
+ } else {
+ auth_level = DCERPC_AUTH_LEVEL_NONE;
+ }
+ return auth_level;
+}