diff options
author | Andrew Bartlett <abartlet@samba.org> | 2004-06-05 01:39:08 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:56:28 -0500 |
commit | 0d466258be1fc7156de469daec07b79701557168 (patch) | |
tree | ec4af23d2117cafbf39a062f44eebc8b68182324 /source4/smb_server/password.c | |
parent | b553acce4b426e1a2e4fda3a9acbfbf41003154a (diff) | |
download | samba-0d466258be1fc7156de469daec07b79701557168.tar.gz samba-0d466258be1fc7156de469daec07b79701557168.tar.xz samba-0d466258be1fc7156de469daec07b79701557168.zip |
r1019: Push the auth subsystem away from using typedef, and over to the 'all
goodness and light' struct ;-)
Break apart the auth subsystem's return strucutres, into the parts
that a netlogon call cares about, and the parts that are for a local
session. This is the 'struct session_info' and it will almost
completly replace the current information stored on a vuid, but be
generic to all login methods (RPC over TCP, for example).
Andrew Bartlett
(This used to be commit d199697014d9562f9439a30b950fda798c5ef419)
Diffstat (limited to 'source4/smb_server/password.c')
-rw-r--r-- | source4/smb_server/password.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/source4/smb_server/password.c b/source4/smb_server/password.c index ca89003cf1..075638852c 100644 --- a/source4/smb_server/password.c +++ b/source4/smb_server/password.c @@ -55,12 +55,10 @@ void invalidate_vuid(struct server_context *smb, uint16_t vuid) if (vuser == NULL) return; - - data_blob_free(&vuser->session_key); session_yield(vuser); - free_server_info(&vuser->server_info); + talloc_destroy(vuser->session_info->mem_ctx); DLIST_REMOVE(smb->users.validated_users, vuser); @@ -101,8 +99,7 @@ void invalidate_all_vuids(struct server_context *smb) */ int register_vuid(struct server_context *smb, - struct auth_serversupplied_info *server_info, - DATA_BLOB *session_key, + struct auth_session_info *session_info, const char *smb_name) { user_struct *vuser = NULL; @@ -135,18 +132,8 @@ int register_vuid(struct server_context *smb, vuser->vuid = smb->users.next_vuid; - vuser->session_key = *session_key; - - if (!server_info->ptok) { - DEBUG(1, ("server_info does not contain a user_token - cannot continue\n")); - free_server_info(&server_info); - - SAFE_FREE(vuser); - return UID_FIELD_INVALID; - } - /* use this to keep tabs on all our info from the authentication */ - vuser->server_info = server_info; + vuser->session_info = session_info; smb->users.next_vuid++; smb->users.num_validated_vuids++; @@ -156,7 +143,7 @@ int register_vuid(struct server_context *smb, if (!session_claim(smb, vuser)) { DEBUG(1,("Failed to claim session for vuid=%d\n", vuser->vuid)); invalidate_vuid(smb, vuser->vuid); - return -1; + return UID_FIELD_INVALID; } return vuser->vuid; |