summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-07-15 16:09:52 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-07-20 09:17:11 +1000
commite2049e77e406981363a7b81fd092a6ccb4afb187 (patch)
tree5768746c4bb65ff4eb81b172adbc3350a6570980 /source3/auth
parentbf1dba03b285f3044f096ab597df7859d68ad28e (diff)
downloadsamba-e2049e77e406981363a7b81fd092a6ccb4afb187.tar.gz
samba-e2049e77e406981363a7b81fd092a6ccb4afb187.tar.bz2
samba-e2049e77e406981363a7b81fd092a6ccb4afb187.zip
s3-auth Use guest boolean in auth_user_info_unix
Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth_util.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index f53f63df1f..fb1a207e72 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -508,7 +508,7 @@ NTSTATUS create_local_token(TALLOC_CTX *mem_ctx,
(server_info->nss_token)) {
status = create_token_from_username(session_info,
session_info->unix_info->unix_name,
- session_info->guest,
+ session_info->unix_info->guest,
&session_info->unix_token->uid,
&session_info->unix_token->gid,
&session_info->unix_info->unix_name,
@@ -516,7 +516,7 @@ NTSTATUS create_local_token(TALLOC_CTX *mem_ctx,
} else {
status = create_local_nt_token_from_info3(session_info,
- session_info->guest,
+ session_info->unix_info->guest,
session_info->info3,
&session_info->extra,
&session_info->security_token);
@@ -978,7 +978,10 @@ static struct auth_serversupplied_info *copy_session_info_serverinfo(TALLOC_CTX
return NULL;
}
- dst->guest = src->guest;
+ /* This element must be provided to convert back to an auth_serversupplied_info */
+ SMB_ASSERT(src->unix_info);
+
+ dst->guest = src->unix_info->guest;
dst->system = src->system;
/* This element must be provided to convert back to an auth_serversupplied_info */
@@ -1015,8 +1018,6 @@ static struct auth_serversupplied_info *copy_session_info_serverinfo(TALLOC_CTX
}
dst->extra = src->extra;
- /* This element must be provided to convert back to an auth_serversupplied_info */
- SMB_ASSERT(src->unix_info);
dst->unix_name = talloc_strdup(dst, src->unix_info->unix_name);
if (!dst->unix_name) {
TALLOC_FREE(dst);
@@ -1042,7 +1043,6 @@ static struct auth3_session_info *copy_serverinfo_session_info(TALLOC_CTX *mem_c
return NULL;
}
- dst->guest = src->guest;
dst->system = src->system;
dst->unix_token = talloc(dst, struct security_unix_token);
@@ -1100,6 +1100,8 @@ static struct auth3_session_info *copy_serverinfo_session_info(TALLOC_CTX *mem_c
return NULL;
}
+ dst->unix_info->guest = src->guest;
+
return dst;
}
@@ -1113,7 +1115,6 @@ struct auth3_session_info *copy_session_info(TALLOC_CTX *mem_ctx,
return NULL;
}
- dst->guest = src->guest;
dst->system = src->system;
if (src->unix_token) {
@@ -1175,6 +1176,8 @@ struct auth3_session_info *copy_session_info(TALLOC_CTX *mem_ctx,
TALLOC_FREE(dst);
return NULL;
}
+
+ dst->unix_info->guest = src->unix_info->guest;
}
return dst;