summaryrefslogtreecommitdiff
path: root/auth
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-01-30 11:53:04 +1100
committerAndrew Bartlett <abartlet@samba.org>2012-01-30 08:05:14 +0100
commit3ddb983c10aab6ad8eb2a766accfccb2b3671a3a (patch)
tree2a497c1a4047d8993a0db0914313412fcbe5a20c /auth
parentfc035afb6ecdb54e6183be511e886ac07727cc0b (diff)
downloadsamba-3ddb983c10aab6ad8eb2a766accfccb2b3671a3a.tar.gz
samba-3ddb983c10aab6ad8eb2a766accfccb2b3671a3a.tar.bz2
samba-3ddb983c10aab6ad8eb2a766accfccb2b3671a3a.zip
gensec: inline gensec_generate_session_info() into only caller
This avoids casting to and from the struct auth_user_info_dc *user_info_dc to to this, the if (user_info_dc->info->authenticated) is moved into auth_generate_session_info_wrapper(), which is the function that gensec_security->auth_context->generate_session_info points to. Andrew Bartlett
Diffstat (limited to 'auth')
-rw-r--r--auth/gensec/gensec.h5
-rw-r--r--auth/gensec/gensec_util.c29
2 files changed, 0 insertions, 34 deletions
diff --git a/auth/gensec/gensec.h b/auth/gensec/gensec.h
index b03bcd82b1..c52eecb8d0 100644
--- a/auth/gensec/gensec.h
+++ b/auth/gensec/gensec.h
@@ -336,11 +336,6 @@ bool gensec_setting_bool(struct gensec_settings *settings, const char *mechanism
NTSTATUS gensec_set_target_principal(struct gensec_security *gensec_security, const char *principal);
const char *gensec_get_target_principal(struct gensec_security *gensec_security);
-NTSTATUS gensec_generate_session_info(TALLOC_CTX *mem_ctx,
- struct gensec_security *gensec_security,
- struct auth_user_info_dc *user_info_dc,
- struct auth_session_info **session_info);
-
NTSTATUS gensec_generate_session_info_pac(TALLOC_CTX *mem_ctx,
struct gensec_security *gensec_security,
struct smb_krb5_context *smb_krb5_context,
diff --git a/auth/gensec/gensec_util.c b/auth/gensec/gensec_util.c
index feff3c3ac1..cdd615fb60 100644
--- a/auth/gensec/gensec_util.c
+++ b/auth/gensec/gensec_util.c
@@ -24,35 +24,6 @@
#include "auth/gensec/gensec.h"
#include "auth/common_auth.h"
-NTSTATUS gensec_generate_session_info(TALLOC_CTX *mem_ctx,
- struct gensec_security *gensec_security,
- struct auth_user_info_dc *user_info_dc,
- struct auth_session_info **session_info)
-{
- NTSTATUS nt_status;
- uint32_t session_info_flags = 0;
-
- if (gensec_security->want_features & GENSEC_FEATURE_UNIX_TOKEN) {
- session_info_flags |= AUTH_SESSION_INFO_UNIX_TOKEN;
- }
-
- session_info_flags |= AUTH_SESSION_INFO_DEFAULT_GROUPS;
- if (user_info_dc->info->authenticated) {
- session_info_flags |= AUTH_SESSION_INFO_AUTHENTICATED;
- }
-
- if (gensec_security->auth_context && gensec_security->auth_context->generate_session_info) {
- nt_status = gensec_security->auth_context->generate_session_info(mem_ctx, gensec_security->auth_context,
- user_info_dc,
- session_info_flags,
- session_info);
- } else {
- DEBUG(0, ("Cannot generate a session_info without the auth_context\n"));
- return NT_STATUS_INTERNAL_ERROR;
- }
- return nt_status;
-}
-
NTSTATUS gensec_generate_session_info_pac(TALLOC_CTX *mem_ctx,
struct gensec_security *gensec_security,
struct smb_krb5_context *smb_krb5_context,