summaryrefslogtreecommitdiff
path: root/packaging/Debian/debian/patches/samba.patch
blob: e7dd4d8813e3eefa40c86b492e67a18b7a330f45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
--- samba-2.2.4/source/client/smbmount.c.orig	Wed May  1 23:13:57 2002
+++ samba-2.2.4/source/client/smbmount.c	Thu May  2 00:20:44 2002
@@ -716,7 +716,7 @@
 					*lp = 0;
 					pstrcpy(password,lp+1);
 					got_pass = True;
-					memset(strchr(opteq+1,'%')+1,'X',strlen(password));
+					memset(strchr(opteq+1,'%')+1,'\0',strlen(password));
 				}
 				if ((lp=strchr(username,'/'))) {
 					*lp = 0;
@@ -726,7 +726,7 @@
 				  !strcmp(opts, "password")) {
 				pstrcpy(password,opteq+1);
 				got_pass = True;
-				memset(opteq+1,'X',strlen(password));
+				memset(opteq+1,'\0',strlen(password));
 			} else if(!strcmp(opts, "credentials")) {
 				pstrcpy(credentials,opteq+1);
 			} else if(!strcmp(opts, "netbiosname")) {
@@ -819,7 +819,7 @@
 			*p = 0;
 			pstrcpy(password,p+1);
 			got_pass = True;
-			memset(strchr(getenv("USER"),'%')+1,'X',strlen(password));
+			memset(strchr(getenv("USER"),'%')+1,'\0',strlen(password));
 		}
 		strupper(username);
 	}
--- samba-2.2.4/source/pam_smbpass/pam_smb_passwd.c.orig	Wed May  1 23:14:47 2002
+++ samba-2.2.4/source/pam_smbpass/pam_smb_passwd.c	Thu May  2 00:20:44 2002
@@ -190,6 +190,11 @@
 
     } else if (flags & PAM_UPDATE_AUTHTOK) {
 
+/*
+	The following has been commented out per Steve Langasek
+	<vorlon@debian.org> instructions. It's about Debian bug
+	#113763.
+*/
 #if 0
         /* We used to return when this flag was set, but that breaks
            password synchronization when /other/ tokens are expired.  For
--- samba-2.2.2.cvs20020120.orig/source/script/installbin.sh
+++ samba-2.2.2.cvs20020120/source/script/installbin.sh
@@ -11,7 +11,7 @@
 shift
 shift
 
-for d in $BASEDIR $BINDIR $LIBDIR $VARDIR $BASEDIR/private; do
+for d in $BASEDIR $BINDIR $LIBDIR $VARDIR; do
 if [ ! -d $d ]; then
 mkdir $d
 if [ ! -d $d ]; then
@@ -33,9 +33,11 @@
  chmod $INSTALLPERMS $BINDIR/$p2
 
  # this is a special case, mount needs this in a specific location
- if [ $p2 = smbmount ]; then
-   ln -sf $BINDIR/$p2 /sbin/mount.smbfs
- fi
+# Commented out for the Debian Samba package. We take care of this
+#	important symlink in debian/rules. (peloy@debian.org)
+# if [ $p2 = smbmount ]; then
+#   ln -sf $BINDIR/$p2 /sbin/mount.smbfs
+# fi
 done
 
 
--- samba-2.2.2.cvs20020120.orig/source/script/installswat.sh
+++ samba-2.2.2.cvs20020120/source/script/installswat.sh
@@ -48,8 +48,8 @@
 for f in $SRCDIR../docs/htmldocs/*.html; do
       FNAME=$SWATDIR/help/`basename $f`
       echo $FNAME
-      cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges?
-      chmod 0644 $FNAME
+      ln -s ../../../doc/samba-doc/htmldocs/`basename $f` $FNAME || echo Cannot install $FNAME. Does $USER have privileges?
+#      chmod 0644 $FNAME
 done
 
 # Install "server-side" includes
@@ -63,7 +63,10 @@
 
 # Install Using Samba book
 
-if [ "x$BOOKDIR" != "x" ]; then
+# For Debian we do not install anything here, we just create a symlink
+#	pointing to /usr/share/doc/samba-doc/htmldocs/using_samba/ in
+#	debian/rules (peloy@debian.org)
+if /bin/false; then
 
     # Create directories
 
--- samba-2.2.2.cvs20020120.orig/source/smbwrapper/smbsh.c
+++ samba-2.2.2.cvs20020120/source/smbwrapper/smbsh.c
@@ -39,7 +39,7 @@
 int main(int argc, char *argv[])
 {
 	char *p, *u;
-	char *libd = BINDIR;	
+	char *libd = "/usr/share/samba";	
 	pstring line, wd;
 	int opt;
 	extern char *optarg;
--- samba-2.2.2.cvs20020120.orig/source/web/diagnose.c
+++ samba-2.2.2.cvs20020120/source/web/diagnose.c
@@ -54,6 +54,7 @@
 	static struct cli_state cli;
 	extern struct in_addr loopback_ip;
 
+	loopback_ip.s_addr = htonl((127 << 24) + 1);
 	if (!cli_initialise(&cli))
 		return False;
 
--- samba-2.2.2.cvs20020120.orig/source/web/startstop.c
+++ samba-2.2.2.cvs20020120/source/web/startstop.c
@@ -37,7 +37,7 @@
 		return;
 	}
 
-	slprintf(binfile, sizeof(pstring) - 1, "%s/smbd", SBINDIR);
+	slprintf(binfile, sizeof(pstring) - 1, "%s/smbd", "/usr/sbin");
 
 	become_daemon();
 
@@ -58,7 +58,7 @@
 		return;
 	}
 
-	slprintf(binfile, sizeof(pstring) - 1, "%s/nmbd", SBINDIR);
+	slprintf(binfile, sizeof(pstring) - 1, "%s/nmbd", "/usr/sbin");
 	
 	become_daemon();
 
--- samba/source/smbd/service.c.orig	2002-10-12 11:54:24.000000000 -0400
+++ samba/source/smbd/service.c	2002-10-13 01:43:10.000000000 -0400
@@ -698,6 +698,14 @@
 		smbrun(cmd,NULL);
 	}
 
+	/* If our root postexec command includes a call to 'unmount', we want
+	   to make sure we aren't blocking the mount point. */
+	/* I think this patch should go here, but I am not sure since
+	   the code looks very different than in Samba 2.2.2. Will come
+	   back later; should check what change_to_root_user() does. Eloy.-
+	vfs_ChDir(conn,"/");
+	/*
+
 	change_to_root_user();
 	/* execute any "root postexec = " line */
 	if (*lp_rootpostexec(SNUM(conn)))  {