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

Contents of /rpms/e-smith-samba/sme8/e-smith-samba-2.2.0-store_ldap_pw.patch

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


Revision 1.2 - (show annotations) (download)
Wed Nov 3 18:21:39 2010 UTC (13 years, 6 months 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-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-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.1: +20 -15 lines
* Wed Nov 3 2010 Daniel Berteaud <daniel@firewall-services.com> 2.2.0-34.sme
- rename store-ldap-passwd and link it in other events [SME: 6232]

1 diff -Nur -x '*.orig' -x '*.rej' e-smith-samba-2.2.0/createlinks mezzanine_patched_e-smith-samba-2.2.0/createlinks
2 --- e-smith-samba-2.2.0/createlinks 2010-11-03 19:12:38.000000000 +0100
3 +++ mezzanine_patched_e-smith-samba-2.2.0/createlinks 2010-11-03 19:12:36.000000000 +0100
4 @@ -29,6 +29,12 @@
5 templates2events($file, qw(console-save bootstrap-console-save));
6 }
7
8 +foreach (qw(console-save bootstrap-console-save bootstrap-ldap-save
9 + post-install post-upgrade workgroup-update))
10 +{
11 + event_link('store-ldap-smbpasswd', $_, "06");
12 +}
13 +
14 my $event = "console-save";
15
16 $event = "bootstrap-ldap-save";
17 diff -Nur -x '*.orig' -x '*.rej' e-smith-samba-2.2.0/root/etc/e-smith/events/actions/store-ldap-smbpasswd mezzanine_patched_e-smith-samba-2.2.0/root/etc/e-smith/events/actions/store-ldap-smbpasswd
18 --- e-smith-samba-2.2.0/root/etc/e-smith/events/actions/store-ldap-smbpasswd 1970-01-01 01:00:00.000000000 +0100
19 +++ mezzanine_patched_e-smith-samba-2.2.0/root/etc/e-smith/events/actions/store-ldap-smbpasswd 2010-11-03 19:10:59.000000000 +0100
20 @@ -0,0 +1,40 @@
21 +#!/usr/bin/perl -w
22 +
23 +#----------------------------------------------------------------------
24 +# copyright (C) 2010 Firewall Services
25 +# daniel@firewall-services.com
26 +#
27 +# This program is free software; you can redistribute it and/or modify
28 +# it under the terms of the GNU General Public License as published by
29 +# the Free Software Foundation; either version 2 of the License, or
30 +# (at your option) any later version.
31 +#
32 +# This program is distributed in the hope that it will be useful,
33 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
34 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35 +# GNU General Public License for more details.
36 +#
37 +# You should have received a copy of the GNU General Public License
38 +# along with this program; if not, write to the Free Software
39 +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
40 +#----------------------------------------------------------------------
41 +
42 +use esmith::ConfigDB;
43 +use esmith::util;
44 +
45 +my $c = esmith::ConfigDB->open_ro;
46 +my $l = $c->get('ldap') || die "ldap service not found\n";
47 +my $s = $l->prop('status') || 'disabled';
48 +unless ( $s eq 'enabled' ){
49 + warn "Not running action script $0, LDAP service not enabled!\n";
50 + exit(0);
51 +}
52 +exit(0) unless ($l->prop('Authentication') || 'disabled') eq 'enabled';
53 +
54 +my $domain = $c->get("DomainName")
55 + || die("Could not determine domain name");
56 +my $base = esmith::util::ldapBase ($domain->value);
57 +my $pw = esmith::util::LdapPassword();
58 +
59 +die "Error storing LDAP password in secret.tdb\n" unless
60 + system('/usr/bin/smbpasswd', '-w', "$pw") == 0;
61 diff -Nur -x '*.orig' -x '*.rej' e-smith-samba-2.2.0/root/etc/e-smith/events/actions/update-domain-group-maps mezzanine_patched_e-smith-samba-2.2.0/root/etc/e-smith/events/actions/update-domain-group-maps
62 --- e-smith-samba-2.2.0/root/etc/e-smith/events/actions/update-domain-group-maps 2010-11-03 19:12:38.000000000 +0100
63 +++ mezzanine_patched_e-smith-samba-2.2.0/root/etc/e-smith/events/actions/update-domain-group-maps 2010-11-03 19:10:59.000000000 +0100
64 @@ -18,13 +18,6 @@
65 my $ldapauth = $c->get('ldap')->prop('Authentication') || 'disabled';
66 my $pw = esmith::util::LdapPassword();
67
68 -if ($ldapauth eq 'enabled')
69 -{
70 - # Add the LDAP admin password in secret.tdb
71 - warn "Couldn't add LDAP password in secret.tdb\n" unless
72 - system("/usr/bin/smbpasswd", "-w", "$pw") == 0;
73 -}
74 -
75 my $g = `/usr/bin/net getlocalsid`;
76 unless ($g =~ /SID.*is: (.+)/) {
77 warn "Unable to determine SID. Clearning cache to see if it helps.";
78 diff -Nur -x '*.orig' -x '*.rej' e-smith-samba-2.2.0/root/var/service/smbd/run mezzanine_patched_e-smith-samba-2.2.0/root/var/service/smbd/run
79 --- e-smith-samba-2.2.0/root/var/service/smbd/run 2010-11-03 19:12:38.000000000 +0100
80 +++ mezzanine_patched_e-smith-samba-2.2.0/root/var/service/smbd/run 2010-11-03 19:10:59.000000000 +0100
81 @@ -41,10 +41,5 @@
82 [ -r "$tdb" ] && tdbbackup "$tdb" .bak
83 done
84
85 -if [ "$ldapauth" == "enabled" ]
86 -then
87 - /usr/bin/smbpasswd -w "$(cat /etc/ldap.secret)"
88 -fi
89 -
90 exec 2>&1
91 exec $smbd -F

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