diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-02-21 10:25:52 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-02-22 16:20:10 +1100 |
commit | 2e69e894566d32001120d76d7ba58cdacb56d279 (patch) | |
tree | 2ac3ab5945d6bc9ed9ac4757c05dd8a72057e1ec /source3/auth | |
parent | 985c7da604ac30e67ee4b5a829935074900d6f26 (diff) | |
download | samba-2e69e894566d32001120d76d7ba58cdacb56d279.tar.gz samba-2e69e894566d32001120d76d7ba58cdacb56d279.tar.bz2 samba-2e69e894566d32001120d76d7ba58cdacb56d279.zip |
s3-auth Rename auth_serversupplied_info varaiables: server_info -> session_info
These variables, of type struct auth_serversupplied_info were poorly
named when added into 2001, and in good consistant practice, this has
extended all over the codebase in the years since.
The structure is also not ideal for it's current purpose. Originally
intended to convey the results of the authentication modules, it
really describes all the essential attributes of a session. This
rename will reduce the volume of a future patch to replaced these with
a struct auth_session_info, with auth_serversupplied_info confined to
the lower levels of the auth subsystem, and then eliminated.
(The new structure will be the output of create_local_token(), and the
change in struct definition will ensure that this is always run, populating
local groups and privileges).
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/auth')
-rw-r--r-- | source3/auth/auth_ntlmssp.c | 10 | ||||
-rw-r--r-- | source3/auth/auth_util.c | 32 |
2 files changed, 21 insertions, 21 deletions
diff --git a/source3/auth/auth_ntlmssp.c b/source3/auth/auth_ntlmssp.c index 4262d15a95..ad45d81e94 100644 --- a/source3/auth/auth_ntlmssp.c +++ b/source3/auth/auth_ntlmssp.c @@ -25,9 +25,9 @@ #include "ntlmssp_wrap.h" #include "../librpc/gen_ndr/netlogon.h" -NTSTATUS auth_ntlmssp_steal_server_info(TALLOC_CTX *mem_ctx, +NTSTATUS auth_ntlmssp_steal_session_info(TALLOC_CTX *mem_ctx, struct auth_ntlmssp_state *auth_ntlmssp_state, - struct auth_serversupplied_info **server_info) + struct auth_serversupplied_info **session_info) { /* Free the current server_info user_session_key and reset it from the * current ntlmssp_state session_key */ @@ -40,11 +40,11 @@ NTSTATUS auth_ntlmssp_steal_server_info(TALLOC_CTX *mem_ctx, auth_ntlmssp_state->ntlmssp_state->session_key.length); if (auth_ntlmssp_state->ntlmssp_state->session_key.length && !auth_ntlmssp_state->server_info->user_session_key.data) { - *server_info = NULL; + *session_info = NULL; return NT_STATUS_NO_MEMORY; } - /* Steal server_info away from auth_ntlmssp_state */ - *server_info = talloc_move(mem_ctx, &auth_ntlmssp_state->server_info); + /* Steal session_info away from auth_ntlmssp_state */ + *session_info = talloc_move(mem_ctx, &auth_ntlmssp_state->server_info); return NT_STATUS_OK; } diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index 3143710986..59406283b3 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -745,12 +745,12 @@ done: } /*************************************************************************** - Make (and fill) a user_info struct for a system user login. + Make (and fill) a auth_session_info struct for a system user login. This *must* succeed for smbd to start. ***************************************************************************/ -static NTSTATUS make_new_server_info_system(TALLOC_CTX *mem_ctx, - struct auth_serversupplied_info **server_info) +static NTSTATUS make_new_session_info_system(TALLOC_CTX *mem_ctx, + struct auth_serversupplied_info **session_info) { struct passwd *pwd; NTSTATUS status; @@ -763,20 +763,20 @@ static NTSTATUS make_new_server_info_system(TALLOC_CTX *mem_ctx, status = make_serverinfo_from_username(mem_ctx, pwd->pw_name, false, - server_info); + session_info); TALLOC_FREE(pwd); if (!NT_STATUS_IS_OK(status)) { return status; } - (*server_info)->system = true; + (*session_info)->system = true; - status = add_sid_to_array_unique((*server_info)->security_token->sids, + status = add_sid_to_array_unique((*session_info)->security_token->sids, &global_sid_System, - &(*server_info)->security_token->sids, - &(*server_info)->security_token->num_sids); + &(*session_info)->security_token->sids, + &(*session_info)->security_token->num_sids); if (!NT_STATUS_IS_OK(status)) { - TALLOC_FREE((*server_info)); + TALLOC_FREE((*session_info)); return status; } @@ -888,7 +888,7 @@ struct auth_serversupplied_info *copy_serverinfo(TALLOC_CTX *mem_ctx, * SMB level session key with SystemLibraryDTC */ -bool server_info_set_session_key(struct auth_serversupplied_info *info, +bool session_info_set_session_key(struct auth_serversupplied_info *info, DATA_BLOB session_key) { TALLOC_FREE(info->user_session_key.data); @@ -923,18 +923,18 @@ NTSTATUS init_system_info(void) if (system_info != NULL) return NT_STATUS_OK; - return make_new_server_info_system(NULL, &system_info); + return make_new_session_info_system(NULL, &system_info); } -NTSTATUS make_server_info_system(TALLOC_CTX *mem_ctx, - struct auth_serversupplied_info **server_info) +NTSTATUS make_session_info_system(TALLOC_CTX *mem_ctx, + struct auth_serversupplied_info **session_info) { if (system_info == NULL) return NT_STATUS_UNSUCCESSFUL; - *server_info = copy_serverinfo(mem_ctx, system_info); - return (*server_info != NULL) ? NT_STATUS_OK : NT_STATUS_NO_MEMORY; + *session_info = copy_serverinfo(mem_ctx, system_info); + return (*session_info != NULL) ? NT_STATUS_OK : NT_STATUS_NO_MEMORY; } -const struct auth_serversupplied_info *get_server_info_system(void) +const struct auth_serversupplied_info *get_session_info_system(void) { return system_info; } |