diff options
author | Stefan Metzmacher <metze@samba.org> | 2013-08-12 08:19:08 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2013-10-17 08:48:41 +1300 |
commit | a33b13bd6133585323129fa248646c4bc0ac4732 (patch) | |
tree | 976c605b445d0c891185f155ac2f97c20dd79257 /librpc/rpc | |
parent | b92937e64ed7ce3c7cdd4da0e263c7a53da45c49 (diff) | |
download | samba-a33b13bd6133585323129fa248646c4bc0ac4732.tar.gz samba-a33b13bd6133585323129fa248646c4bc0ac4732.tar.bz2 samba-a33b13bd6133585323129fa248646c4bc0ac4732.zip |
librpc/rpc: add dcerpc_binding_handle_auth_info()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'librpc/rpc')
-rw-r--r-- | librpc/rpc/binding_handle.c | 25 | ||||
-rw-r--r-- | librpc/rpc/rpc_common.h | 8 |
2 files changed, 33 insertions, 0 deletions
diff --git a/librpc/rpc/binding_handle.c b/librpc/rpc/binding_handle.c index 3c74fdfdb1..1e11b048de 100644 --- a/librpc/rpc/binding_handle.c +++ b/librpc/rpc/binding_handle.c @@ -98,6 +98,31 @@ uint32_t dcerpc_binding_handle_set_timeout(struct dcerpc_binding_handle *h, return h->ops->set_timeout(h, timeout); } +void dcerpc_binding_handle_auth_info(struct dcerpc_binding_handle *h, + enum dcerpc_AuthType *auth_type, + enum dcerpc_AuthLevel *auth_level) +{ + enum dcerpc_AuthType _auth_type; + enum dcerpc_AuthLevel _auth_level; + + if (auth_type == NULL) { + auth_type = &_auth_type; + } + + if (auth_level == NULL) { + auth_level = &_auth_level; + } + + *auth_type = DCERPC_AUTH_TYPE_NONE; + *auth_level = DCERPC_AUTH_LEVEL_NONE; + + if (h->ops->auth_info == NULL) { + return; + } + + h->ops->auth_info(h, auth_type, auth_level); +} + struct dcerpc_binding_handle_raw_call_state { const struct dcerpc_binding_handle_ops *ops; uint8_t *out_data; diff --git a/librpc/rpc/rpc_common.h b/librpc/rpc/rpc_common.h index d2816f508b..978229ef24 100644 --- a/librpc/rpc/rpc_common.h +++ b/librpc/rpc/rpc_common.h @@ -189,6 +189,10 @@ struct dcerpc_binding_handle_ops { uint32_t (*set_timeout)(struct dcerpc_binding_handle *h, uint32_t timeout); + void (*auth_info)(struct dcerpc_binding_handle *h, + enum dcerpc_AuthType *auth_type, + enum dcerpc_AuthLevel *auth_level); + struct tevent_req *(*raw_call_send)(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct dcerpc_binding_handle *h, @@ -259,6 +263,10 @@ bool dcerpc_binding_handle_is_connected(struct dcerpc_binding_handle *h); uint32_t dcerpc_binding_handle_set_timeout(struct dcerpc_binding_handle *h, uint32_t timeout); +void dcerpc_binding_handle_auth_info(struct dcerpc_binding_handle *h, + enum dcerpc_AuthType *auth_type, + enum dcerpc_AuthLevel *auth_level); + struct tevent_req *dcerpc_binding_handle_raw_call_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct dcerpc_binding_handle *h, |