/[smeserver]/rpms/e-smith-base/sme8/e-smith-base-5.2.0-cpu-can-delete.patch
ViewVC logotype

Annotation of /rpms/e-smith-base/sme8/e-smith-base-5.2.0-cpu-can-delete.patch

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


Revision 1.1 - (hide annotations) (download)
Sat Nov 6 06:12:31 2010 UTC (13 years, 11 months ago) by slords
Branch: MAIN
CVS Tags: e-smith-base-5_2_0-67_el5_sme, e-smith-base-5_2_0-71_el5_sme, e-smith-base-5_2_0-52_el5_sme, e-smith-base-5_2_0-51_el5_sme, e-smith-base-5_2_0-53_el5_sme, e-smith-base-5_2_0-68_el5_sme, e-smith-base-5_2_0-77_el5_sme, e-smith-base-5_2_0-59_el5_sme, e-smith-base-5_2_0-56_el5_sme, e-smith-base-5_2_0-55_el5_sme, e-smith-base-5_2_0-78_el5_sme, e-smith-base-5_2_0-86_el5_sme, e-smith-base-5_2_0-76_el5_sme, e-smith-base-5_2_0-84_el5_sme, e-smith-base-5_2_0-65_el5_sme, e-smith-base-5_2_0-88_el5_sme, e-smith-base-5_2_0-64_el5_sme, e-smith-base-5_2_0-81_el5_sme, e-smith-base-5_2_0-82_el5_sme, e-smith-base-5_2_0-50_el5_sme, e-smith-base-5_2_0-57_el5_sme, e-smith-base-5_2_0-89_el5_sme, e-smith-base-5_2_0-90_el5_sme, e-smith-base-5_2_0-87_el5_sme, e-smith-base-5_2_0-80_el5_sme, e-smith-base-5_2_0-70_el5_sme, e-smith-base-5_2_0-66_el5_sme, e-smith-base-5_2_0-63_el5_sme, e-smith-base-5_2_0-61_el5_sme, e-smith-base-5_2_0-60_el5_sme, e-smith-base-5_2_0-58_el5_sme, e-smith-base-5_2_0-85_el5_sme, e-smith-base-5_2_0-69_el5_sme, e-smith-base-5_2_0-79_el5_sme, e-smith-base-5_2_0-72_el5_sme, e-smith-base-5_2_0-75_el5_sme, e-smith-base-5_2_0-73_el5_sme, e-smith-base-5_2_0-54_el5_sme, e-smith-base-5_2_0-62_el5_sme, e-smith-base-5_2_0-74_el5_sme, e-smith-base-5_2_0-83_el5_sme
* Fri Nov 5 2010 Shad L. Lords <slords@lordsfam.net 5.2.0-50.sme
- Allow cpu to remove empty attributes [SME: 6343]

1 slords 1.1 diff -up e-smith-base-5.2.0/root/etc/e-smith/events/actions/user-create-unix.cpu-can-delete e-smith-base-5.2.0/root/etc/e-smith/events/actions/user-create-unix
2     --- e-smith-base-5.2.0/root/etc/e-smith/events/actions/user-create-unix.cpu-can-delete 2010-11-05 23:48:18.000000000 -0600
3     +++ e-smith-base-5.2.0/root/etc/e-smith/events/actions/user-create-unix 2010-11-06 00:07:59.000000000 -0600
4     @@ -108,15 +108,13 @@ system(
5     ) == 0 or ( $x = $ldapauth ne 'enabled' ? $x : 255, warn "Failed to create (ldap) group $userName.\n" );
6    
7     # Now create the user account (in ldap)
8     -my @attrs;
9     my $tmpattr = File::Temp->new();
10     -print $tmpattr "telephoneNumber: $phone\n" if $phone;
11     -print $tmpattr "o: $company\n" if $company;
12     -print $tmpattr "ou: $dept\n" if $dept;
13     -print $tmpattr "l: $city\n" if $city;
14     -print $tmpattr "street: $street\n" if $street;
15     +print $tmpattr "telephoneNumber: $phone\n";
16     +print $tmpattr "o: $company\n";
17     +print $tmpattr "ou: $dept\n";
18     +print $tmpattr "l: $city\n";
19     +print $tmpattr "street: $street\n";
20     $tmpattr->flush();
21     -push @attrs, ('-a', "$tmpattr") if -s $tmpattr;
22     system(
23     "/usr/sbin/cpu", "useradd",
24     "-u", $uid,
25     @@ -125,7 +123,7 @@ system(
26     "-f", "$first",
27     "-E", "$last",
28     "-e", "$userName\@$domain",
29     - @attrs,
30     + "-a", "$tmpattr",
31     "-d", "/home/e-smith/files/users/$userName",
32     "-G", "shared",
33     "-m",
34     diff -up e-smith-base-5.2.0/root/etc/e-smith/events/actions/user-modify-unix.cpu-can-delete e-smith-base-5.2.0/root/etc/e-smith/events/actions/user-modify-unix
35     --- e-smith-base-5.2.0/root/etc/e-smith/events/actions/user-modify-unix.cpu-can-delete 2010-11-05 23:48:18.000000000 -0600
36     +++ e-smith-base-5.2.0/root/etc/e-smith/events/actions/user-modify-unix 2010-11-06 00:09:45.000000000 -0600
37     @@ -130,16 +130,14 @@ foreach my $u (@users)
38     my $new_city = $u->prop('City') || '';
39     my $new_street = $u->prop('Street') || '';
40    
41     - my @attrs;
42     my $tmpattr = File::Temp->new();
43     - print $tmpattr "telephoneNumber: $new_phone\n" if $new_phone;
44     - print $tmpattr "o: $new_company\n" if $new_company;
45     - print $tmpattr "ou: $new_dept\n" if $new_dept;
46     - print $tmpattr "l: $new_city\n" if $new_city;
47     - print $tmpattr "street: $new_street\n" if $new_street;
48     + print $tmpattr "telephoneNumber: $new_phone\n";
49     + print $tmpattr "o: $new_company\n";
50     + print $tmpattr "ou: $new_dept\n";
51     + print $tmpattr "l: $new_city\n";
52     + print $tmpattr "street: $new_street\n";
53     $tmpattr->flush();
54     - push @attrs, ('-a', "$tmpattr") if -s $tmpattr;
55     - system("/usr/sbin/cpu", "usermod", @attrs, "-e", "$userName\@$domain", "-G", "$groups", $userName) == 0
56     + system("/usr/sbin/cpu", "usermod", "-a", "$tmpattr", "-e", "$userName\@$domain", "-G", "$groups", $userName) == 0
57     or ( $x = $ldapauth ne 'enabled' ? $x : 255, warn "Failed to modify email of (ldap) account $userName.\n" );
58     undef $tmpattr;
59     }

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