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

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

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


Revision 1.1 - (show annotations) (download)
Thu Sep 23 17:57:34 2010 UTC (13 years, 7 months ago) by vip-ire
Branch: MAIN
CVS Tags: e-smith-ldap-5_2_0-29_el5_sme, e-smith-ldap-5_2_0-31_el5_sme, e-smith-ldap-5_2_0-49_el5_sme, e-smith-ldap-5_2_0-76_el5_sme, e-smith-ldap-5_2_0-71_el5_sme, e-smith-ldap-5_2_0-39_el5_sme, e-smith-ldap-5_2_0-77_el5_sme, e-smith-ldap-5_2_0-50_el5_sme, e-smith-ldap-5_2_0-78_el5_sme, e-smith-ldap-5_2_0-37_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-36_el5_sme, e-smith-ldap-5_2_0-59_el5_sme, e-smith-ldap-5_2_0-45_el5_sme, e-smith-ldap-5_2_0-75_el5_sme, e-smith-ldap-5_2_0-46_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-48_el5_sme, e-smith-ldap-5_2_0-44_el5_sme, e-smith-ldap-5_2_0-52_el5_sme, e-smith-ldap-5_2_0-51_el5_sme, e-smith-ldap-5_2_0-35_el5_sme, e-smith-ldap-5_2_0-72_el5_sme, e-smith-ldap-5_2_0-34_el5_sme, e-smith-ldap-5_2_0-28_el5_sme, e-smith-ldap-5_2_0-65_el5_sme, e-smith-ldap-5_2_0-54_el5_sme, e-smith-ldap-5_2_0-53_el5_sme, e-smith-ldap-5_2_0-43_el5_sme, e-smith-ldap-5_2_0-47_el5_sme, e-smith-ldap-5_2_0-40_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-41_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-42_el5_sme, e-smith-ldap-5_2_0-30_el5_sme, e-smith-ldap-5_2_0-38_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
* Thu Sep 23 2010 Daniel Berteaud <daniel@firewall-services.com> 5.2.0-28.sme
- Add posixAccount attributes in LDAP [SME: 6074]

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-09-23 19:44:01.000000000 +0200
3 +++ mezzanine_patched_e-smith-ldap-5.2.0/root/etc/e-smith/events/actions/ldap-update 2010-09-23 19:43:59.000000000 +0200
4 @@ -80,8 +80,21 @@
5 #------------------------------------------------------------
6 my $pw = esmith::util::LdapPassword();
7 my %passwd;
8 -
9 -while(my ($key,$pwd) = getpwent()) { $passwd{$key} = "{CRYPT}$pwd"; }
10 +my %uid;
11 +my %gid;
12 +my %home;
13 +my %shell;
14 +
15 +while(my ($key,$pwd,$uid,$gid,
16 + undef,undef,undef,
17 + $home,$shell) = getpwent()) {
18 +
19 + $passwd{$key} = "{CRYPT}$pwd";
20 + $uid{$key} = $uid;
21 + $gid{$key} = $gid;
22 + $home{$key} = $home;
23 + $shell{$key} = $shell;
24 +}
25 endpwent();
26
27 #------------------------------------------------------------
28 @@ -129,7 +142,12 @@
29 utf8::upgrade($street);
30 my $password = $passwd{$key} || '';
31 utf8::upgrade($password);
32 - push @attrs, (objectClass => 'inetOrgPerson');
33 + my $uid = $uid{$key} || '';
34 + my $gid = $gid{$key} || '';
35 + my $home = $home{$key} || '';
36 + my $shell = $shell{$key} || '';
37 +
38 + push @attrs, (objectClass => ['inetOrgPerson', 'posixAccount']);
39 push @attrs, (uid => $key);
40
41 push @attrs, (cn => $name) unless ($name =~ /^\s*$/);
42 @@ -142,6 +160,10 @@
43 push @attrs, (l => $city) unless $city =~ /^\s*$/;
44 push @attrs, (street => $street) unless $street =~ /^\s*$/;
45 push @attrs, (userPassword => $password) unless $password =~ /^\s*$/;
46 + push @attrs, (uidNumber => $uid) unless $uid =~ /^\s*$/;
47 + push @attrs, (gidNumber => $gid) unless $gid =~ /^\s*$/;
48 + push @attrs, (homeDirectory => $home) unless $home =~ /^\s*$/;
49 + push @attrs, (loginShell => $shell) unless $shell =~ /^\s*$/;
50 }
51 elsif ($type eq 'group')
52 {
53 diff -Nur -x '*.orig' -x '*.rej' e-smith-ldap-5.2.0/root/etc/e-smith/templates/home/e-smith/db/ldap/ldif/50users mezzanine_patched_e-smith-ldap-5.2.0/root/etc/e-smith/templates/home/e-smith/db/ldap/ldif/50users
54 --- e-smith-ldap-5.2.0/root/etc/e-smith/templates/home/e-smith/db/ldap/ldif/50users 2010-09-23 19:44:01.000000000 +0200
55 +++ mezzanine_patched_e-smith-ldap-5.2.0/root/etc/e-smith/templates/home/e-smith/db/ldap/ldif/50users 2010-09-23 19:25:45.000000000 +0200
56 @@ -12,11 +12,16 @@
57 my $dept = $user->prop('Dept');
58 my $city = $user->prop('City');
59 my $street = $user->prop('Street');
60 + my $uid = $uid{$key};
61 + my $gid = $gid{$key};
62 my $password = $passwd{$key};
63 + my $home = $home{$key};
64 + my $shell = $shell{$key};
65
66 $OUT .= "\n";
67 $OUT .= utf8("dn: uid=$key,ou=Users,$ldapBase\n");
68 $OUT .= utf8("objectClass: inetOrgPerson\n");
69 + $OUT .= utf8("objectClass: posixAccount\n");
70 $OUT .= utf8("uid: $key\n");
71 $OUT .= utf8("cn: $name\n") if $name;
72 $OUT .= utf8("givenName: $first\n") if $first;
73 @@ -28,5 +33,9 @@
74 $OUT .= utf8("l: $city\n") if $city;
75 $OUT .= utf8("street: $street\n") if $street;
76 $OUT .= utf8("userPassword: $password\n") if $password;
77 + $OUT .= utf8("uidNumber: $uid\n") if $uid;
78 + $OUT .= utf8("gidNumber: $gid\n") if $gid;
79 + $OUT .= utf8("homeDirectory: $home\n") if $home;
80 + $OUT .= utf8("loginShell: $shell\n") if $shell;
81 }
82 }
83 diff -Nur -x '*.orig' -x '*.rej' e-smith-ldap-5.2.0/root/etc/e-smith/templates/home/e-smith/db/ldap/ldif/template-begin mezzanine_patched_e-smith-ldap-5.2.0/root/etc/e-smith/templates/home/e-smith/db/ldap/ldif/template-begin
84 --- e-smith-ldap-5.2.0/root/etc/e-smith/templates/home/e-smith/db/ldap/ldif/template-begin 2010-09-23 19:44:01.000000000 +0200
85 +++ mezzanine_patched_e-smith-ldap-5.2.0/root/etc/e-smith/templates/home/e-smith/db/ldap/ldif/template-begin 2010-09-23 19:41:51.000000000 +0200
86 @@ -12,7 +12,20 @@
87 }
88
89 %passwd = ();
90 - while(my ($key,$pwd) = getpwent()) { $passwd{$key} = "{CRYPT}$pwd"; }
91 + %uid = ();
92 + %gid = ();
93 + %home = ();
94 + %shell = ();
95 + while(my ($key,$pwd,$uid,$gid,
96 + undef,undef,undef,
97 + $dir,$shell) = getpwent()) {
98 +
99 + $passwd{$key} = "{CRYPT}$pwd";
100 + $uid{$key} = $uid;
101 + $gid{$key} = $gid;
102 + $home{$key} = $dir;
103 + $shell{$key} = $shell;
104 + }
105 endpwent();
106
107 $OUT = "";

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