[Da-tools-commits] ./debian/userdir-ldap r484: Also do the subgroups/transitive stuff dance when considering if a user is in a group for exporting them to a host in the first place

Peter Palfrader peter at palfrader.org
Sun Nov 23 21:08:45 UTC 2008


------------------------------------------------------------
revno: 484
committer: Peter Palfrader <peter at palfrader.org>
branch nick: userdir-ldap
timestamp: Sun 2008-11-23 22:08:45 +0100
message:
  Also do the subgroups/transitive stuff dance when considering if a user is in a group for exporting them to a host in the first place
modified:
  debian/changelog
  ud-generate
-------------- next part --------------
=== modified file 'debian/changelog'
--- a/debian/changelog	2008-11-23 21:08:03 +0000
+++ b/debian/changelog	2008-11-23 21:08:45 +0000
@@ -4,8 +4,11 @@
   * Fix group does not exist warning (layout/spacing issues).
   * call addGroups with the proper number of arguments, when doing so
     recursively.
+  * Also do the subgroups/transitive stuff dance when considering
+    if a user is in a group for exporting them to a host in the
+    first place.
 
- -- Peter Palfrader <weasel at debian.org>  Sun, 23 Nov 2008 22:07:47 +0100
+ -- Peter Palfrader <weasel at debian.org>  Sun, 23 Nov 2008 22:08:17 +0100
 
 userdir-ldap (0.3.51) unstable; urgency=low
 

=== modified file 'ud-generate'
--- a/ud-generate	2008-11-23 21:08:03 +0000
+++ b/ud-generate	2008-11-23 21:08:45 +0000
@@ -91,13 +91,10 @@
   if DnRecord[1].has_key("supplementaryGid") == 0:
      return 0;
 
-  # Check the supplementary groups
-  for I in DnRecord[1]["supplementaryGid"]:
-     s = I.split('@', 1)
-     group = s[0]
-     if len(s) == 2 and s[1] != CurrentHost:
-           continue;
-     if Allowed.has_key(group):
+  supgroups=[]
+  addGroups(supgroups, DnRecord[1]["supplementaryGid"], GetAttr(DnRecord,"uid"))
+  for g in supgroups:
+     if Allowed.has_key(g):
         return 1;
   return 0;
 



More information about the Da-tools-commits mailing list