aboutsummaryrefslogtreecommitdiffstats
path: root/net/samba
diff options
context:
space:
mode:
authordwcjr <dwcjr@FreeBSD.org>2002-05-10 21:43:30 +0800
committerdwcjr <dwcjr@FreeBSD.org>2002-05-10 21:43:30 +0800
commit7cfb9b8b2e9c70b8f868b2e46f123aecbd939829 (patch)
tree76a4c809366ea8692e23fb1952afcb222ca6edf9 /net/samba
parent4d85fe9df6bbd4c203de4ceda7d7d1c0339016ce (diff)
downloadfreebsd-ports-gnome-7cfb9b8b2e9c70b8f868b2e46f123aecbd939829.tar.gz
freebsd-ports-gnome-7cfb9b8b2e9c70b8f868b2e46f123aecbd939829.tar.zst
freebsd-ports-gnome-7cfb9b8b2e9c70b8f868b2e46f123aecbd939829.zip
Add missing VFS patches
Diffstat (limited to 'net/samba')
-rw-r--r--net/samba/files/patch-examples-VFS-Makefile14
-rw-r--r--net/samba/files/patch-examples-VFS-recycle.c37
2 files changed, 51 insertions, 0 deletions
diff --git a/net/samba/files/patch-examples-VFS-Makefile b/net/samba/files/patch-examples-VFS-Makefile
new file mode 100644
index 000000000000..9df50476160f
--- /dev/null
+++ b/net/samba/files/patch-examples-VFS-Makefile
@@ -0,0 +1,14 @@
+--- examples/VFS/Makefile.orig Tue May 7 11:17:58 2002
++++ examples/VFS/Makefile Tue May 7 11:19:31 2002
+@@ -10,9 +10,10 @@
+
+ SAMBA_SRC = ../../source
+ SAMBA_INCL = ../../source/include
++POPT_INCL = ../../source/popt
+ UBIQX_SRC = ../../source/ubiqx
+ SMBWR_SRC = ../../source/smbwrapper
+-CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -Wall -g
++CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I${POPT_INCL} -Wall -g
+ VFS_OBJS = audit.so skel.so recycle.so
+
+ # Default target
diff --git a/net/samba/files/patch-examples-VFS-recycle.c b/net/samba/files/patch-examples-VFS-recycle.c
new file mode 100644
index 000000000000..44a1a8a2a08a
--- /dev/null
+++ b/net/samba/files/patch-examples-VFS-recycle.c
@@ -0,0 +1,37 @@
+--- examples/VFS/recycle.c.orig Wed May 8 21:30:11 2002
++++ examples/VFS/recycle.c Thu May 9 02:19:32 2002
+@@ -238,15 +238,18 @@
+ return default_vfs_ops.unlink(conn,fname);
+ }
+
+- base = strrchr(fname, '/') + 1;
+- if(base == (char*)1)
+- ext = strrchr(fname, '.');
+- else
+- ext = strrchr(base, '.');
+-
++ base = strrchr(fname, '/');
+ pstrcpy(bin, recycle_bin);
+ pstrcat(bin, "/");
+- pstrcat(bin, base);
++
++ if(base == NULL) {
++ ext = strrchr(fname, '.');
++ pstrcat(bin, fname);
++ } else {
++ ext = strrchr(base, '.');
++ pstrcat(bin, base+1);
++ }
++ DEBUG(3, ("recycle bin: base %s, ext %s, fname %s, bin %s\n", base, ext, fname, bin));
+
+ if(strcmp(fname,bin) == 0) {
+ DEBUG(3, ("recycle bin: file %s exists, purging...\n", fname));
+@@ -254,6 +257,8 @@
+ }
+
+ len = strlen(bin);
++ if ( ext != NULL)
++ len = len - strlen(ext);
+ addlen = sizeof(pstring)-len-1;
+ while(recycle_file_exist(conn,bin)) {
+ slprintf(bin+len, addlen, " (Copy #%d)", i++);