summaryrefslogtreecommitdiff
path: root/net/yale-tftpd/patches
diff options
context:
space:
mode:
authorseb <seb@pkgsrc.org>2004-03-21 10:29:51 +0000
committerseb <seb@pkgsrc.org>2004-03-21 10:29:51 +0000
commit2cb4974f05c2719a96dad4a835d7b214ce7c3207 (patch)
treedfac2828f40026b7cf7d8da0198bb4ba869d7b90 /net/yale-tftpd/patches
parent4c68e3c4094f216403b3d0fa8aa7f6f9192ffeaf (diff)
downloadpkgsrc-2cb4974f05c2719a96dad4a835d7b214ce7c3207.tar.gz
Fix accessList processing when sub directories are involved.
From PR pkg/23650 by Luc Beurton luc at black-kettle dot univ-ubs dot fr. While here claim stewardship, use subst.mk framework, and fix a typo in a patch file. Bump PKGREVISION.
Diffstat (limited to 'net/yale-tftpd/patches')
-rw-r--r--net/yale-tftpd/patches/patch-ac4
-rw-r--r--net/yale-tftpd/patches/patch-ai27
2 files changed, 21 insertions, 10 deletions
diff --git a/net/yale-tftpd/patches/patch-ac b/net/yale-tftpd/patches/patch-ac
index baf9007e58a..61220733c43 100644
--- a/net/yale-tftpd/patches/patch-ac
+++ b/net/yale-tftpd/patches/patch-ac
@@ -1,4 +1,4 @@
-$NetBSD: patch-ac,v 1.2 2002/04/23 15:27:16 seb Exp $
+$NetBSD: patch-ac,v 1.3 2004/03/21 10:29:51 seb Exp $
--- tftpd.8.orig Wed Oct 5 06:18:21 1994
+++ tftpd.8
@@ -26,7 +26,7 @@ $NetBSD: patch-ac,v 1.2 2002/04/23 15:27:16 seb Exp $
.SH "FILES"
-.ta \w'/usr/local/etc/tftpd.conf~~'u
-/usr/local/etc/tftpd.conf default tftpd configuration file
-+.ta \w'@ETCDIRX@/tftpd.conf~~'u
++.ta \w'@ETCDIR@/tftpd.conf~~'u
+@ETCDIR@/tftpd.conf default tftpd configuration file
.br
/etc/inetd.conf inetd configuration file
diff --git a/net/yale-tftpd/patches/patch-ai b/net/yale-tftpd/patches/patch-ai
index 36da10dffab..8e4f83cb3c6 100644
--- a/net/yale-tftpd/patches/patch-ai
+++ b/net/yale-tftpd/patches/patch-ai
@@ -1,8 +1,8 @@
-$NetBSD: patch-ai,v 1.1 2002/04/01 00:04:44 dmcmahill Exp $
+$NetBSD: patch-ai,v 1.2 2004/03/21 10:29:51 seb Exp $
---- tftpyale.c.orig Mon Mar 20 15:11:11 1995
+--- tftpyale.c.orig 1995-03-20 21:11:11.000000000 +0100
+++ tftpyale.c
-@@ -95,7 +95,7 @@
+@@ -95,7 +95,7 @@ addFileRestriction (ac, av)
int ac;
char** av;
{
@@ -11,7 +11,7 @@ $NetBSD: patch-ai,v 1.1 2002/04/01 00:04:44 dmcmahill Exp $
ac--; av++;
if (ac != 2) {
-@@ -104,7 +104,7 @@
+@@ -104,7 +104,7 @@ char** av;
}
/* get list number */
@@ -20,7 +20,7 @@ $NetBSD: patch-ai,v 1.1 2002/04/01 00:04:44 dmcmahill Exp $
if (list <= 0) {
accessFormatError = "list argument not positive integer";
return 0;
-@@ -157,11 +157,11 @@
+@@ -157,27 +157,24 @@ struct stat* sb;
* qualified (starts with '/') check to see if the
* prefix matches the default directory.
*/
@@ -34,7 +34,18 @@ $NetBSD: patch-ai,v 1.1 2002/04/01 00:04:44 dmcmahill Exp $
char* rindex();
if (*fileName == '/') {
-@@ -177,7 +177,7 @@
+- char* sep = rindex (fileName, '/');
+- int count = sep - fileName;
+-
+- if (count > 0)
+- count--;
+ if (tftpDefaultDirectory
+ && strncmp(fileName, tftpDefaultDirectory,
+ strlen(tftpDefaultDirectory))==0) {
+- fileName = sep+1;
++ fileName +=strlen(tftpDefaultDirectory);
++ if(*fileName == '/')
++ fileName++;
}
}
@@ -43,7 +54,7 @@ $NetBSD: patch-ai,v 1.1 2002/04/01 00:04:44 dmcmahill Exp $
return list ? list : defaultAccessList;
}
-@@ -269,7 +269,7 @@
+@@ -269,7 +266,7 @@ char** argv;
continue;
cargv = config_fields(cnf);
@@ -52,7 +63,7 @@ $NetBSD: patch-ai,v 1.1 2002/04/01 00:04:44 dmcmahill Exp $
/* specify default directory */
case CMD_DEFAULT_DIR:
if (cargc != 2)
-@@ -481,7 +481,7 @@
+@@ -481,7 +478,7 @@ char* buf;
static struct CMDS {
char* cmdName;