summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-04-18 22:23:02 +0200
committerVolker Lendecke <vl@samba.org>2009-04-19 11:39:47 +0200
commit46317ce214dd0f23222db48984a6b3c585085d89 (patch)
tree68f6f0c009e24764cb07bb34e8248c2065651ac5 /source3
parentbf196df52ff62154ecbcdf7800c7c8b058e325bc (diff)
downloadsamba-46317ce214dd0f23222db48984a6b3c585085d89.tar.gz
samba-46317ce214dd0f23222db48984a6b3c585085d89.tar.bz2
samba-46317ce214dd0f23222db48984a6b3c585085d89.zip
Remove flag "builtin_domain" from disp_info
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_samr_nt.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index e3dc5f4b9c..329c70984a 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -54,7 +54,6 @@ struct samr_connect_info {
typedef struct disp_info {
DOM_SID sid; /* identify which domain this is. */
- bool builtin_domain; /* Quick flag to check if this is the builtin domain. */
struct pdb_search *users; /* querydispinfo 1 and 4 */
struct pdb_search *machines; /* querydispinfo 2 */
struct pdb_search *groups; /* querydispinfo 3 and 5, enumgroups */
@@ -346,7 +345,6 @@ static DISP_INFO *get_samr_dispinfo_by_sid(DOM_SID *psid)
}
}
sid_copy(&builtin_dispinfo->sid, &global_sid_Builtin);
- builtin_dispinfo->builtin_domain = true;
return builtin_dispinfo;
}
@@ -363,7 +361,6 @@ static DISP_INFO *get_samr_dispinfo_by_sid(DOM_SID *psid)
}
}
sid_copy(&domain_dispinfo->sid, get_global_sam_sid());
- domain_dispinfo->builtin_domain = false;
return domain_dispinfo;
}
@@ -510,7 +507,7 @@ static uint32 count_sam_users(struct disp_info *info, uint32 acct_flags)
{
struct samr_displayentry *entry;
- if (info->builtin_domain) {
+ if (sid_check_is_builtin(&info->sid)) {
/* No users in builtin. */
return 0;
}
@@ -534,7 +531,7 @@ static uint32 count_sam_groups(struct disp_info *info)
{
struct samr_displayentry *entry;
- if (info->builtin_domain) {
+ if (sid_check_is_builtin(&info->sid)) {
/* No groups in builtin. */
return 0;
}
@@ -3036,14 +3033,13 @@ NTSTATUS _samr_CreateUser2(pipes_struct *p,
uint32 des_access = GENERIC_RIGHTS_USER_ALL_ACCESS;
bool can_add_account = False;
SE_PRIV se_rights;
- DISP_INFO *disp_info = NULL;
/* Get the domain SID stored in the domain policy */
- if (!get_lsa_policy_samr_sid(p, r->in.domain_handle, &sid, &acc_granted,
- &disp_info))
+ if (!get_lsa_policy_samr_sid(p, r->in.domain_handle, &sid,
+ &acc_granted, NULL))
return NT_STATUS_INVALID_HANDLE;
- if (disp_info->builtin_domain) {
+ if (sid_check_is_builtin(&sid)) {
DEBUG(5,("_samr_CreateUser2: Refusing user create in BUILTIN\n"));
return NT_STATUS_ACCESS_DENIED;
}