summaryrefslogtreecommitdiff
path: root/packaging/Debian/debian/patches/samba.patch
blob: 79a76b8685b00c75cfe5d632774078decdef021c (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
diff -uNr samba-3.0alpha23.orig/source/client/smbmount.c samba-3.0alpha23/source/client/smbmount.c
--- samba-3.0alpha23.orig/source/client/smbmount.c	2003-03-30 20:28:28.000000000 -0600
+++ samba-3.0alpha23/source/client/smbmount.c	2003-04-04 21:05:58.000000000 -0600
@@ -765,7 +765,7 @@
 					*lp = 0;
 					pstrcpy(password,lp+1);
 					got_pass = True;
-					memset(strchr_m(opteq+1,'%')+1,'X',strlen(password));
+					memset(strchr_m(opteq+1,'%')+1,'\0',strlen(password));
 				}
 				if ((lp=strchr_m(username,'/'))) {
 					*lp = 0;
@@ -775,7 +775,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")) {
@@ -889,7 +889,7 @@
 			*p = 0;
 			pstrcpy(password,p+1);
 			got_pass = True;
-			memset(strchr_m(getenv("USER"),'%')+1,'X',strlen(password));
+			memset(strchr_m(getenv("USER"),'%')+1,'\0',strlen(password));
 		}
 		strupper(username);
 	}
diff -uNr samba-3.0alpha23.orig/source/script/installbin.sh samba-3.0alpha23/source/script/installbin.sh
--- samba-3.0alpha23.orig/source/script/installbin.sh	2002-04-22 13:16:20.000000000 -0500
+++ samba-3.0alpha23/source/script/installbin.sh	2003-04-04 21:05:58.000000000 -0600
@@ -22,9 +22,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
 
 
diff -uNr samba-3.0alpha23.orig/source/smbd/service.c samba-3.0alpha23/source/smbd/service.c
--- samba-3.0alpha23.orig/source/smbd/service.c	2003-03-30 20:28:31.000000000 -0600
+++ samba-3.0alpha23/source/smbd/service.c	2003-04-04 21:05:58.000000000 -0600
@@ -888,6 +888,14 @@
 		change_to_root_user();
 	}
 
+	/* 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)))  {
diff -uNr samba-3.0alpha23.orig/source/smbwrapper/smbsh.c samba-3.0alpha23/source/smbwrapper/smbsh.c
--- samba-3.0alpha23.orig/source/smbwrapper/smbsh.c	2003-03-30 20:28:31.000000000 -0600
+++ samba-3.0alpha23/source/smbwrapper/smbsh.c	2003-04-04 21:05:58.000000000 -0600
@@ -36,7 +36,7 @@
 int main(int argc, char *argv[])
 {
 	char *p, *u;
-	const char *libd = dyn_BINDIR;
+	const char *libd = dyn_LIBDIR;
 	pstring line, wd;
 	int opt;
 	extern char *optarg;
diff -uNr samba-3.0alpha23.orig/source/web/diagnose.c samba-3.0alpha23/source/web/diagnose.c
--- samba-3.0alpha23.orig/source/web/diagnose.c	2003-01-18 13:03:58.000000000 -0600
+++ samba-3.0alpha23/source/web/diagnose.c	2003-04-04 21:05:58.000000000 -0600
@@ -70,6 +70,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;