From 4ed17be3d1a22c3c545821f6628c163c28f3887a Mon Sep 17 00:00:00 2001 From: "David W. Chapman Jr." Date: Fri, 10 May 2002 13:43:30 +0000 Subject: Add missing VFS patches --- net/samba/files/patch-examples-VFS-Makefile | 14 +++++++++++ net/samba/files/patch-examples-VFS-recycle.c | 37 ++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 net/samba/files/patch-examples-VFS-Makefile create mode 100644 net/samba/files/patch-examples-VFS-recycle.c (limited to 'net/samba') 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++); -- cgit v1.2.3