projects
/
mirror
/
userdir-ldap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ud-generate: Support $gid@$host supplementary group entries for users.
[mirror/userdir-ldap.git]
/
ud-generate
diff --git
a/ud-generate
b/ud-generate
index
d209700
..
e25411c
100755
(executable)
--- a/
ud-generate
+++ b/
ud-generate
@@
-89,7
+89,11
@@
def IsInGroup(DnRecord):
# Check the supplementary groups
for I in DnRecord[1]["supplementaryGid"]:
# Check the supplementary groups
for I in DnRecord[1]["supplementaryGid"]:
- if Allowed.has_key(I):
+ s = I.split('@', 1)
+ group = s[0]
+ if len(s) == 2 and s[1] != CurrentHost:
+ continue;
+ if Allowed.has_key(group):
return 1;
return 0;
return 1;
return 0;
@@
-376,10
+380,14
@@
def GenGroup(l,File):
continue;
for I in x[1]["supplementaryGid"]:
continue;
for I in x[1]["supplementaryGid"]:
- if GroupMap.has_key(I):
- GroupMap[I].append(GetAttr(x,"uid"));
+ s = I.split('@', 1)
+ group = s[0]
+ if len(s) == 2 and s[1] != CurrentHost:
+ continue;
+ if GroupMap.has_key(group):
+ GroupMap[group].append(GetAttr(x,"uid"));
else:
else:
- print "Group does not exist ",
I
,"but",GetAttr(x,"uid"),"is in it";
+ print "Group does not exist ",
group
,"but",GetAttr(x,"uid"),"is in it";
# Output the group file.
J = 0;
# Output the group file.
J = 0;