Mandrake packaging updates from Buchan
[Samba.git] / packaging / Mandrake / samba-2.2.7a-smbldaptools-paths.patch
blobb915121d12fb4f1f1e4dc6a8b41213f053d25350
1 diff -ur samba-2.2.7a.orig/examples/LDAP/ldapchpasswd samba-2.2.7a/examples/LDAP/ldapchpasswd
2 --- samba-2.2.7a.orig/examples/LDAP/ldapchpasswd 2003-02-10 15:17:53.000000000 -0500
3 +++ samba-2.2.7a/examples/LDAP/ldapchpasswd 2003-02-10 15:38:24.000000000 -0500
4 @@ -103,7 +103,7 @@
5 $password = crypt($pass, $modsalt);
7 # LanManager and NT clear text passwords
8 -$ntpwd = `/usr/local/sbin/mkntpwd '$pass'`;
9 +$ntpwd = `/usr/sbin/mkntpwd '$pass'`;
10 chomp($lmpassword = substr($ntpwd, 0, index($ntpwd, ':')));
11 chomp($ntpassword = substr($ntpwd, index($ntpwd, ':')+1));
13 diff -ur samba-2.2.7a.orig/examples/LDAP/smbldap-tools/INSTALL samba-2.2.7a/examples/LDAP/smbldap-tools/INSTALL
14 --- samba-2.2.7a.orig/examples/LDAP/smbldap-tools/INSTALL 2003-02-10 15:17:53.000000000 -0500
15 +++ samba-2.2.7a/examples/LDAP/smbldap-tools/INSTALL 2003-02-10 15:56:06.000000000 -0500
16 @@ -4,12 +4,12 @@
18 Quick & Dirty:
19 =-=-=-=-=-=-=-
20 - . Copy all those scripts in /usr/local/sbin/
21 + . Copy all those scripts in /usr/share/samba/scripts
22 . Modify smbldap_conf.pm to match your configuration
23 . If not already done : "smbpasswd -w secret" to set up
24 the ldap admin password in secrets.tdb
25 - . Either add /usr/local/sbin in $PERLLIB or run the scripts
26 - from this directory, or make a symlink from /usr/local/sbin/*.pm
27 + . Either add /usr/share/samba/scripts in $PERLLIB or run the scripts
28 + from this directory, or make a symlink from /etc/samba/*.pm
29 to /usr/lib/perl5/.
30 . to allow a domain admin to add user using "add user script" in smb.conf :
31 chmod 753 smbldap_conf.pm
32 @@ -21,7 +21,7 @@
33 RedHat RPM:
34 =-=-=-=-=-=
35 Install smbldap-tools-0.7-1.i386.rpm
36 -Modify /usr/local/sbin/smbldap_conf.pm to match you configuration
37 +Modify /etc/samba/smbldap_conf.pm to match you configuration
38 If not already done : "smbpasswd -w secret" to set up
39 the ldap admin password in secrets.tdb
41 diff -ur samba-2.2.7a.orig/examples/LDAP/smbldap-tools/smbldap_conf.pm samba-2.2.7a/examples/LDAP/smbldap-tools/smbldap_conf.pm
42 --- samba-2.2.7a.orig/examples/LDAP/smbldap-tools/smbldap_conf.pm 2003-02-10 15:17:53.000000000 -0500
43 +++ samba-2.2.7a/examples/LDAP/smbldap-tools/smbldap_conf.pm 2003-02-10 15:39:42.000000000 -0500
44 @@ -230,7 +230,7 @@
45 # prefer mkntpwd... most of the time, it's a wise choice :-)
46 $with_smbpasswd = 0;
47 $smbpasswd = "/usr/bin/smbpasswd";
48 -$mk_ntpasswd = "/usr/local/sbin/mkntpwd";
49 +$mk_ntpasswd = "/usr/sbin/mkntpwd";
51 $ldap_path = "/usr/bin";
52 $ldap_opts = "-x";
53 diff -ur samba-2.2.7a.orig/examples/LDAP/smbldap-tools/smbldap-migrate-accounts.pl samba-2.2.7a/examples/LDAP/smbldap-tools/smbldap-migrate-accounts.pl
54 --- samba-2.2.7a.orig/examples/LDAP/smbldap-tools/smbldap-migrate-accounts.pl 2003-02-10 15:17:53.000000000 -0500
55 +++ samba-2.2.7a/examples/LDAP/smbldap-tools/smbldap-migrate-accounts.pl 2003-02-10 15:50:15.000000000 -0500
56 @@ -134,7 +134,7 @@
57 if (!$user_exists) {
58 if (!defined($Options{'C'})) {
59 # uid doesn't exist and we want to create it
60 - my $addcmd = "/usr/local/sbin/smbldap-useradd.pl $usertype $login > /dev/null";
61 + my $addcmd = "/usr/share/samba/scripts/smbldap-useradd.pl $usertype $login > /dev/null";
62 print STDERR "$addcmd\n";
63 my $r = system "$addcmd";
64 if ($r != 0) {
65 diff -ur samba-2.2.7a.orig/examples/LDAP/smbldap-tools/smbldap-migrate-groups.pl samba-2.2.7a/examples/LDAP/smbldap-tools/smbldap-migrate-groups.pl
66 --- samba-2.2.7a.orig/examples/LDAP/smbldap-tools/smbldap-migrate-groups.pl 2003-02-10 15:17:53.000000000 -0500
67 +++ samba-2.2.7a/examples/LDAP/smbldap-tools/smbldap-migrate-groups.pl 2003-02-10 15:52:51.000000000 -0500
68 @@ -135,7 +135,7 @@
69 if (!defined($dn_line = get_group_dn($group))) {
70 # group not found, create it ?
71 if (!$nocreate) {
72 - system "/usr/local/sbin/smbldap-groupadd.pl \"$group\"; sleep 5";
73 + system "/usr/share/samba/scripts/smbldap-groupadd.pl \"$group\"; sleep 5";
74 if (!defined($dn_line = get_group_dn($group))) {
75 return 1;
77 diff -ur samba-2.2.7a.orig/examples/LDAP/smbldap-tools/smbldap-tools.spec samba-2.2.7a/examples/LDAP/smbldap-tools/smbldap-tools.spec
78 --- samba-2.2.7a.orig/examples/LDAP/smbldap-tools/smbldap-tools.spec 2003-02-10 15:17:53.000000000 -0500
79 +++ samba-2.2.7a/examples/LDAP/smbldap-tools/smbldap-tools.spec 2003-02-10 15:47:58.000000000 -0500
80 @@ -1,6 +1,6 @@
81 # $Source: /data/src/mirror/cvs/samba/packaging/Mandrake/Attic/samba-2.2.7a-smbldaptools-paths.patch,v $
82 %define version 0.7
83 -%define release 1
84 +%define release 2
85 %define name smbldap-tools
86 %define realname smbldap-tools
88 @@ -37,7 +37,7 @@
89 Source20: smbldap-migrate-groups.pl
90 Source21: INFRA
91 BuildRoot: /%{_tmppath}/%{name}
92 -Prefix: /usr/local
93 +Prefix: /usr
94 BuildRequires: perl >= 5.6
95 Requires: perl >= 5.6, openldap, openldap-clients, samba
97 @@ -94,7 +94,7 @@
98 %post
99 ln -sf %{prefix}/sbin/smbldap_tools.pm /usr/lib/perl5/site_perl/smbldap_tools.pm
100 ln -sf %{prefix}/sbin/smbldap_conf.pm /usr/lib/perl5/site_perl/smbldap_conf.pm
101 -chgrp 512 %{prefix}/sbin/smbldap-useradd.pl %{prefix}/sbin/smbldap_conf.pm || echo "An error occured while changing groups of smbldap-useradd.pl and smbldap_conf.pm in /usr/local/sbin. For proper operations, please ensure that they have the same posix group as the Samba domain administrator if there's a local Samba PDC."
102 +chgrp 512 %{prefix}/sbin/smbldap-useradd.pl %{prefix}/sbin/smbldap_conf.pm || echo "An error occured while changing groups of smbldap-useradd.pl and smbldap_conf.pm in /etc/samba. For proper operations, please ensure that they have the same posix group as the Samba domain administrator if there's a local Samba PDC."
103 perl -i -pe 's/_SLAVELDAP_/localhost/' %{prefix}/sbin/smbldap_conf.pm
104 perl -i -pe 's/_MASTERLDAP_/localhost/' %{prefix}/sbin/smbldap_conf.pm
105 perl -i -pe 's/_SUFFIX_/dc=IDEALX,dc=org/' %{prefix}/sbin/smbldap_conf.pm
106 @@ -129,6 +129,10 @@
109 %changelog
110 +* Mon Feb 10 2003 Jim Collings <jcllings@tsunamicomm.net> 0.7-2
111 +- Changed prefix to /usr instead of
112 +- /usr/local for Mandrake compatibility.
114 * Sat Jun 1 2002 Olivier Lemaire <olem@IDEALX.com> 0.7-1
115 - some bugfixes about smbldap-populate
116 - bugfixed the smbpasswd call in smbldap-useradd
117 diff -ur samba-2.2.7a.orig/examples/LDAP/smbldap-tools/smbldap-useradd.pl samba-2.2.7a/examples/LDAP/smbldap-tools/smbldap-useradd.pl
118 --- samba-2.2.7a.orig/examples/LDAP/smbldap-tools/smbldap-useradd.pl 2003-02-10 15:17:53.000000000 -0500
119 +++ samba-2.2.7a/examples/LDAP/smbldap-tools/smbldap-useradd.pl 2003-02-10 15:53:50.000000000 -0500
120 @@ -346,7 +346,7 @@
123 if (defined($Options{'P'})) {
124 - exec "/usr/local/sbin/smbldap-passwd.pl $userName"
125 + exec "/usr/share/samba/scripts/smbldap-passwd.pl $userName"
128 exit 0;
129 diff -ur samba-2.2.7a.orig/examples/VFS/block/smb.conf samba-2.2.7a/examples/VFS/block/smb.conf
130 --- samba-2.2.7a.orig/examples/VFS/block/smb.conf 2003-02-10 15:17:53.000000000 -0500
131 +++ samba-2.2.7a/examples/VFS/block/smb.conf 2003-02-11 13:53:53.000000000 -0500
132 @@ -1,6 +1,6 @@
133 [homes]
134 comment = Home Directories
135 - vfs object = /usr/local/samba/lib/block.so
136 + vfs object = /usr/lib/samba/vfs/block.so
137 browseable = yes
138 writable = yes