summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-07-15 16:12:41 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-07-20 09:17:11 +1000
commitec5f1b78affbbd56c787696cb6f63a547be2cc25 (patch)
tree098b3c662150c3aae45fdd5d20456567c20e567e
parente2049e77e406981363a7b81fd092a6ccb4afb187 (diff)
downloadsamba-ec5f1b78affbbd56c787696cb6f63a547be2cc25.tar.gz
samba-ec5f1b78affbbd56c787696cb6f63a547be2cc25.tar.bz2
samba-ec5f1b78affbbd56c787696cb6f63a547be2cc25.zip
s3-auth Use system boolean in auth_user_info_unix
Signed-off-by: Andrew Tridgell <tridge@samba.org>
-rw-r--r--source3/auth/auth_util.c10
-rw-r--r--source3/include/auth.h2
-rw-r--r--source3/rpc_server/samr/srv_samr_nt.c2
3 files changed, 5 insertions, 9 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index fb1a207e72..da84e0a424 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -857,7 +857,7 @@ static NTSTATUS make_new_session_info_system(TALLOC_CTX *mem_ctx,
return status;
}
- (*session_info)->system = true;
+ (*session_info)->unix_info->system = true;
status = add_sid_to_array_unique((*session_info)->security_token->sids,
&global_sid_System,
@@ -982,7 +982,7 @@ static struct auth_serversupplied_info *copy_session_info_serverinfo(TALLOC_CTX
SMB_ASSERT(src->unix_info);
dst->guest = src->unix_info->guest;
- dst->system = src->system;
+ dst->system = src->unix_info->system;
/* This element must be provided to convert back to an auth_serversupplied_info */
SMB_ASSERT(src->unix_token);
@@ -1043,8 +1043,6 @@ static struct auth3_session_info *copy_serverinfo_session_info(TALLOC_CTX *mem_c
return NULL;
}
- dst->system = src->system;
-
dst->unix_token = talloc(dst, struct security_unix_token);
if (!dst->unix_token) {
return NULL;
@@ -1101,6 +1099,7 @@ static struct auth3_session_info *copy_serverinfo_session_info(TALLOC_CTX *mem_c
}
dst->unix_info->guest = src->guest;
+ dst->unix_info->system = src->system;
return dst;
}
@@ -1115,8 +1114,6 @@ struct auth3_session_info *copy_session_info(TALLOC_CTX *mem_ctx,
return NULL;
}
- dst->system = src->system;
-
if (src->unix_token) {
dst->unix_token = talloc(dst, struct security_unix_token);
if (!dst->unix_token) {
@@ -1178,6 +1175,7 @@ struct auth3_session_info *copy_session_info(TALLOC_CTX *mem_ctx,
}
dst->unix_info->guest = src->unix_info->guest;
+ dst->unix_info->system = src->unix_info->system;
}
return dst;
diff --git a/source3/include/auth.h b/source3/include/auth.h
index d13f18b7a5..8d95fb4ebb 100644
--- a/source3/include/auth.h
+++ b/source3/include/auth.h
@@ -76,8 +76,6 @@ struct auth_serversupplied_info {
};
struct auth3_session_info {
- bool system;
-
struct security_unix_token *unix_token;
/* NT group information taken from the info3 structure */
diff --git a/source3/rpc_server/samr/srv_samr_nt.c b/source3/rpc_server/samr/srv_samr_nt.c
index b9bf4b0790..016d426bfe 100644
--- a/source3/rpc_server/samr/srv_samr_nt.c
+++ b/source3/rpc_server/samr/srv_samr_nt.c
@@ -2702,7 +2702,7 @@ static NTSTATUS get_user_info_18(struct pipes_struct *p,
ZERO_STRUCTP(r);
- if (p->session_info->system) {
+ if (p->session_info->unix_info->system) {
goto query;
}