summaryrefslogtreecommitdiff
path: root/source3/rpc_server/samr
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-07-15 14:59:14 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-07-20 09:17:10 +1000
commit6d741e918f145c6ec62c22358aabc8162db108fd (patch)
tree4d562524b2ff71892911331d707e23045984b0d3 /source3/rpc_server/samr
parentf16d8f4eb86ecc4741c25e5ed87b2ea4c6717a31 (diff)
downloadsamba-6d741e918f145c6ec62c22358aabc8162db108fd.tar.gz
samba-6d741e918f145c6ec62c22358aabc8162db108fd.tar.bz2
samba-6d741e918f145c6ec62c22358aabc8162db108fd.zip
s3-auth Use *unix_token rather than utok in struct auth3_session_info
This brings this structure one step closer to the struct auth_session_info. A few SMB_ASSERT calls are added in some key places to ensure that this pointer is initialised, to make tracing any bugs here easier in future. NOTE: Many of the users of this structure should be reviewed, as unix and NT access checks are mixed in a way that should just be done using the NT ACL. This patch has not changed this behaviour however. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source3/rpc_server/samr')
-rw-r--r--source3/rpc_server/samr/srv_samr_nt.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/rpc_server/samr/srv_samr_nt.c b/source3/rpc_server/samr/srv_samr_nt.c
index 9b91ef3d2b..b9bf4b0790 100644
--- a/source3/rpc_server/samr/srv_samr_nt.c
+++ b/source3/rpc_server/samr/srv_samr_nt.c
@@ -454,7 +454,7 @@ NTSTATUS _samr_OpenDomain(struct pipes_struct *p,
/*check if access can be granted as requested by client. */
map_max_allowed_access(p->session_info->security_token,
- &p->session_info->utok,
+ p->session_info->unix_token,
&des_access);
make_samr_object_sd( p->mem_ctx, &psd, &sd_size, &dom_generic_mapping, NULL, 0 );
@@ -2210,7 +2210,7 @@ NTSTATUS _samr_OpenUser(struct pipes_struct *p,
/* check if access can be granted as requested by client. */
map_max_allowed_access(p->session_info->security_token,
- &p->session_info->utok,
+ p->session_info->unix_token,
&des_access);
make_samr_object_sd(p->mem_ctx, &psd, &sd_size, &usr_generic_mapping, &sid, SAMR_USR_RIGHTS_WRITE_PW);
@@ -3790,7 +3790,7 @@ NTSTATUS _samr_CreateUser2(struct pipes_struct *p,
}
DEBUG(5, ("_samr_CreateUser2: %s can add this account : %s\n",
- uidtoname(p->session_info->utok.uid),
+ uidtoname(p->session_info->unix_token->uid),
can_add_account ? "True":"False" ));
if (!can_add_account) {
@@ -3816,7 +3816,7 @@ NTSTATUS _samr_CreateUser2(struct pipes_struct *p,
sid_compose(&sid, get_global_sam_sid(), *r->out.rid);
map_max_allowed_access(p->session_info->security_token,
- &p->session_info->utok,
+ p->session_info->unix_token,
&des_access);
make_samr_object_sd(p->mem_ctx, &psd, &sd_size, &usr_generic_mapping,
@@ -3899,7 +3899,7 @@ NTSTATUS _samr_Connect(struct pipes_struct *p,
user level access control on shares) --jerry */
map_max_allowed_access(p->session_info->security_token,
- &p->session_info->utok,
+ p->session_info->unix_token,
&des_access);
se_map_generic( &des_access, &sam_generic_mapping );
@@ -3961,7 +3961,7 @@ NTSTATUS _samr_Connect2(struct pipes_struct *p,
}
map_max_allowed_access(p->session_info->security_token,
- &p->session_info->utok,
+ p->session_info->unix_token,
&des_access);
make_samr_object_sd(p->mem_ctx, &psd, &sd_size, &sam_generic_mapping, NULL, 0);
@@ -4176,7 +4176,7 @@ NTSTATUS _samr_OpenAlias(struct pipes_struct *p,
/*check if access can be granted as requested by client. */
map_max_allowed_access(p->session_info->security_token,
- &p->session_info->utok,
+ p->session_info->unix_token,
&des_access);
make_samr_object_sd(p->mem_ctx, &psd, &sd_size, &ali_generic_mapping, NULL, 0);
@@ -6257,7 +6257,7 @@ NTSTATUS _samr_OpenGroup(struct pipes_struct *p,
/*check if access can be granted as requested by client. */
map_max_allowed_access(p->session_info->security_token,
- &p->session_info->utok,
+ p->session_info->unix_token,
&des_access);
make_samr_object_sd(p->mem_ctx, &psd, &sd_size, &grp_generic_mapping, NULL, 0);