/[smeserver]/rpms/e-smith-samba/sme8/e-smith-samba-2.2.0-better-ldap.patch
ViewVC logotype

Annotation of /rpms/e-smith-samba/sme8/e-smith-samba-2.2.0-better-ldap.patch

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


Revision 1.3 - (hide annotations) (download)
Wed Nov 3 18:55:20 2010 UTC (14 years, 1 month ago) by slords
Branch: MAIN
CVS Tags: e-smith-samba-2_2_0-47_el5_sme, e-smith-samba-2_2_0-52_el5_sme, e-smith-samba-2_2_0-49_el5_sme, e-smith-samba-2_2_0-40_el5_sme, e-smith-samba-2_2_0-43_el5_sme, e-smith-samba-2_2_0-44_el5_sme, e-smith-samba-2_2_0-63_el5_sme, e-smith-samba-2_2_0-61_el5_sme, e-smith-samba-2_2_0-57_el5_sme, e-smith-samba-2_2_0-54_el5_sme, e-smith-samba-2_2_0-41_el5_sme, e-smith-samba-2_2_0-55_el5_sme, e-smith-samba-2_2_0-39_el5_sme, e-smith-samba-2_2_0-46_el5_sme, e-smith-samba-2_2_0-53_el5_sme, e-smith-samba-2_2_0-50_el5_sme, e-smith-samba-2_2_0-58_el5_sme, e-smith-samba-2_2_0-56_el5_sme, e-smith-samba-2_2_0-51_el5_sme, e-smith-samba-2_2_0-42_el5_sme, e-smith-samba-2_2_0-65_el5_sme, e-smith-samba-2_2_0-64_el5_sme, e-smith-samba-2_2_0-60_el5_sme, e-smith-samba-2_2_0-62_el5_sme, e-smith-samba-2_2_0-35_el5_sme, e-smith-samba-2_2_0-45_el5_sme, e-smith-samba-2_2_0-48_el5_sme, e-smith-samba-2_2_0-37_el5_sme, e-smith-samba-2_2_0-38_el5_sme, e-smith-samba-2_2_0-36_el5_sme, e-smith-samba-2_2_0-66_el5_sme, e-smith-samba-2_2_0-59_el5_sme, HEAD
Changes since 1.2: +2 -2 lines
* Wed Nov 3 2010 Shad L. Lords <slords@lordsfam.net 2.2.0-35.sme
- Fix cpu critical patch missing ' [SME: 6330]

1 slords 1.1 diff -up e-smith-samba-2.2.0/root/etc/e-smith/events/actions/create-machine-account.better-ldap e-smith-samba-2.2.0/root/etc/e-smith/events/actions/create-machine-account
2     --- e-smith-samba-2.2.0/root/etc/e-smith/events/actions/create-machine-account.better-ldap 2010-11-02 13:25:37.000000000 -0600
3     +++ e-smith-samba-2.2.0/root/etc/e-smith/events/actions/create-machine-account 2010-11-02 13:31:21.000000000 -0600
4     @@ -31,6 +31,8 @@ my $a = esmith::AccountsDB->open || die
5     my $c = esmith::ConfigDB->open_ro || die "Could not open Config DB";
6    
7     my $ldapauth = $c->get('ldap')->prop('Authentication') || 'disabled';
8     +my $x = 0; # exit value
9     +
10     my $domain = $c->get('DomainName')->value();
11     my $base = esmith::util::ldapBase ($domain);
12    
13     @@ -60,27 +62,7 @@ esmith::util::setRealToEffective();
14    
15     warn "create-machine-account $machineName: Creating Unix user and group\n";
16    
17     -if ($ldapauth eq 'enabled')
18     -{
19     - system(
20     - "/usr/sbin/cpu", "-C/etc/cpu-system.conf", "useradd",
21     - "--userbase=ou=Computers,$base",
22     - "-c", "Hostname account for $machineName",
23     - "-o",
24     - "-d", "/noexistingpath",
25     - "-s", "/bin/false",
26     - "$machineName"
27     - ) == 0 or die "Failed to create account $machineName.\n";
28     -
29     - warn "create-machine-account $machineName: Locking account\n";
30     -
31     - system("/usr/sbin/cpu", "-C/etc/cpu-system.conf", "usermod",
32     - "--userbase=ou=Computers,$base",
33     - "-o",
34     - "-L",
35     - "$machineName"
36     - ) == 0 or warn("Could not lock password for $machineName\n");
37     -}
38     +if ($ldapauth ne 'enabled')
39     else
40     {
41     system(
42     @@ -90,20 +72,37 @@ else
43     "-d", "/noexistingpath",
44     "-s", "/bin/false",
45     "$machineName"
46     - ) == 0 or die "Failed to create account $machineName.\n";
47     -
48     - warn "create-machine-account $machineName: Locking account\n";
49     + ) == 0 or ( $x = 255, warn "Failed to create (unix) account $machineName.\n" );
50    
51     system("/usr/bin/passwd", "-l", "$machineName") == 0
52     - or warn("Could not lock password for $machineName\n");
53     + or ( $x = 255, warn "Failed locking (unix) password for $machineName\n" );
54     }
55    
56     +system(
57     + "/usr/sbin/cpu", "-C/etc/cpu-system.conf", "useradd",
58     + "--userbase=ou=Computers,$base",
59     + "-c", "Hostname account for $machineName",
60     + "-o",
61     + "-d", "/noexistingpath",
62     + "-s", "/bin/false",
63     + "$machineName"
64 slords 1.3 + ) == 0 or ( $x = $ldapauth ne 'enabled' ? $x : 255, warn "Failed to create (ldap) account $machineName.\n" );
65 slords 1.1 +
66     +system("/usr/sbin/cpu", "-C/etc/cpu-system.conf", "usermod",
67     + "--userbase=ou=Computers,$base",
68     + "-o",
69     + "-L",
70     + "$machineName"
71 slords 1.3 +) == 0 or ( $x = $ldapauth ne 'enabled' ? $x : 255, warn "Failed locking (ldap) password for $machineName\n" );
72 slords 1.1 +
73     +warn "create-machine-account $machineName: Locking account\n";
74     +
75     # warn "create-machine-account $machineName: Creating smbpasswd account\n";
76     #
77     # Samba adds the smbpasswd account after it calls this script.
78     # However, we may want to do this if we call this script directly
79     #
80     # system("/usr/bin/smbpasswd", "-a", "-m", "$machineName") == 0
81     -# or warn("Could not create smb password entry for $machineName\n");;
82     +# or warn "Could not create smb password entry for $machineName\n";
83    
84     -exit (0);
85     +exit ($x);

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