summaryrefslogtreecommitdiff
path: root/source3/groupdb
diff options
context:
space:
mode:
Diffstat (limited to 'source3/groupdb')
-rw-r--r--source3/groupdb/mapping.c64
1 files changed, 0 insertions, 64 deletions
diff --git a/source3/groupdb/mapping.c b/source3/groupdb/mapping.c
index a27aa30014..514b44f5b4 100644
--- a/source3/groupdb/mapping.c
+++ b/source3/groupdb/mapping.c
@@ -49,70 +49,6 @@ NTSTATUS add_initial_entry(gid_t gid, const char *sid, enum lsa_SidType sid_name
return pdb_add_group_mapping_entry(&map);
}
-/****************************************************************************
- Map a unix group to a newly created mapping
-****************************************************************************/
-NTSTATUS map_unix_group(const struct group *grp, GROUP_MAP *pmap)
-{
- NTSTATUS status;
- GROUP_MAP map;
- const char *grpname, *dom, *name;
- uint32 rid;
-
- if (pdb_getgrgid(&map, grp->gr_gid)) {
- return NT_STATUS_GROUP_EXISTS;
- }
-
- map.gid = grp->gr_gid;
- grpname = grp->gr_name;
-
- if (lookup_name(tmp_talloc_ctx(), grpname, LOOKUP_NAME_ISOLATED,
- &dom, &name, NULL, NULL)) {
-
- const char *tmp = talloc_asprintf(
- tmp_talloc_ctx(), "Unix Group %s", grp->gr_name);
-
- DEBUG(5, ("%s exists as %s\\%s, retrying as \"%s\"\n",
- grpname, dom, name, tmp));
- grpname = tmp;
- }
-
- if (lookup_name(tmp_talloc_ctx(), grpname, LOOKUP_NAME_ISOLATED,
- NULL, NULL, NULL, NULL)) {
- DEBUG(3, ("\"%s\" exists, can't map it\n", grp->gr_name));
- return NT_STATUS_GROUP_EXISTS;
- }
-
- fstrcpy(map.nt_name, grpname);
-
- if (pdb_rid_algorithm()) {
- rid = algorithmic_pdb_gid_to_group_rid( grp->gr_gid );
- } else {
- if (!pdb_new_rid(&rid)) {
- DEBUG(3, ("Could not get a new RID for %s\n",
- grp->gr_name));
- return NT_STATUS_ACCESS_DENIED;
- }
- }
-
- sid_compose(&map.sid, get_global_sam_sid(), rid);
- map.sid_name_use = SID_NAME_DOM_GRP;
- fstrcpy(map.comment, talloc_asprintf(tmp_talloc_ctx(), "Unix Group %s",
- grp->gr_name));
-
- status = pdb_add_group_mapping_entry(&map);
- if (NT_STATUS_IS_OK(status)) {
- *pmap = map;
- }
- return status;
-}
-
-
-
-
-
-
-
static NTSTATUS alias_memberships(const DOM_SID *members, size_t num_members,
DOM_SID **sids, size_t *num)
{