summaryrefslogtreecommitdiff
path: root/net/yale-tftpd
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2011-09-06 11:20:19 +0000
committerobache <obache@pkgsrc.org>2011-09-06 11:20:19 +0000
commit83405c98a2a44a100be25d7ae4df5c6e8acaa4d9 (patch)
tree2a3b4e8a77f63be36757a16934f5aabe5a60a064 /net/yale-tftpd
parent0a50ec50fde3ef8ad0bde33abc2608d410fb9bf3 (diff)
downloadpkgsrc-83405c98a2a44a100be25d7ae4df5c6e8acaa4d9.tar.gz
Include <arpa/inet.h> for inet_ntoa additionally.
Fixes coredump with logging on platforms sizeof(int) != sizeof(char*). PR pkg/45243. Bump PKGREVISION.
Diffstat (limited to 'net/yale-tftpd')
-rw-r--r--net/yale-tftpd/Makefile4
-rw-r--r--net/yale-tftpd/distinfo6
-rw-r--r--net/yale-tftpd/patches/patch-ad38
-rw-r--r--net/yale-tftpd/patches/patch-ai17
4 files changed, 35 insertions, 30 deletions
diff --git a/net/yale-tftpd/Makefile b/net/yale-tftpd/Makefile
index abd6c5360dd..e38dc336054 100644
--- a/net/yale-tftpd/Makefile
+++ b/net/yale-tftpd/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.18 2009/06/05 10:19:10 hasso Exp $
+# $NetBSD: Makefile,v 1.19 2011/09/06 11:20:19 obache Exp $
DISTNAME= yale-tftpd-3.0
-PKGREVISION= 4
+PKGREVISION= 5
CATEGORIES= net
MASTER_SITES= ftp://ftp.cert.dfn.de/pub/tools/net/yale-tftpd/
diff --git a/net/yale-tftpd/distinfo b/net/yale-tftpd/distinfo
index 18a977a63af..f594afef8f7 100644
--- a/net/yale-tftpd/distinfo
+++ b/net/yale-tftpd/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.9 2007/10/02 20:23:07 heinz Exp $
+$NetBSD: distinfo,v 1.10 2011/09/06 11:20:19 obache Exp $
SHA1 (yale-tftpd-3.0.tar.gz) = 5f87e3d37feb5c5c8b7f2db34a0c87ee537727af
RMD160 (yale-tftpd-3.0.tar.gz) = 207b88c4383b283e3c0d81a50061a65513031854
@@ -6,11 +6,11 @@ Size (yale-tftpd-3.0.tar.gz) = 33469 bytes
SHA1 (patch-aa) = 9523f1d0727be08b2ebea275f0676f824f06c82a
SHA1 (patch-ab) = e6eb66ed95139b47ee1df07014a636803e89ad47
SHA1 (patch-ac) = bd44bf8d19079e1a74850dbcc8cfea3d82f36c3e
-SHA1 (patch-ad) = f16ad4e705873deb7c06c4a10fe96bd3dc428279
+SHA1 (patch-ad) = 2ac867228602d860e6cf39ad08dc5bec732fe52e
SHA1 (patch-ae) = 61ae35f5e8d5d8f3cd60ba515a925a4098628fb1
SHA1 (patch-af) = d51ac136dc653395faea0c6f2c748f57584d47b5
SHA1 (patch-ag) = be6114e57b7c154eccd09ac4b9187957d2ba4dde
SHA1 (patch-ah) = aee72d3af9fd015b9e1563610b7e72011ce07a05
-SHA1 (patch-ai) = 7ef84005b287c614b03186a11c030964e596076c
+SHA1 (patch-ai) = 3624ecf5d448358834e5ace2f18bfd4caaf954db
SHA1 (patch-aj) = 289bd4840cabe516f9ab09e883089f4aa4f7763b
SHA1 (patch-ak) = 48c125fc5012e65b9310298dba29f76e5b60b078
diff --git a/net/yale-tftpd/patches/patch-ad b/net/yale-tftpd/patches/patch-ad
index 7d7445dd747..cb762a23219 100644
--- a/net/yale-tftpd/patches/patch-ad
+++ b/net/yale-tftpd/patches/patch-ad
@@ -1,8 +1,8 @@
-$NetBSD: patch-ad,v 1.5 2007/10/02 20:23:08 heinz Exp $
+$NetBSD: patch-ad,v 1.6 2011/09/06 11:20:19 obache Exp $
---- tftpd.c.orig 1995-03-20 21:14:39.000000000 +0100
+--- tftpd.c.orig 1995-03-20 20:14:39.000000000 +0000
+++ tftpd.c
-@@ -43,6 +43,9 @@ static char sccsid[] = "@(#)tftpd.c 5.12
+@@ -43,9 +43,13 @@ static char sccsid[] = "@(#)tftpd.c 5.12
#include <sys/signal.h>
#include <sys/time.h>
#include <sys/param.h>
@@ -12,7 +12,11 @@ $NetBSD: patch-ad,v 1.5 2007/10/02 20:23:08 heinz Exp $
#include <netinet/in.h>
-@@ -56,17 +59,22 @@ static char sccsid[] = "@(#)tftpd.c 5.12
++#include <arpa/inet.h>
+ #include <arpa/tftp.h>
+
+ #include <netdb.h>
+@@ -56,17 +60,22 @@ static char sccsid[] = "@(#)tftpd.c 5.12
#include <syslog.h>
#include <string.h>
@@ -39,7 +43,7 @@ $NetBSD: patch-ad,v 1.5 2007/10/02 20:23:08 heinz Exp $
struct sockaddr_in from;
int fromlen;
-@@ -105,6 +113,8 @@ char **argv;
+@@ -105,6 +114,8 @@ char **argv;
if (argc > 1 && strcmp (argv[1], "-d") == 0) {
setUpForDebugging();
@@ -48,7 +52,7 @@ $NetBSD: patch-ad,v 1.5 2007/10/02 20:23:08 heinz Exp $
}
if (ioctl(0, FIONBIO, &on) < 0) {
syslog(LOG_ERR, "ioctl(FIONBIO): %m\n");
-@@ -202,7 +212,7 @@ setUpForDebugging()
+@@ -202,7 +213,7 @@ setUpForDebugging()
awaitInput(chan)
int chan;
{
@@ -57,7 +61,7 @@ $NetBSD: patch-ad,v 1.5 2007/10/02 20:23:08 heinz Exp $
int nready;
struct timeval tv;
extern int maxInputWait;
-@@ -212,8 +222,9 @@ int chan;
+@@ -212,8 +223,9 @@ int chan;
else
tv.tv_sec = 5*60; /* default: wait for 5 minutes */
tv.tv_usec = 0;
@@ -69,7 +73,7 @@ $NetBSD: patch-ad,v 1.5 2007/10/02 20:23:08 heinz Exp $
return nready;
}
-@@ -294,7 +305,10 @@ int n;
+@@ -294,7 +306,10 @@ int n;
}
int validate_access();
@@ -81,7 +85,7 @@ $NetBSD: patch-ad,v 1.5 2007/10/02 20:23:08 heinz Exp $
struct formats {
char *f_mode;
-@@ -303,8 +317,8 @@ struct formats {
+@@ -303,8 +318,8 @@ struct formats {
int (*f_recv)();
int f_convert;
} formats[] = {
@@ -92,7 +96,7 @@ $NetBSD: patch-ad,v 1.5 2007/10/02 20:23:08 heinz Exp $
#ifdef notdef
{ "mail", validate_user, sendmail, recvmail, 1 },
#endif
-@@ -355,13 +369,13 @@ again:
+@@ -355,13 +370,13 @@ again:
exit(1);
}
if (tftpDebugLevel > 0) {
@@ -109,7 +113,7 @@ $NetBSD: patch-ad,v 1.5 2007/10/02 20:23:08 heinz Exp $
}
ecode = (*pf->f_validate)(filename, tp->th_opcode);
if (ecode) {
-@@ -459,17 +473,25 @@ validate_access(filename, mode)
+@@ -459,17 +474,25 @@ validate_access(filename, mode)
/* Rule 2:
*/
@@ -138,7 +142,7 @@ $NetBSD: patch-ad,v 1.5 2007/10/02 20:23:08 heinz Exp $
/* Insure our temporary space is big enough */
maxPath = ((sizeof _tmp) - 1) - rootLen;
-@@ -481,6 +503,8 @@ validate_access(filename, mode)
+@@ -481,6 +504,8 @@ validate_access(filename, mode)
return EACCESS;
}
@@ -147,7 +151,7 @@ $NetBSD: patch-ad,v 1.5 2007/10/02 20:23:08 heinz Exp $
/* Squeeze out any '.' or '..' components */
strcpy (tmpPath, filename);
if (realPath (tmpPath, _tmp) < 0) {
-@@ -492,21 +516,54 @@ validate_access(filename, mode)
+@@ -492,21 +517,54 @@ validate_access(filename, mode)
/* Create the full pathname, prefixed by the
* virtual root.
*/
@@ -206,7 +210,7 @@ $NetBSD: patch-ad,v 1.5 2007/10/02 20:23:08 heinz Exp $
/* Check access lists */
/* Rules 4&5:
*/
-@@ -565,7 +622,7 @@ validate_access(filename, mode)
+@@ -565,7 +623,7 @@ validate_access(filename, mode)
* This will be done with the effective permissions of the TFTPD
* process.
*/
@@ -215,7 +219,7 @@ $NetBSD: patch-ad,v 1.5 2007/10/02 20:23:08 heinz Exp $
if (fd < 0) {
syslog (LOG_DEBUG, "open fails; errno = %d", errno);
return errno+100;
-@@ -593,7 +650,7 @@ void timer()
+@@ -593,7 +651,7 @@ void timer()
/*
* Send the requested file.
*/
@@ -224,7 +228,7 @@ $NetBSD: patch-ad,v 1.5 2007/10/02 20:23:08 heinz Exp $
struct formats *pf;
{
struct tftphdr *dp, *r_init();
-@@ -664,7 +721,7 @@ void justquit()
+@@ -664,7 +722,7 @@ void justquit()
/*
* Receive a file.
*/
@@ -233,7 +237,7 @@ $NetBSD: patch-ad,v 1.5 2007/10/02 20:23:08 heinz Exp $
struct formats *pf;
{
struct tftphdr *dp, *w_init();
-@@ -688,7 +745,7 @@ send_ack:
+@@ -688,7 +746,7 @@ send_ack:
write_behind(file, pf->f_convert);
for ( ; ; ) {
alarm(rexmtval);
diff --git a/net/yale-tftpd/patches/patch-ai b/net/yale-tftpd/patches/patch-ai
index 0eb5bb9608f..68b76dce464 100644
--- a/net/yale-tftpd/patches/patch-ai
+++ b/net/yale-tftpd/patches/patch-ai
@@ -1,18 +1,19 @@
-$NetBSD: patch-ai,v 1.3 2007/10/02 20:23:08 heinz Exp $
+$NetBSD: patch-ai,v 1.4 2011/09/06 11:20:19 obache Exp $
---- tftpyale.c.orig 1995-03-20 21:11:11.000000000 +0100
+--- tftpyale.c.orig 1995-03-20 20:11:11.000000000 +0000
+++ tftpyale.c
-@@ -2,8 +2,8 @@
+@@ -2,8 +2,9 @@
#include <string.h>
#include <syslog.h>
#include <ctype.h>
-#include <arpa/tftp.h>
#include <sys/types.h>
++#include <arpa/inet.h>
+#include <arpa/tftp.h>
#include <sys/stat.h>
#include <netinet/in.h>
#include "tftpyale.h"
-@@ -95,7 +95,7 @@ addFileRestriction (ac, av)
+@@ -95,7 +96,7 @@ addFileRestriction (ac, av)
int ac;
char** av;
{
@@ -21,7 +22,7 @@ $NetBSD: patch-ai,v 1.3 2007/10/02 20:23:08 heinz Exp $
ac--; av++;
if (ac != 2) {
-@@ -104,7 +104,7 @@ char** av;
+@@ -104,7 +105,7 @@ char** av;
}
/* get list number */
@@ -30,7 +31,7 @@ $NetBSD: patch-ai,v 1.3 2007/10/02 20:23:08 heinz Exp $
if (list <= 0) {
accessFormatError = "list argument not positive integer";
return 0;
-@@ -157,27 +157,24 @@ struct stat* sb;
+@@ -157,27 +158,24 @@ struct stat* sb;
* qualified (starts with '/') check to see if the
* prefix matches the default directory.
*/
@@ -64,7 +65,7 @@ $NetBSD: patch-ai,v 1.3 2007/10/02 20:23:08 heinz Exp $
return list ? list : defaultAccessList;
}
-@@ -269,7 +266,7 @@ char** argv;
+@@ -269,7 +267,7 @@ char** argv;
continue;
cargv = config_fields(cnf);
@@ -73,7 +74,7 @@ $NetBSD: patch-ai,v 1.3 2007/10/02 20:23:08 heinz Exp $
/* specify default directory */
case CMD_DEFAULT_DIR:
if (cargc != 2)
-@@ -481,7 +478,7 @@ char* buf;
+@@ -481,7 +479,7 @@ char* buf;
static struct CMDS {
char* cmdName;