summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-06-03 22:34:13 +1000
committerAndreas Schneider <asn@samba.org>2012-06-19 10:38:13 +0200
commite49656e2ee596a481277a5a2c3dd5d3969411c19 (patch)
tree73a3810c85f79ad85f23a3f3a20cf7018fe9c3b5 /source3
parent873ec60f5406aecdbb1f6a1149af517f21939e43 (diff)
downloadsamba-e49656e2ee596a481277a5a2c3dd5d3969411c19.tar.gz
samba-e49656e2ee596a481277a5a2c3dd5d3969411c19.tar.bz2
samba-e49656e2ee596a481277a5a2c3dd5d3969411c19.zip
auth: Use only security_token_is_system to determine that a user is SYSTEM
This removes the duplication on how to detect that a user is system in Samba now that the smbd system account is also only SID_NT_SYSTEM we can use the same check everywhere. Andrew Bartlett Signed-off-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/auth/auth_util.c4
-rw-r--r--source3/rpc_server/samr/srv_samr_nt.c2
2 files changed, 1 insertions, 5 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 91fecfedbf..2ac46e6c5f 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -506,8 +506,6 @@ NTSTATUS create_local_token(TALLOC_CTX *mem_ctx,
session_info->unix_info->sanitized_username =
talloc_strdup(session_info->unix_info, tmp);
- session_info->unix_info->system = server_info->system;
-
if (session_key) {
data_blob_free(&session_info->session_key);
session_info->session_key = data_blob_talloc(session_info,
@@ -1047,8 +1045,6 @@ static NTSTATUS make_new_session_info_system(TALLOC_CTX *mem_ctx,
return status;
}
- (*session_info)->unix_info->system = true;
-
TALLOC_FREE((*session_info)->security_token->sids);
(*session_info)->security_token->num_sids = 0;
diff --git a/source3/rpc_server/samr/srv_samr_nt.c b/source3/rpc_server/samr/srv_samr_nt.c
index 77888ea1e8..b52e88c7a9 100644
--- a/source3/rpc_server/samr/srv_samr_nt.c
+++ b/source3/rpc_server/samr/srv_samr_nt.c
@@ -2711,7 +2711,7 @@ static NTSTATUS get_user_info_18(struct pipes_struct *p,
ZERO_STRUCTP(r);
- if (p->session_info->unix_info->system) {
+ if (security_token_is_system(p->session_info->security_token)) {
goto query;
}