From 7c83f69383b1bd3e0c6be95b1b53cdc2d5957623 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 15 Mar 2011 14:43:24 +1100 Subject: s4-rpc: added dcesrv_call_account_name() this will be used by openchange Autobuild-User: Andrew Tridgell Autobuild-Date: Tue Mar 15 06:14:00 CET 2011 on sn-devel-104 --- source4/rpc_server/dcerpc_server.c | 8 ++++++++ source4/rpc_server/dcerpc_server.h | 5 +++++ 2 files changed, 13 insertions(+) (limited to 'source4/rpc_server') diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c index fa5f3e9830..cd079da5c9 100644 --- a/source4/rpc_server/dcerpc_server.c +++ b/source4/rpc_server/dcerpc_server.c @@ -1737,3 +1737,11 @@ _PUBLIC_ bool dcesrv_call_authenticated(struct dcesrv_call_state *dce_call) level = security_session_user_level(dce_call->conn->auth_state.session_info, NULL); return level >= SECURITY_USER; } + +/** + * retrieve account_name for a dce_call + */ +_PUBLIC_ const char *dcesrv_call_account_name(struct dcesrv_call_state *dce_call) +{ + return dce_call->context->conn->auth_state.session_info->info->account_name; +} diff --git a/source4/rpc_server/dcerpc_server.h b/source4/rpc_server/dcerpc_server.h index 6e513acac1..024009ab70 100644 --- a/source4/rpc_server/dcerpc_server.h +++ b/source4/rpc_server/dcerpc_server.h @@ -393,5 +393,10 @@ _PUBLIC_ struct cli_credentials *dcesrv_call_credentials(struct dcesrv_call_stat */ _PUBLIC_ bool dcesrv_call_authenticated(struct dcesrv_call_state *dce_call); +/** + * retrieve account_name for a dce_call + */ +_PUBLIC_ const char *dcesrv_call_account_name(struct dcesrv_call_state *dce_call); + #endif /* SAMBA_DCERPC_SERVER_H */ -- cgit