svn commit: samba r2753 - branches/SAMBA_3_0/source/groupdb
trunk/source/groupdb
gd at samba.org
gd at samba.org
Wed Sep 29 15:26:39 GMT 2004
Author: gd
Date: 2004-09-29 15:26:38 +0000 (Wed, 29 Sep 2004)
New Revision: 2753
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/&rev=2753&nolog=1
Log:
Workaround for the (rather broken) _samr_query_useraliases rpc-call.
_samr_query_useraliases shows up with all kind of very weird memberships
(global-groups, machine-accounts, etc.). Sometimes even if there is no
alias-membership at all.
One of the biggest mistakes is to convert any unix-group the user is a
member of, into an alias by default in get_group_from_gid.
get_alias_user_groups should be rewritten to use
pdb_enum_alias_memberships.
Guenther
Modified:
branches/SAMBA_3_0/source/groupdb/mapping.c
trunk/source/groupdb/mapping.c
Changeset:
Modified: branches/SAMBA_3_0/source/groupdb/mapping.c
===================================================================
--- branches/SAMBA_3_0/source/groupdb/mapping.c 2004-09-29 13:34:41 UTC (rev 2752)
+++ branches/SAMBA_3_0/source/groupdb/mapping.c 2004-09-29 15:26:38 UTC (rev 2753)
@@ -945,25 +945,12 @@
if ( (grp=getgrgid(gid)) == NULL)
return False;
- /*
- * make a group map from scratch if doesn't exist.
- */
-
become_root();
ret = pdb_getgrgid(map, gid);
unbecome_root();
if ( !ret ) {
- map->gid=gid;
- map->sid_name_use=SID_NAME_ALIAS;
-
- /* interim solution until we have a last RID allocated */
-
- sid_copy(&map->sid, get_global_sam_sid());
- sid_append_rid(&map->sid, pdb_gid_to_group_rid(gid));
-
- fstrcpy(map->nt_name, grp->gr_name);
- fstrcpy(map->comment, "Local Unix Group");
+ return False;
}
return True;
Modified: trunk/source/groupdb/mapping.c
===================================================================
--- trunk/source/groupdb/mapping.c 2004-09-29 13:34:41 UTC (rev 2752)
+++ trunk/source/groupdb/mapping.c 2004-09-29 15:26:38 UTC (rev 2753)
@@ -934,25 +934,12 @@
if ( (grp=getgrgid(gid)) == NULL)
return False;
- /*
- * make a group map from scratch if doesn't exist.
- */
-
become_root();
ret = pdb_getgrgid(map, gid);
unbecome_root();
if ( !ret ) {
- map->gid=gid;
- map->sid_name_use=SID_NAME_ALIAS;
-
- /* interim solution until we have a last RID allocated */
-
- sid_copy(&map->sid, get_global_sam_sid());
- sid_append_rid(&map->sid, pdb_gid_to_group_rid(gid));
-
- fstrcpy(map->nt_name, grp->gr_name);
- fstrcpy(map->comment, "Local Unix Group");
+ return False;
}
return True;
More information about the samba-cvs
mailing list