diff options
author | Luke Leighton <lkcl@samba.org> | 1999-02-09 21:56:06 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-02-09 21:56:06 +0000 |
commit | 4cb18cd734951597f1fcdffdb99ddc97f5ea83d3 (patch) | |
tree | 274e1a4a989e0c22395e0ff4dae44195aa06487b /source3/rpc_server | |
parent | 96983a13bac8276590024b37149b7bf3e80477dd (diff) | |
download | samba-4cb18cd734951597f1fcdffdb99ddc97f5ea83d3.tar.gz samba-4cb18cd734951597f1fcdffdb99ddc97f5ea83d3.tar.bz2 samba-4cb18cd734951597f1fcdffdb99ddc97f5ea83d3.zip |
groups and aliases being "manually" added which do not necessarily have
representation in the underlying database: removed this code.
for example, with the nt->unix mapping system (don't know about the ldap
one) if you want "Domain Admins" to appear you _must_ put it in the
domaingroup.map file.
the previous code was adding builtin aliases and well-known groups even
if they weren't in the domain maps. bad idea.
(This used to be commit 56469578a1af0fbcf6edddf94c498c7bbfb385c6)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_samr.c | 52 |
1 files changed, 7 insertions, 45 deletions
diff --git a/source3/rpc_server/srv_samr.c b/source3/rpc_server/srv_samr.c index 8961660071..ec3fa289a7 100644 --- a/source3/rpc_server/srv_samr.c +++ b/source3/rpc_server/srv_samr.c @@ -34,10 +34,6 @@ extern DOM_SID global_sam_sid; extern DOM_SID global_sid_S_1_1; extern DOM_SID global_sid_S_1_5_20; -extern rid_name domain_group_rids[]; -extern rid_name domain_alias_rids[]; -extern rid_name builtin_alias_rids[]; - /******************************************************************* This next function should be replaced with something that dynamically returns the correct user info..... JRA. @@ -662,33 +658,6 @@ static void samr_reply_enum_dom_groups(SAMR_Q_ENUM_DOM_GROUPS *q_u, } } - if (r_e.status == 0x0 && - (sid_equal(&sid, &global_sam_sid) || - sid_equal(&sid, &global_sid_S_1_5_20))) - { - char *name; - int i = 0; - got_grps = True; - - while (num_entries < MAX_SAM_ENTRIES && ((name = domain_group_rids[i].name) != NULL)) - { - DOMAIN_GRP tmp_grp; - - fstrcpy(tmp_grp.name , name); - fstrcpy(tmp_grp.comment, ""); - tmp_grp.rid = domain_group_rids[i].rid; - tmp_grp.attr = 0x7; - - if (!add_domain_group(&grps, &num_entries, &tmp_grp)) - { - r_e.status = 0xC0000000 | NT_STATUS_NO_MEMORY; - break; - } - - i++; - } - } - if (r_e.status == 0 && got_grps) { make_samr_r_enum_dom_groups(&r_e, q_u->start_idx, num_entries, grps, r_e.status); @@ -744,28 +713,21 @@ static void samr_reply_enum_dom_aliases(SAMR_Q_ENUM_DOM_ALIASES *q_u, /* well-known aliases */ if (sid_equal(&sid, &global_sid_S_1_5_20)) { - char *name; + BOOL ret; + /* builtin aliases */ - while ((name = builtin_alias_rids[num_entries].name) != NULL) + become_root(True); + ret = enumdombuiltins(&alss, &num_entries); + unbecome_root(True); + if (!ret) { - LOCAL_GRP tmp_als; - - fstrcpy(tmp_als.name , name); - fstrcpy(tmp_als.comment, ""); - tmp_als.rid = builtin_alias_rids[num_entries].rid; - - if (!add_domain_alias(&alss, &num_entries, &tmp_als)) - { - r_e.status = 0xC0000000 | NT_STATUS_NO_MEMORY; - break; - } + r_e.status = 0xC0000000 | NT_STATUS_NO_MEMORY; } } else if (sid_equal(&sid, &global_sam_sid)) { BOOL ret; /* local aliases */ - num_entries = 0; become_root(True); ret = enumdomaliases(&alss, &num_entries); |