summaryrefslogtreecommitdiff
path: root/source3/groupdb
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-05-11 08:59:01 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:21:57 -0500
commit1cb8a948b3ce558506fe3ee084e8d0682cf4d3ed (patch)
tree79c71ac17e0a0454f7fa954deefaac24fc368a94 /source3/groupdb
parent9e30a76c04d0da0bc14f7a0605db7ad51e5cfcd9 (diff)
downloadsamba-1cb8a948b3ce558506fe3ee084e8d0682cf4d3ed.tar.gz
samba-1cb8a948b3ce558506fe3ee084e8d0682cf4d3ed.tar.bz2
samba-1cb8a948b3ce558506fe3ee084e8d0682cf4d3ed.zip
r22787: More from Karolin: Make map_unix_group() static to net_sam.c, add "net
sam unmapunixgroup" (This used to be commit 55e2f35fad8bda3ff2c2ace5323ddeaee87d783e)
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)
{