summaryrefslogtreecommitdiffstats
path: root/source3/smbd/password.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-07-15 15:55:31 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-07-20 09:17:11 +1000
commit92895379934b660affa70cd406e40719d429ae2a (patch)
tree6a6185b2e0476a7045535332fad6201caeda2424 /source3/smbd/password.c
parenta39187f0f5e6f99ce8a38cba997e4ad15353e09e (diff)
downloadsamba-92895379934b660affa70cd406e40719d429ae2a.tar.gz
samba-92895379934b660affa70cd406e40719d429ae2a.tar.xz
samba-92895379934b660affa70cd406e40719d429ae2a.zip
s3-auth Use struct auth_user_info_unix for unix_name and sanitized_username
This is closer to the layout of struct auth_session_info in auth.idl Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source3/smbd/password.c')
-rw-r--r--source3/smbd/password.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index fb88fd3319..08b53a818e 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -281,22 +281,23 @@ int register_existing_vuid(struct smbd_server_connection *sconn,
/* This is a potentially untrusted username */
alpha_strcpy(tmp, smb_name, ". _-$", sizeof(tmp));
- vuser->session_info->sanitized_username = talloc_strdup(
+ vuser->session_info->unix_info->sanitized_username = talloc_strdup(
vuser->session_info, tmp);
- /* Make clear that we require the optional unix_token in the source3 code */
+ /* Make clear that we require the optional unix_token and unix_info in the source3 code */
SMB_ASSERT(vuser->session_info->unix_token);
+ SMB_ASSERT(vuser->session_info->unix_info);
DEBUG(10,("register_existing_vuid: (%u,%u) %s %s %s guest=%d\n",
(unsigned int)vuser->session_info->unix_token->uid,
(unsigned int)vuser->session_info->unix_token->gid,
- vuser->session_info->unix_name,
- vuser->session_info->sanitized_username,
+ vuser->session_info->unix_info->unix_name,
+ vuser->session_info->unix_info->sanitized_username,
vuser->session_info->info3->base.domain.string,
vuser->session_info->guest ));
DEBUG(3, ("register_existing_vuid: User name: %s\t"
- "Real name: %s\n", vuser->session_info->unix_name,
+ "Real name: %s\n", vuser->session_info->unix_info->unix_name,
vuser->session_info->info3->base.full_name.string));
if (!vuser->session_info->security_token) {
@@ -310,7 +311,7 @@ int register_existing_vuid(struct smbd_server_connection *sconn,
DEBUG(3,("register_existing_vuid: UNIX uid %d is UNIX user %s, "
"and will be vuid %u\n", (int)vuser->session_info->unix_token->uid,
- vuser->session_info->unix_name, vuser->vuid));
+ vuser->session_info->unix_info->unix_name, vuser->vuid));
if (!session_claim(sconn, vuser)) {
DEBUG(1, ("register_existing_vuid: Failed to claim session "
@@ -329,7 +330,7 @@ int register_existing_vuid(struct smbd_server_connection *sconn,
if (!vuser->session_info->guest) {
vuser->homes_snum = register_homes_share(
- vuser->session_info->unix_name);
+ vuser->session_info->unix_info->unix_name);
}
if (srv_is_signing_negotiated(sconn) &&
@@ -343,8 +344,8 @@ int register_existing_vuid(struct smbd_server_connection *sconn,
/* fill in the current_user_info struct */
set_current_user_info(
- vuser->session_info->sanitized_username,
- vuser->session_info->unix_name,
+ vuser->session_info->unix_info->sanitized_username,
+ vuser->session_info->unix_info->unix_name,
vuser->session_info->info3->base.domain.string);
return vuser->vuid;