summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-08-12 08:19:57 +0200
committerAndrew Bartlett <abartlet@samba.org>2013-10-17 08:48:44 +1300
commitd0525289740522a43db2fb7f1364305eeb595070 (patch)
tree63b007acc0fb301f95ed4e7d3b6f45ef9a674634 /source4
parentf773ed2cf7d490f6b1df38cf16a36743408dbd2d (diff)
downloadsamba-d0525289740522a43db2fb7f1364305eeb595070.tar.gz
samba-d0525289740522a43db2fb7f1364305eeb595070.tar.bz2
samba-d0525289740522a43db2fb7f1364305eeb595070.zip
s4:librpc: implement dcerpc_binding_handle_auth_info()
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/librpc/rpc/dcerpc.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c
index e653cbaea6..fd724063c2 100644
--- a/source4/librpc/rpc/dcerpc.c
+++ b/source4/librpc/rpc/dcerpc.c
@@ -200,6 +200,29 @@ static uint32_t dcerpc_bh_set_timeout(struct dcerpc_binding_handle *h,
return old;
}
+static void dcerpc_bh_auth_info(struct dcerpc_binding_handle *h,
+ enum dcerpc_AuthType *auth_type,
+ enum dcerpc_AuthLevel *auth_level)
+{
+ struct dcerpc_bh_state *hs = dcerpc_binding_handle_data(h,
+ struct dcerpc_bh_state);
+
+ if (hs->p == NULL) {
+ return;
+ }
+
+ if (hs->p->conn == NULL) {
+ return;
+ }
+
+ if (hs->p->conn->security_state.auth_info == NULL) {
+ return;
+ }
+
+ *auth_type = hs->p->conn->security_state.auth_info->auth_type;
+ *auth_level = hs->p->conn->security_state.auth_info->auth_level;
+}
+
struct dcerpc_bh_raw_call_state {
struct tevent_context *ev;
struct dcerpc_binding_handle *h;
@@ -552,6 +575,7 @@ static const struct dcerpc_binding_handle_ops dcerpc_bh_ops = {
.name = "dcerpc",
.is_connected = dcerpc_bh_is_connected,
.set_timeout = dcerpc_bh_set_timeout,
+ .auth_info = dcerpc_bh_auth_info,
.raw_call_send = dcerpc_bh_raw_call_send,
.raw_call_recv = dcerpc_bh_raw_call_recv,
.disconnect_send = dcerpc_bh_disconnect_send,