1 |
slords |
1.1 |
diff -up e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/ldap-update.group-attrs e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/ldap-update |
2 |
|
|
diff -up e-smith-ldap-5.2.0/root/etc/e-smith/templates/home/e-smith/db/ldap/ldif/template-begin.group-attrs e-smith-ldap-5.2.0/root/etc/e-smith/templates/home/e-smith/db/ldap/ldif/template-begin |
3 |
slords |
1.2 |
diff -up e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/ldap-update.group-attrs e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/ldap-update |
4 |
|
|
--- e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/ldap-update.group-attrs 2010-11-04 23:03:07.000000000 -0600 |
5 |
|
|
+++ e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/ldap-update 2010-11-04 23:05:21.000000000 -0600 |
6 |
|
|
@@ -207,8 +207,7 @@ foreach my $group (qw/nobody shared www/ |
7 |
|
|
$updates->{$dn}->{objectClass} = ['posixGroup']; |
8 |
|
|
|
9 |
|
|
# Read information from getent group |
10 |
|
|
- @{$updates->{$dn}}{'cn','userPassword','gidNumber','memberUid'} = getgrnam($group); |
11 |
|
|
- $updates->{$dn}->{userPassword} =~ s/^/{CRYPT}/ unless $updates->{$dn}->{userPassword} =~ m/^{/; |
12 |
|
|
+ @{$updates->{$dn}}{'cn','junk','gidNumber','memberUid'} = getgrnam($group); |
13 |
|
|
$updates->{$dn}->{memberUid} = [ split /\s+/, $updates->{$dn}->{memberUid} ]; |
14 |
|
|
|
15 |
|
|
# Ensure groups have the needed properties |
16 |
|
|
@@ -311,9 +310,7 @@ foreach my $acct (@accounts) |
17 |
|
|
$updates->{$dn}->{objectClass} = ['posixGroup']; |
18 |
|
|
|
19 |
|
|
# Read information from getent group |
20 |
|
|
- @{$updates->{$dn}}{'cn','userPassword','gidNumber','memberUid'} = getgrnam($key); |
21 |
|
|
- $updates->{$dn}->{userPassword} =~ s/^/{CRYPT}/ unless $updates->{$dn}->{userPassword} =~ m/^{/; |
22 |
|
|
- $updates->{$dn}->{description} = $desc if $desc; |
23 |
|
|
+ @{$updates->{$dn}}{'cn','junk','gidNumber','memberUid'} = getgrnam($key); |
24 |
|
|
$updates->{$dn}->{memberUid} = [ split /\s+/, $updates->{$dn}->{memberUid} ]; |
25 |
|
|
|
26 |
|
|
# Ensure groups have the needed properties |
27 |
|
|
@@ -321,6 +318,7 @@ foreach my $acct (@accounts) |
28 |
|
|
{ |
29 |
|
|
push @{$updates->{$dn}->{objectClass}}, 'mailboxRelatedObject'; |
30 |
|
|
$updates->{$dn}->{mail} = "$key\@$domain"; |
31 |
|
|
+ $updates->{$dn}->{description} = $desc if $desc; |
32 |
|
|
} |
33 |
|
|
|
34 |
|
|
# Samba parameters if we find the samba.schema |
35 |
|
|
diff -up e-smith-ldap-5.2.0/root/etc/e-smith/templates/home/e-smith/db/ldap/ldif/template-begin.group-attrs e-smith-ldap-5.2.0/root/etc/e-smith/templates/home/e-smith/db/ldap/ldif/template-begin |
36 |
|
|
--- e-smith-ldap-5.2.0/root/etc/e-smith/templates/home/e-smith/db/ldap/ldif/template-begin.group-attrs 2010-11-04 23:03:07.000000000 -0600 |
37 |
|
|
+++ e-smith-ldap-5.2.0/root/etc/e-smith/templates/home/e-smith/db/ldap/ldif/template-begin 2010-11-04 23:04:08.000000000 -0600 |
38 |
slords |
1.1 |
@@ -97,7 +97,7 @@ |
39 |
|
|
endpwent(); |
40 |
|
|
|
41 |
|
|
# Read in group details |
42 |
|
|
- while(my ($key,$pwd,$gid,$members) = getgrent()) |
43 |
|
|
+ while(my ($key,undef,$gid,$members) = getgrent()) |
44 |
|
|
{ |
45 |
|
|
# skip non sme groups |
46 |
|
|
$account = $a->get($key) || next; |
47 |
|
|
@@ -111,15 +111,14 @@ |
48 |
|
|
|
49 |
|
|
$ldif->{$dn}->{objectClass} = [ qw(posixGroup) ]; |
50 |
|
|
$ldif->{$dn}->{cn} = $key; |
51 |
|
|
- $ldif->{$dn}->{userPassword} = ($pwd =~ m/^\{/) ? $pwd : "\{CRYPT\}$pwd"; |
52 |
|
|
$ldif->{$dn}->{gidNumber} = $gid; |
53 |
|
|
- $ldif->{$dn}->{description} = $ldif->{$dnmap->{$key}->{user}}->{cn} if exists $ldif->{$dnmap->{$key}->{user}}->{cn}; |
54 |
|
|
$ldif->{$dn}->{memberUid} = [ split /\s+/, $members ]; |
55 |
|
|
|
56 |
|
|
if ($type eq 'group') |
57 |
|
|
{ |
58 |
|
|
push @{$ldif->{$dn}->{objectClass}}, 'mailboxRelatedObject'; |
59 |
|
|
$ldif->{$dn}->{mail} = "$key\@$DomainName"; |
60 |
|
|
+ $ldif->{$dn}->{description} = $ldif->{$dnmap->{$key}->{user}}->{cn} if exists $ldif->{$dnmap->{$key}->{user}}->{cn}; |
61 |
|
|
} |
62 |
|
|
} |
63 |
|
|
endgrent(); |
64 |
|
|
@@ -133,9 +132,7 @@ |
65 |
|
|
$dnmap->{$group}->{group} = $dn; |
66 |
|
|
|
67 |
|
|
$ldif->{$dn}->{objectClass} = [ qw(posixGroup) ]; |
68 |
|
|
- @{$ldif->{$dn}}{'cn','userPassword','gidNumber','memberUid'} = getgrnam($group); |
69 |
|
|
- $ldif->{$dn}->{userPassword} =~ s/^/{CRYPT}/ unless $ldif->{$dn}->{userPassword} =~ m/^\{/; |
70 |
|
|
- $ldif->{$dn}->{description} = $ldif->{$dnmap->{$key}->{user}}->{cn} if exists $ldif->{$dnmap->{$key}->{user}}->{cn}; |
71 |
|
|
+ @{$ldif->{$dn}}{'cn','junk','gidNumber','memberUid'} = getgrnam($group); |
72 |
|
|
$ldif->{$dn}->{memberUid} = [ split /\s+/, $ldif->{$dn}->{memberUid} ]; |
73 |
|
|
|
74 |
|
|
if ($group eq 'shared'){ |