/[smeserver]/rpms/e-smith-ldap/sme8/e-smith-ldap-5.2.0-fix_ldap_update.patch
ViewVC logotype

Contents of /rpms/e-smith-ldap/sme8/e-smith-ldap-5.2.0-fix_ldap_update.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Thu Oct 28 12:26:10 2010 UTC (13 years, 6 months ago) by slords
Branch: MAIN
CVS Tags: e-smith-ldap-5_2_0-76_el5_sme, e-smith-ldap-5_2_0-71_el5_sme, e-smith-ldap-5_2_0-77_el5_sme, e-smith-ldap-5_2_0-78_el5_sme, e-smith-ldap-5_2_0-61_el5_sme, e-smith-ldap-5_2_0-66_el5_sme, e-smith-ldap-5_2_0-70_el5_sme, e-smith-ldap-5_2_0-79_el5_sme, e-smith-ldap-5_2_0-81_el5_sme, e-smith-ldap-5_2_0-59_el5_sme, e-smith-ldap-5_2_0-75_el5_sme, e-smith-ldap-5_2_0-56_el5_sme, e-smith-ldap-5_2_0-55_el5_sme, e-smith-ldap-5_2_0-57_el5_sme, e-smith-ldap-5_2_0-73_el5_sme, e-smith-ldap-5_2_0-69_el5_sme, e-smith-ldap-5_2_0-72_el5_sme, e-smith-ldap-5_2_0-65_el5_sme, e-smith-ldap-5_2_0-80_el5_sme, e-smith-ldap-5_2_0-74_el5_sme, e-smith-ldap-5_2_0-63_el5_sme, e-smith-ldap-5_2_0-60_el5_sme, e-smith-ldap-5_2_0-62_el5_sme, e-smith-ldap-5_2_0-68_el5_sme, e-smith-ldap-5_2_0-67_el5_sme, e-smith-ldap-5_2_0-64_el5_sme, HEAD
Changes since 1.1: +1 -1 lines
Not need for desc

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-28 09:33:15.000000000 +0200
3 +++ mezzanine_patched_e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/ldap-update 2010-10-28 09:33:13.000000000 +0200
4 @@ -163,28 +163,30 @@
5 warn "failed to add/update entry ou=$obj,$base: ", $result->error if $result->code;
6 }
7
8 +my $updates;
9 +
10 #------------------------------------------------------------
11 # Ensure nobody, shared, www objects are there
12 #------------------------------------------------------------
13 foreach my $user (qw/www/){
14 - my $dn = "cn=$group,ou=Users,$base";
15 + my $dn = "uid=$user,ou=Users,$base";
16 utf8::upgrade($dn);
17 $updates->{$dn}->{objectClass} = ['account', 'posixAccount', 'shadowAccount'];
18
19 # Read information from getent passwd
20 - @{$updates->{$dn}}{'uid','userPassword','uidNumber','gidNumber','junk','junk','gecos','homeDirectory','loginShell'} = getpwnam($key);
21 + @{$updates->{$dn}}{'uid','userPassword','uidNumber','gidNumber','junk','junk','gecos','homeDirectory','loginShell'} = getpwnam($user);
22 $updates->{$dn}->{userPassword} =~ s/^/{CRYPT}/ unless $updates->{$dn}->{userPassword} =~ m/^{/;
23 - $desc = $updates->{$dn}->{cn} = $updates->{$dn}->{gecos};
24 + $updates->{$dn}->{cn} = $updates->{$dn}->{gecos};
25
26 # Samba parameters if we find the samba.schema
27 if ( -f "$schema" and -x '/usr/bin/pdbedit' )
28 {
29 - my $line = `/usr/bin/pdbedit -wu '$key' 2> /dev/null`;
30 + my $line = `/usr/bin/pdbedit -wu '$user' 2> /dev/null`;
31 chomp($line);
32 if ($line)
33 {
34 @{$updates->{$dn}}{'junk','junk','sambaLMPassword','sambaNTPassword'} = split(/:/,$line);
35 - foreach $line (`/usr/bin/pdbedit -vu '$key' 2> /dev/null`)
36 + foreach $line (`/usr/bin/pdbedit -vu '$user' 2> /dev/null`)
37 {
38 chomp($line);
39 $updates->{$dn}->{sambaSID} = $1 if $line =~ m{User SID:\s+(S-.*)$};
40 @@ -229,7 +231,6 @@
41 #------------------------------------------------------------
42 # Create a list of updates that need to happen
43 #------------------------------------------------------------
44 -my $updates;
45 foreach my $acct (@accounts)
46 {
47 my $key = $acct->key;

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed