pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/yale-tftpd Fix accessList processing when sub dire...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/229e7934288a
branches:  trunk
changeset: 471207:229e7934288a
user:      seb <seb%pkgsrc.org@localhost>
date:      Sun Mar 21 10:29:51 2004 +0000

description:
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:

 net/yale-tftpd/Makefile         |  17 +++++++++--------
 net/yale-tftpd/distinfo         |   6 +++---
 net/yale-tftpd/patches/patch-ac |   4 ++--
 net/yale-tftpd/patches/patch-ai |  27 +++++++++++++++++++--------
 4 files changed, 33 insertions(+), 21 deletions(-)

diffs (143 lines):

diff -r f436f22dd462 -r 229e7934288a net/yale-tftpd/Makefile
--- a/net/yale-tftpd/Makefile   Sun Mar 21 07:41:57 2004 +0000
+++ b/net/yale-tftpd/Makefile   Sun Mar 21 10:29:51 2004 +0000
@@ -1,20 +1,21 @@
-# $NetBSD: Makefile,v 1.9 2004/01/20 12:22:22 agc Exp $
+# $NetBSD: Makefile,v 1.10 2004/03/21 10:29:51 seb Exp $
 # FreeBSD Id: ports/ftp/yale-tftpd/Makefile,v 1.14 2000/04/12 05:31:29 mharo Exp
 
 DISTNAME=      yale-tftpd-3.0
-PKGREVISION=   2
+PKGREVISION=   3
 CATEGORIES=    net
 MASTER_SITES=  ftp://ftp.cert.dfn.de/pub/tools/net/yale-tftpd/
 
-MAINTAINER=    tech-pkg%NetBSD.org@localhost
+MAINTAINER=    seb%NetBSD.org@localhost
 COMMENT=       Enhanced tftpd(8) from Yale University and cisco Systems
 
 WRKSRC=                ${WRKDIR}
 
-post-configure:
-       ${MV} ${WRKSRC}/tftpd.8 ${WRKSRC}/tftpd.8.in
-       ${SED} -e "s|@ETCDIR@|${PKG_SYSCONFDIR}|g"      \
-           -e "s|@PREFIX@|${PREFIX}|g"                 \
-           < ${WRKSRC}/tftpd.8.in > ${WRKSRC}/tftpd.8
+SUBST_CLASSES+=                        ytftpdman
+SUBST_STAGE.ytftpdman=         post-configure
+SUBST_MESSAGE.ytftpdman=       Fixing pathnames references
+SUBST_FILES.ytftpdman=         tftpd.8
+SUBST_SED.ytftpdman=           -e 's|@ETCDIR@|${PKG_SYSCONFDIR}|g'
+SUBST_SED.ytftpdman+=          -e 's|@PREFIX@|${PREFIX}|g'
 
 .include "../../mk/bsd.pkg.mk"
diff -r f436f22dd462 -r 229e7934288a net/yale-tftpd/distinfo
--- a/net/yale-tftpd/distinfo   Sun Mar 21 07:41:57 2004 +0000
+++ b/net/yale-tftpd/distinfo   Sun Mar 21 10:29:51 2004 +0000
@@ -1,14 +1,14 @@
-$NetBSD: distinfo,v 1.4 2003/09/21 09:15:30 jmc Exp $
+$NetBSD: distinfo,v 1.5 2004/03/21 10:29:51 seb Exp $
 
 SHA1 (yale-tftpd-3.0.tar.gz) = 5f87e3d37feb5c5c8b7f2db34a0c87ee537727af
 Size (yale-tftpd-3.0.tar.gz) = 33469 bytes
 SHA1 (patch-aa) = e6e9b368db8f70bdb4fbb2a1b032bd4ce66206f2
 SHA1 (patch-ab) = e6eb66ed95139b47ee1df07014a636803e89ad47
-SHA1 (patch-ac) = 3c550bc492079cdf01be93a12d1692452fd07282
+SHA1 (patch-ac) = bd44bf8d19079e1a74850dbcc8cfea3d82f36c3e
 SHA1 (patch-ad) = fba4253b24ad9950508736288c52bee421d95189
 SHA1 (patch-ae) = 0b431f5a4f769dbc560fc55231ea2cf478616987
 SHA1 (patch-af) = c6815c58d6ce91dbe0478cbb4fcf0c01126b3c4a
 SHA1 (patch-ag) = 7e14bea74c2d94222cc5f13b03b7735fbe442487
 SHA1 (patch-ah) = 623a09bbb11ae354007cd90e55a98dea3555ec68
-SHA1 (patch-ai) = c183d7b8530322566710000ee7885a6fd8db3480
+SHA1 (patch-ai) = 1b216b650d1d31c403f0bc7f32009e9d7c92186a
 SHA1 (patch-aj) = f57139380e8b7e48b9e40f9ef9864eb1b56720f0
diff -r f436f22dd462 -r 229e7934288a net/yale-tftpd/patches/patch-ac
--- a/net/yale-tftpd/patches/patch-ac   Sun Mar 21 07:41:57 2004 +0000
+++ b/net/yale-tftpd/patches/patch-ac   Sun Mar 21 10:29:51 2004 +0000
@@ -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 @@
  .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 -r f436f22dd462 -r 229e7934288a net/yale-tftpd/patches/patch-ai
--- a/net/yale-tftpd/patches/patch-ai   Sun Mar 21 07:41:57 2004 +0000
+++ b/net/yale-tftpd/patches/patch-ai   Sun Mar 21 10:29:51 2004 +0000
@@ -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 @@
  
        ac--; av++;
        if (ac != 2) {
-@@ -104,7 +104,7 @@
+@@ -104,7 +104,7 @@ char**     av;
        }
  
        /* get list number */
@@ -20,7 +20,7 @@
        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 @@
        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 @@
  
        return list ? list : defaultAccessList;
  }
-@@ -269,7 +269,7 @@
+@@ -269,7 +266,7 @@ char**     argv;
                        continue;
  
                cargv = config_fields(cnf);
@@ -52,7 +63,7 @@
                  /* 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;



Home | Main Index | Thread Index | Old Index