summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-01-10 17:58:12 +0100
committerVolker Lendecke <vl@samba.org>2010-01-10 20:56:16 +0100
commit86a73e6eba35973b0de63e3e048da99c7472582a (patch)
tree41d25fa1578b40b46a99f052b60fc90b1a2e1df6
parent48251c3370ed24aecd677d923d109ed7eda07388 (diff)
downloadsamba-86a73e6eba35973b0de63e3e048da99c7472582a.tar.gz
samba-86a73e6eba35973b0de63e3e048da99c7472582a.tar.bz2
samba-86a73e6eba35973b0de63e3e048da99c7472582a.zip
s3: Use sid_check_is_domain instead of a direct sid_equal
-rw-r--r--source3/rpc_server/srv_samr_nt.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index 9f6afa1c98..3626cbdf2a 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -5837,8 +5837,9 @@ NTSTATUS _samr_CreateDomainGroup(pipes_struct *p,
return status;
}
- if (!sid_equal(&dinfo->sid, get_global_sam_sid()))
+ if (!sid_check_is_domain(&dinfo->sid)) {
return NT_STATUS_ACCESS_DENIED;
+ }
name = r->in.name->string;
if (name == NULL) {
@@ -5898,8 +5899,9 @@ NTSTATUS _samr_CreateDomAlias(pipes_struct *p,
return result;
}
- if (!sid_equal(&dinfo->sid, get_global_sam_sid()))
+ if (!sid_check_is_domain(&dinfo->sid)) {
return NT_STATUS_ACCESS_DENIED;
+ }
name = r->in.alias_name->string;
@@ -6277,8 +6279,9 @@ NTSTATUS _samr_OpenGroup(pipes_struct *p,
/* this should not be hard-coded like this */
- if (!sid_equal(&dinfo->sid, get_global_sam_sid()))
+ if (!sid_check_is_domain(&dinfo->sid)) {
return NT_STATUS_ACCESS_DENIED;
+ }
sid_compose(&info_sid, &dinfo->sid, r->in.rid);