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 |
|
|
--- e-smith-ldap-5.2.0/root/etc/e-smith/templates/home/e-smith/db/ldap/ldif/template-begin.group-attrs 2010-11-04 19:32:27.000000000 -0600 |
4 |
|
|
+++ e-smith-ldap-5.2.0/root/etc/e-smith/templates/home/e-smith/db/ldap/ldif/template-begin 2010-11-04 19:31:24.000000000 -0600 |
5 |
|
|
@@ -97,7 +97,7 @@ |
6 |
|
|
endpwent(); |
7 |
|
|
|
8 |
|
|
# Read in group details |
9 |
|
|
- while(my ($key,$pwd,$gid,$members) = getgrent()) |
10 |
|
|
+ while(my ($key,undef,$gid,$members) = getgrent()) |
11 |
|
|
{ |
12 |
|
|
# skip non sme groups |
13 |
|
|
$account = $a->get($key) || next; |
14 |
|
|
@@ -111,15 +111,14 @@ |
15 |
|
|
|
16 |
|
|
$ldif->{$dn}->{objectClass} = [ qw(posixGroup) ]; |
17 |
|
|
$ldif->{$dn}->{cn} = $key; |
18 |
|
|
- $ldif->{$dn}->{userPassword} = ($pwd =~ m/^\{/) ? $pwd : "\{CRYPT\}$pwd"; |
19 |
|
|
$ldif->{$dn}->{gidNumber} = $gid; |
20 |
|
|
- $ldif->{$dn}->{description} = $ldif->{$dnmap->{$key}->{user}}->{cn} if exists $ldif->{$dnmap->{$key}->{user}}->{cn}; |
21 |
|
|
$ldif->{$dn}->{memberUid} = [ split /\s+/, $members ]; |
22 |
|
|
|
23 |
|
|
if ($type eq 'group') |
24 |
|
|
{ |
25 |
|
|
push @{$ldif->{$dn}->{objectClass}}, 'mailboxRelatedObject'; |
26 |
|
|
$ldif->{$dn}->{mail} = "$key\@$DomainName"; |
27 |
|
|
+ $ldif->{$dn}->{description} = $ldif->{$dnmap->{$key}->{user}}->{cn} if exists $ldif->{$dnmap->{$key}->{user}}->{cn}; |
28 |
|
|
} |
29 |
|
|
} |
30 |
|
|
endgrent(); |
31 |
|
|
@@ -133,9 +132,7 @@ |
32 |
|
|
$dnmap->{$group}->{group} = $dn; |
33 |
|
|
|
34 |
|
|
$ldif->{$dn}->{objectClass} = [ qw(posixGroup) ]; |
35 |
|
|
- @{$ldif->{$dn}}{'cn','userPassword','gidNumber','memberUid'} = getgrnam($group); |
36 |
|
|
- $ldif->{$dn}->{userPassword} =~ s/^/{CRYPT}/ unless $ldif->{$dn}->{userPassword} =~ m/^\{/; |
37 |
|
|
- $ldif->{$dn}->{description} = $ldif->{$dnmap->{$key}->{user}}->{cn} if exists $ldif->{$dnmap->{$key}->{user}}->{cn}; |
38 |
|
|
+ @{$ldif->{$dn}}{'cn','junk','gidNumber','memberUid'} = getgrnam($group); |
39 |
|
|
$ldif->{$dn}->{memberUid} = [ split /\s+/, $ldif->{$dn}->{memberUid} ]; |
40 |
|
|
|
41 |
|
|
if ($group eq 'shared'){ |