1 |
vip-ire |
1.1 |
diff -Nur -x '*.orig' -x '*.rej' e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/ldap-update mezzanine_patched_e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/ldap-update |
2 |
|
|
--- e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/ldap-update 2010-10-27 09:21:50.000000000 +0200 |
3 |
|
|
+++ mezzanine_patched_e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/ldap-update 2010-10-27 09:21:35.000000000 +0200 |
4 |
|
|
@@ -273,6 +273,26 @@ |
5 |
|
|
endpwent(); |
6 |
|
|
endgrent(); |
7 |
|
|
|
8 |
|
|
+ |
9 |
|
|
+# Nobody and shared are special groups used by samba |
10 |
|
|
+foreach my $group (qw/nobody shared/){ |
11 |
|
|
+ my $dn = "cn=$group,ou=Groups,$base"; |
12 |
|
|
+ @{$updates->{$dn}}{'cn','userPassword','gidNumber','memberUid'} = getgrnam($group); |
13 |
|
|
+ utf8::upgrade($dn); |
14 |
|
|
+ $updates->{$dn}->{objectClass} = ['posixGroup', 'mailboxRelatedObject']; |
15 |
|
|
+ $updates->{$dn}->{userPassword} =~ s/^/{CRYPT}/ unless $updates->{$dn}->{userPassword} =~ m/^{/; |
16 |
|
|
+ $updates->{$dn}->{memberUid} = [ split /\s+/, $updates->{$dn}->{memberUid} ]; |
17 |
|
|
+ if ( -f "$schema" and exists $groupmap->{$group} ) |
18 |
|
|
+ { |
19 |
|
|
+ push @{$updates->{$dn}->{objectClass}}, 'sambaGroupMapping'; |
20 |
|
|
+ $updates->{$dn}->{displayName} = $groupmap->{$group}->{name}; |
21 |
|
|
+ $updates->{$dn}->{sambaSID} = $groupmap->{$group}->{sid}; |
22 |
|
|
+ $updates->{$dn}->{sambaGroupType} = '2'; |
23 |
|
|
+ } |
24 |
|
|
+} |
25 |
|
|
+endgrent(); |
26 |
|
|
+ |
27 |
|
|
+ |
28 |
|
|
#------------------------------------------------------------ |
29 |
|
|
# Update LDAP database entry. |
30 |
|
|
#------------------------------------------------------------ |