summaryrefslogtreecommitdiff
path: root/packaging/Debian/debian/patches/samba.patch
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/Debian/debian/patches/samba.patch')
-rw-r--r--packaging/Debian/debian/patches/samba.patch206
1 files changed, 48 insertions, 158 deletions
diff --git a/packaging/Debian/debian/patches/samba.patch b/packaging/Debian/debian/patches/samba.patch
index be251861cb..79a76b8685 100644
--- a/packaging/Debian/debian/patches/samba.patch
+++ b/packaging/Debian/debian/patches/samba.patch
@@ -1,15 +1,16 @@
---- samba-2.2.2.cvs20020120.orig/source/client/smbmount.c
-+++ samba-2.2.2.cvs20020120/source/client/smbmount.c
-@@ -719,7 +719,7 @@
+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(opteq+1,'%')+1,'X',strlen(password));
-+ memset(strchr(opteq+1,'%')+1,'\0',strlen(password));
+- memset(strchr_m(opteq+1,'%')+1,'X',strlen(password));
++ memset(strchr_m(opteq+1,'%')+1,'\0',strlen(password));
}
- if ((lp=strchr(username,'/'))) {
+ if ((lp=strchr_m(username,'/'))) {
*lp = 0;
-@@ -729,7 +729,7 @@
+@@ -775,7 +775,7 @@
!strcmp(opts, "password")) {
pstrcpy(password,opteq+1);
got_pass = True;
@@ -18,27 +19,19 @@
} else if(!strcmp(opts, "credentials")) {
pstrcpy(credentials,opteq+1);
} else if(!strcmp(opts, "netbiosname")) {
-@@ -822,7 +822,7 @@
+@@ -889,7 +889,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));
+- memset(strchr_m(getenv("USER"),'%')+1,'X',strlen(password));
++ memset(strchr_m(getenv("USER"),'%')+1,'\0',strlen(password));
}
strupper(username);
}
---- 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 @@
+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
@@ -53,34 +46,40 @@
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
+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();
+ }
---- samba-2.2.2.cvs20020120.orig/source/web/diagnose.c
-+++ samba-2.2.2.cvs20020120/source/web/diagnose.c
-@@ -54,6 +54,7 @@
++ /* 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;
@@ -88,112 +87,3 @@
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-2.2.2.cvs20020120.orig/source/web/swat.c
-+++ samba-2.2.2.cvs20020120/source/web/swat.c
-@@ -49,6 +49,19 @@
- #define ENABLE_USER_FLAG "enable_user_flag"
- #define RHOST "remote_host"
-
-+typedef struct html_conversion {
-+ char src;
-+ char *dest;
-+} html_conversion;
-+
-+static const html_conversion entities[] = {
-+ { '"', """ },
-+ { '&', "&" },
-+ { '<', "&lt;" },
-+ { '>', "&gt;" },
-+ { '\0', NULL },
-+};
-+
- /* we need these because we link to locking*.o */
- void become_root(void) {}
- void unbecome_root(void) {}
-@@ -77,6 +90,51 @@
- return newstring;
- }
-
-+static char *htmlentities(char *str)
-+{
-+ int i,j, destlen = 0;
-+ int length = strlen(str);
-+ /* Feel free to use a pstring if appropriate -- I haven't
-+ checked if it's guaranteed to be long enough, and suspect it
-+ isn't. -SRL */
-+ char *dststr = NULL;
-+ char *p;
-+
-+ for (i = 0; i < length; i++) {
-+ for (j = 0; entities[j].src; j++) {
-+ if (str[i] == entities[j].src) {
-+ destlen += strlen(entities[j].dest);
-+ break;
-+ }
-+ }
-+ if (!entities[j].src) {
-+ destlen++;
-+ }
-+ }
-+ if (length == destlen) {
-+ return(strdup(str));
-+ }
-+ p = dststr = malloc(destlen + 1);
-+ if (!dststr) {
-+ return(NULL);
-+ }
-+ dststr[destlen] = '\0';
-+ for (i = 0; i < length; i++) {
-+ for (j = 0; entities[j].src; j++) {
-+ if (str[i] == entities[j].src) {
-+ strncpy(p, entities[j].dest,
-+ strlen(entities[j].dest));
-+ p += strlen(entities[j].dest);
-+ break;
-+ }
-+ }
-+ if (!entities[j].src) {
-+ *p++ = str[i];
-+ }
-+ }
-+ return(dststr);
-+}
-+
- static char *stripspace(char *str)
- {
- static char newstring[1024];
-@@ -182,8 +240,12 @@
-
- case P_STRING:
- case P_USTRING:
-- printf("<input type=text size=40 name=\"parm_%s\" value=\"%s\">",
-- make_parm_name(parm->label), *(char **)ptr);
-+ str = htmlentities(*(char **)ptr);
-+ printf("<input type=\"text\" size=\"40\" name=\"parm_%s\" value=\"%s\">",
-+ make_parm_name(parm->label), str);
-+ if (str != NULL) {
-+ free(str);
-+ }
- printf("<input type=button value=\"Set Default\" onClick=\"swatform.parm_%s.value=\'%s\'\">",
- make_parm_name(parm->label),fix_backslash((char *)(parm->def.svalue)));
- break;