From: Peter Palfrader Date: Sun, 23 Nov 2008 21:08:45 +0000 (+0100) Subject: Also do the subgroups/transitive stuff dance when considering if a user is in a group... X-Git-Tag: userdir-ldap-0.3.52~1 X-Git-Url: https://wiki.adam-barratt.org.uk/gitweb/?a=commitdiff_plain;h=be971636d402d3a488109573c9f1ed1e63cea40c;p=mirror%2Fuserdir-ldap.git 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 --- diff --git a/debian/changelog b/debian/changelog index e92398b..26510c0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,8 +4,11 @@ userdir-ldap (0.3.XX) unstable; urgency=low * 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 Sun, 23 Nov 2008 22:07:47 +0100 + -- Peter Palfrader Sun, 23 Nov 2008 22:08:17 +0100 userdir-ldap (0.3.51) unstable; urgency=low diff --git a/ud-generate b/ud-generate index 11a82a8..f1ed0b0 100755 --- a/ud-generate +++ b/ud-generate @@ -91,13 +91,10 @@ def IsInGroup(DnRecord): 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;