/[smeserver]/rpms/e-smith-samba/sme8/e-smith-samba-2.2.0-enable-cpu.patch
ViewVC logotype

Annotation of /rpms/e-smith-samba/sme8/e-smith-samba-2.2.0-enable-cpu.patch

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


Revision 1.3 - (hide annotations) (download)
Tue Nov 2 19:09:27 2010 UTC (14 years, 1 month ago) by vip-ire
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-31_el5_sme, e-smith-samba-2_2_0-32_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-30_el5_sme, e-smith-samba-2_2_0-33_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-34_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
* Tue Nov 2 2010 Daniel Berteaud <daniel@firewall-services.com> 2.2.0-30.sme
- Fix a typo in create-machine-account [SME: 6321]

1 slords 1.1 diff -up e-smith-samba-2.2.0/root/etc/e-smith/events/actions/create-machine-account.enable-cpu 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.enable-cpu 2005-04-19 08:19:17.000000000 -0600
3     +++ e-smith-samba-2.2.0/root/etc/e-smith/events/actions/create-machine-account 2010-11-01 11:57:31.000000000 -0600
4     @@ -28,6 +28,11 @@ use esmith::AccountsDB;
5     use esmith::util;
6    
7     my $a = esmith::AccountsDB->open || die "Couldn't open accounts db\n";
8     +my $c = esmith::ConfigDB->open_ro || die "Could not open Config DB";
9     +
10     +my $ldapauth = $c->get('ldap')->prop('Authentication') || 'disabled';
11     +my $domain = $c->get('DomainName')->value();
12     +my $base = esmith::util::ldapBase ($domain);
13    
14     my $event = $ARGV [0];
15     my $machineName = $ARGV [1];
16     @@ -55,19 +60,43 @@ esmith::util::setRealToEffective();
17    
18     warn "create-machine-account $machineName: Creating Unix user and group\n";
19    
20     -system(
21     - "/usr/sbin/useradd",
22     - "-c", "Hostname account for $machineName",
23     - "-M",
24     - "-d", "/noexistingpath",
25     - "-s", "/bin/false",
26     - "$machineName"
27     - ) == 0 or die "Failed to create account $machineName.\n";
28 slords 1.2 +if ($ldapauth eq 'enabled')
29 slords 1.1 +{
30     + system(
31     + "/usr/sbin/cpu", "-C/etc/cpu-system.conf", "useradd",
32 vip-ire 1.3 + "--userbase=ou=Computers,$base",
33 slords 1.1 + "-c", "Hostname account for $machineName",
34     + "-o",
35     + "-d", "/noexistingpath",
36     + "-s", "/bin/false",
37     + "$machineName"
38     + ) == 0 or die "Failed to create account $machineName.\n";
39     +
40     + warn "create-machine-account $machineName: Locking account\n";
41     +
42     + system("/usr/sbin/cpu", "-C/etc/cpu-system.conf", "usermod",
43 vip-ire 1.3 + "--userbase=ou=Computers,$base",
44 slords 1.1 + "-o",
45     + "-L",
46     + "$machineName"
47     + ) == 0 or warn("Could not lock password for $machineName\n");
48     +}
49     +else
50     +{
51     + system(
52     + "/usr/sbin/useradd",
53     + "-c", "Hostname account for $machineName",
54     + "-M",
55     + "-d", "/noexistingpath",
56     + "-s", "/bin/false",
57     + "$machineName"
58     + ) == 0 or die "Failed to create account $machineName.\n";
59    
60     -warn "create-machine-account $machineName: Locking account\n";
61     + warn "create-machine-account $machineName: Locking account\n";
62    
63     -system("/usr/bin/passwd", "-l", "$machineName") == 0
64     - or warn("Could not lock password for $machineName\n");
65     + system("/usr/bin/passwd", "-l", "$machineName") == 0
66     + or warn("Could not lock password for $machineName\n");
67     +}
68    
69     # warn "create-machine-account $machineName: Creating smbpasswd account\n";
70     #

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