head 1.8; access; symbols pkgsrc-2026Q3:1.8.0.6 pkgsrc-2026Q3-base:1.8 pkgsrc-2026Q2:1.8.0.4 pkgsrc-2026Q2-base:1.8 pkgsrc-2026Q1:1.8.0.2 pkgsrc-2026Q1-base:1.8 pkgsrc-2025Q4:1.7.0.112 pkgsrc-2025Q4-base:1.7 pkgsrc-2025Q3:1.7.0.110 pkgsrc-2025Q3-base:1.7 pkgsrc-2025Q2:1.7.0.108 pkgsrc-2025Q2-base:1.7 pkgsrc-2025Q1:1.7.0.106 pkgsrc-2025Q1-base:1.7 pkgsrc-2024Q4:1.7.0.104 pkgsrc-2024Q4-base:1.7 pkgsrc-2024Q3:1.7.0.102 pkgsrc-2024Q3-base:1.7 pkgsrc-2024Q2:1.7.0.100 pkgsrc-2024Q2-base:1.7 pkgsrc-2024Q1:1.7.0.98 pkgsrc-2024Q1-base:1.7 pkgsrc-2023Q4:1.7.0.96 pkgsrc-2023Q4-base:1.7 pkgsrc-2023Q3:1.7.0.94 pkgsrc-2023Q3-base:1.7 pkgsrc-2023Q2:1.7.0.92 pkgsrc-2023Q2-base:1.7 pkgsrc-2023Q1:1.7.0.90 pkgsrc-2023Q1-base:1.7 pkgsrc-2022Q4:1.7.0.88 pkgsrc-2022Q4-base:1.7 pkgsrc-2022Q3:1.7.0.86 pkgsrc-2022Q3-base:1.7 pkgsrc-2022Q2:1.7.0.84 pkgsrc-2022Q2-base:1.7 pkgsrc-2022Q1:1.7.0.82 pkgsrc-2022Q1-base:1.7 pkgsrc-2021Q4:1.7.0.80 pkgsrc-2021Q4-base:1.7 pkgsrc-2021Q3:1.7.0.78 pkgsrc-2021Q3-base:1.7 pkgsrc-2021Q2:1.7.0.76 pkgsrc-2021Q2-base:1.7 pkgsrc-2021Q1:1.7.0.74 pkgsrc-2021Q1-base:1.7 pkgsrc-2020Q4:1.7.0.72 pkgsrc-2020Q4-base:1.7 pkgsrc-2020Q3:1.7.0.70 pkgsrc-2020Q3-base:1.7 pkgsrc-2020Q2:1.7.0.66 pkgsrc-2020Q2-base:1.7 pkgsrc-2020Q1:1.7.0.46 pkgsrc-2020Q1-base:1.7 pkgsrc-2019Q4:1.7.0.68 pkgsrc-2019Q4-base:1.7 pkgsrc-2019Q3:1.7.0.64 pkgsrc-2019Q3-base:1.7 pkgsrc-2019Q2:1.7.0.62 pkgsrc-2019Q2-base:1.7 pkgsrc-2019Q1:1.7.0.60 pkgsrc-2019Q1-base:1.7 pkgsrc-2018Q4:1.7.0.58 pkgsrc-2018Q4-base:1.7 pkgsrc-2018Q3:1.7.0.56 pkgsrc-2018Q3-base:1.7 pkgsrc-2018Q2:1.7.0.54 pkgsrc-2018Q2-base:1.7 pkgsrc-2018Q1:1.7.0.52 pkgsrc-2018Q1-base:1.7 pkgsrc-2017Q4:1.7.0.50 pkgsrc-2017Q4-base:1.7 pkgsrc-2017Q3:1.7.0.48 pkgsrc-2017Q3-base:1.7 pkgsrc-2017Q2:1.7.0.44 pkgsrc-2017Q2-base:1.7 pkgsrc-2017Q1:1.7.0.42 pkgsrc-2017Q1-base:1.7 pkgsrc-2016Q4:1.7.0.40 pkgsrc-2016Q4-base:1.7 pkgsrc-2016Q3:1.7.0.38 pkgsrc-2016Q3-base:1.7 pkgsrc-2016Q2:1.7.0.36 pkgsrc-2016Q2-base:1.7 pkgsrc-2016Q1:1.7.0.34 pkgsrc-2016Q1-base:1.7 pkgsrc-2015Q4:1.7.0.32 pkgsrc-2015Q4-base:1.7 pkgsrc-2015Q3:1.7.0.30 pkgsrc-2015Q3-base:1.7 pkgsrc-2015Q2:1.7.0.28 pkgsrc-2015Q2-base:1.7 pkgsrc-2015Q1:1.7.0.26 pkgsrc-2015Q1-base:1.7 pkgsrc-2014Q4:1.7.0.24 pkgsrc-2014Q4-base:1.7 pkgsrc-2014Q3:1.7.0.22 pkgsrc-2014Q3-base:1.7 pkgsrc-2014Q2:1.7.0.20 pkgsrc-2014Q2-base:1.7 pkgsrc-2014Q1:1.7.0.18 pkgsrc-2014Q1-base:1.7 pkgsrc-2013Q4:1.7.0.16 pkgsrc-2013Q4-base:1.7 pkgsrc-2013Q3:1.7.0.14 pkgsrc-2013Q3-base:1.7 pkgsrc-2013Q2:1.7.0.12 pkgsrc-2013Q2-base:1.7 pkgsrc-2013Q1:1.7.0.10 pkgsrc-2013Q1-base:1.7 pkgsrc-2012Q4:1.7.0.8 pkgsrc-2012Q4-base:1.7 pkgsrc-2012Q3:1.7.0.6 pkgsrc-2012Q3-base:1.7 pkgsrc-2012Q2:1.7.0.4 pkgsrc-2012Q2-base:1.7 pkgsrc-2012Q1:1.7.0.2 pkgsrc-2012Q1-base:1.7 pkgsrc-2011Q4:1.6.0.4 pkgsrc-2011Q4-base:1.6 pkgsrc-2011Q3:1.6.0.2 pkgsrc-2011Q3-base:1.6 pkgsrc-2011Q2:1.5.0.36 pkgsrc-2011Q2-base:1.5 pkgsrc-2011Q1:1.5.0.34 pkgsrc-2011Q1-base:1.5 pkgsrc-2010Q4:1.5.0.32 pkgsrc-2010Q4-base:1.5 pkgsrc-2010Q3:1.5.0.30 pkgsrc-2010Q3-base:1.5 pkgsrc-2010Q2:1.5.0.28 pkgsrc-2010Q2-base:1.5 pkgsrc-2010Q1:1.5.0.26 pkgsrc-2010Q1-base:1.5 pkgsrc-2009Q4:1.5.0.24 pkgsrc-2009Q4-base:1.5 pkgsrc-2009Q3:1.5.0.22 pkgsrc-2009Q3-base:1.5 pkgsrc-2009Q2:1.5.0.20 pkgsrc-2009Q2-base:1.5 pkgsrc-2009Q1:1.5.0.18 pkgsrc-2009Q1-base:1.5 pkgsrc-2008Q4:1.5.0.16 pkgsrc-2008Q4-base:1.5 pkgsrc-2008Q3:1.5.0.14 pkgsrc-2008Q3-base:1.5 cube-native-xorg:1.5.0.12 cube-native-xorg-base:1.5 pkgsrc-2008Q2:1.5.0.10 pkgsrc-2008Q2-base:1.5 cwrapper:1.5.0.8 pkgsrc-2008Q1:1.5.0.6 pkgsrc-2008Q1-base:1.5 pkgsrc-2007Q4:1.5.0.4 pkgsrc-2007Q4-base:1.5 pkgsrc-2007Q3:1.5.0.2 pkgsrc-2007Q3-base:1.5 pkgsrc-2007Q2:1.4.0.12 pkgsrc-2007Q2-base:1.4 pkgsrc-2007Q1:1.4.0.10 pkgsrc-2007Q1-base:1.4 pkgsrc-2006Q4:1.4.0.8 pkgsrc-2006Q4-base:1.4 pkgsrc-2006Q3:1.4.0.6 pkgsrc-2006Q3-base:1.4 pkgsrc-2006Q2:1.4.0.4 pkgsrc-2006Q2-base:1.4 pkgsrc-2006Q1:1.4.0.2 pkgsrc-2006Q1-base:1.4 pkgsrc-2005Q4:1.3.0.2 pkgsrc-2005Q4-base:1.3 pkgsrc-2005Q3:1.2.0.16 pkgsrc-2005Q3-base:1.2 pkgsrc-2005Q2:1.2.0.14 pkgsrc-2005Q2-base:1.2 pkgsrc-2005Q1:1.2.0.12 pkgsrc-2005Q1-base:1.2 pkgsrc-2004Q4:1.2.0.10 pkgsrc-2004Q4-base:1.2 pkgsrc-2004Q3:1.2.0.8 pkgsrc-2004Q3-base:1.2 pkgsrc-2004Q2:1.2.0.6 pkgsrc-2004Q2-base:1.2 pkgsrc-2004Q1:1.2.0.4 pkgsrc-2004Q1-base:1.2 pkgsrc-2003Q4:1.2.0.2 pkgsrc-2003Q4-base:1.2 netbsd-1-6-1:1.1.1.1.0.6 netbsd-1-6-1-base:1.1.1.1 netbsd-1-6:1.1.1.1.0.8 netbsd-1-6-RELEASE-base:1.1.1.1 pkgviews:1.1.1.1.0.4 pkgviews-base:1.1.1.1 buildlink2:1.1.1.1.0.2 buildlink2-base:1.1.1.1 netbsd-1-5-PATCH003:1.1.1.1 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.8 date 2026.03.22.09.42.12; author nia; state Exp; branches; next 1.7; commitid wyx4Jwva6uIvbXyG; 1.7 date 2012.01.25.09.56.08; author he; state Exp; branches; next 1.6; 1.6 date 2011.09.06.11.20.19; author obache; state Exp; branches; next 1.5; 1.5 date 2007.10.02.20.23.08; author heinz; state Exp; branches; next 1.4; 1.4 date 2006.03.14.14.11.53; author he; state Exp; branches; next 1.3; 1.3 date 2005.12.18.18.37.16; author joerg; state Exp; branches; next 1.2; 1.2 date 2003.09.21.09.15.31; author jmc; state Exp; branches; next 1.1; 1.1 date 2001.07.30.19.43.49; author nra; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2001.07.30.19.43.49; author nra; state Exp; branches; next ; desc @@ 1.8 log @yale-tftpd: Fix implicit function decls @ text @$NetBSD: patch-ad,v 1.7 2012/01/25 09:56:08 he Exp $ A number of changes to make this build with no warnings under -Wall. --- tftpd.c.orig 1995-03-20 20:14:39.000000000 +0000 +++ tftpd.c @@@@ -24,7 +24,7 @@@@ char copyright[] = #endif /* not lint */ #ifndef lint -static char sccsid[] = "@@(#)tftpd.c 5.12 (Berkeley) 6/1/90"; +char tftpd_sccsid[] = "@@(#)tftpd.c 5.12 (Berkeley) 6/1/90"; #endif /* not lint */ /* @@@@ -40,12 +40,15 @@@@ static char sccsid[] = "@@(#)tftpd.c 5.12 #include #include #include -#include #include #include +#ifdef __sun +#include +#endif #include +#include #include #include @@@@ -53,22 +56,49 @@@@ static char sccsid[] = "@@(#)tftpd.c 5.12 #include #include #include +#include #include #include +#include +#include +#ifdef __STDC__ +#include +#endif + #define TIMEOUT 5 -extern int errno; +extern int readConfigFile(int, char**); +extern int realPath(char *, char*); +extern int validateAccessToFile(char *, unsigned long, int); +extern int isConfigFile(struct stat*); + +extern int readit(FILE *, struct tftphdr **, int); +extern void read_ahead(FILE *, int); +extern int synchnet(int); +extern int write_behind(FILE *, int); +extern int writeit(FILE *, struct tftphdr **, int, int); + + +static void setUpForDebugging(); +static void reapChildren(); +static int awaitInput(int); +static int createChild(); +static void runChild(struct tftphdr*, int); +static void tftp(struct tftphdr *, int); +static void nak(int); +static int validate_access(char *, int); + struct sockaddr_in sock_in = { AF_INET }; int peer; int rexmtval = TIMEOUT; int maxtimeout = 5*TIMEOUT; -#define PKTSIZE SEGSIZE+4 -char buf[PKTSIZE]; -char ackbuf[PKTSIZE]; +#define BUF_PKTSIZE SEGSIZE+4 +char buf[BUF_PKTSIZE]; +char ackbuf[BUF_PKTSIZE]; struct sockaddr_in from; -int fromlen; +socklen_t fromlen; extern int tftpDebugLevel; extern char* tftpDefaultDirectory; @@@@ -92,6 +122,7 @@@@ int n; } #endif +int main(argc, argv) int argc; char **argv; @@@@ -105,6 +136,8 @@@@ char **argv; if (argc > 1 && strcmp (argv[1], "-d") == 0) { setUpForDebugging(); + argc--; + argv++; } if (ioctl(0, FIONBIO, &on) < 0) { syslog(LOG_ERR, "ioctl(FIONBIO): %m\n"); @@@@ -165,6 +198,7 @@@@ char **argv; /* Run directly, rather than called from inetd. */ +static void setUpForDebugging() { int peer; @@@@ -182,7 +216,7 @@@@ setUpForDebugging() listenSock.sin_family = AF_INET; listenSock.sin_addr.s_addr = htonl(INADDR_ANY); - if (serv = getservbyname("tftpd", "udp")) + if ((serv = getservbyname("tftpd", "udp")) != 0) listenSock.sin_port = serv->s_port; else listenSock.sin_port = htons(69); @@@@ -199,10 +233,11 @@@@ setUpForDebugging() * wait for seconds, or a default * of 5 minutes if that is not set. */ +static int awaitInput(chan) int chan; { - int imask; + fd_set imask; int nready; struct timeval tv; extern int maxInputWait; @@@@ -212,8 +247,9 @@@@ int chan; else tv.tv_sec = 5*60; /* default: wait for 5 minutes */ tv.tv_usec = 0; - imask = 1<th_stuff; #else @@@@ -345,8 +390,8 @@@@ again: goto again; } for (cp = mode; *cp; cp++) - if (isupper(*cp)) - *cp = tolower(*cp); + if (isupper((unsigned char)*cp)) + *cp = tolower((unsigned char)*cp); for (pf = formats; pf->f_mode; pf++) if (strcmp(pf->f_mode, mode) == 0) break; @@@@ -355,13 +400,13 @@@@ again: exit(1); } if (tftpDebugLevel > 0) { - char buf[1024]; - buf[0] = '\0'; - getwd(buf); + char* buf; + buf = getcwd(NULL, 0); syslog(LOG_DEBUG, "request %s '%s' from %s; cwd='%s'", (tp->th_opcode == RRQ ? "read" : "write"), filename, inet_ntoa(from.sin_addr), buf); + free(buf); } ecode = (*pf->f_validate)(filename, tp->th_opcode); if (ecode) { @@@@ -438,6 +483,7 @@@@ FILE *file; * */ #define IS_ROOTED(S) (*(S) == '/') +static int validate_access(filename, mode) char *filename; int mode; @@@@ -459,17 +505,25 @@@@ validate_access(filename, mode) /* Rule 2: */ - if (tftpRootDirectory != 0 && IS_ROOTED(filename)) { + if ((tftpRootDirectory != 0 && IS_ROOTED(filename)) || + (tftpDefaultDirectory != 0 && IS_ROOTED(filename))) { char _tmp[1024]; + char* realRootDir; int maxPath; int rootLen; - rootLen = strlen (tftpRootDirectory); + if (tftpRootDirectory != 0 ) { + realRootDir = tftpRootDirectory; + } + else { + realRootDir = tftpDefaultDirectory; + } + + rootLen = strlen (realRootDir); /* make sure the pathname doesn't already contain * the virtual root. */ - if (strncmp(filename,tftpRootDirectory,rootLen) != 0) { /* Insure our temporary space is big enough */ maxPath = ((sizeof _tmp) - 1) - rootLen; @@@@ -481,6 +535,8 @@@@ validate_access(filename, mode) return EACCESS; } + if (strncmp(filename,realRootDir,rootLen) != 0) { + /* Squeeze out any '.' or '..' components */ strcpy (tmpPath, filename); if (realPath (tmpPath, _tmp) < 0) { @@@@ -492,21 +548,54 @@@@ validate_access(filename, mode) /* Create the full pathname, prefixed by the * virtual root. */ - strcpy (tmpPath, tftpRootDirectory); + strcpy (tmpPath, realRootDir); strcat (tmpPath, _tmp); filename = tmpPath; } + else { + /* Squeeze out any '.' or '..' components */ + strcpy (tmpPath, filename); + if (realPath (tmpPath, _tmp) < 0) { + if (tftpDebugLevel > 1) + syslog (LOG_DEBUG, "realPath fails"); + return EACCESS; + } + /* Create the full pathname */ + strcpy (tmpPath,_tmp); + filename = tmpPath; + if (strncmp(filename,realRootDir,rootLen) != 0) { + if (tftpDebugLevel > 1) { + syslog(LOG_DEBUG, "file=%s; invalid access denied", filename); + return EACCESS; + } + } + } } /* Rule 3: */ - if (!IS_ROOTED(filename) && tftpDefaultDirectory == 0) { - strcpy (tmpPath, tftpRootDirectory); - strcat (tmpPath, "/"); + if ((!IS_ROOTED(filename) && tftpRootDirectory != 0) || + (!IS_ROOTED(filename) && tftpDefaultDirectory != 0)) { + char _tmp[1024]; strcat (tmpPath, filename); + /* Squeeze out any '.' or '..' components */ + strcpy (tmpPath, filename); + if (realPath (tmpPath, _tmp) < 0) { + if (tftpDebugLevel > 1) + syslog (LOG_DEBUG, "realPath fails"); + return EACCESS; + } + if ( tftpDefaultDirectory == 0 ) { + strcpy (tmpPath, tftpRootDirectory); + } + else { + strcpy (tmpPath, tftpDefaultDirectory); + } + strcat (tmpPath, _tmp); filename = tmpPath; } + /* Check access lists */ /* Rules 4&5: */ @@@@ -565,7 +654,7 @@@@ validate_access(filename, mode) * This will be done with the effective permissions of the TFTPD * process. */ - fd = open(filename, mode == RRQ ? 0 : 1); + fd = open(filename, mode == RRQ ? (O_RDONLY) : (O_WRONLY|O_TRUNC)); if (fd < 0) { syslog (LOG_DEBUG, "open fails; errno = %d", errno); return errno+100; @@@@ -593,7 +682,8 @@@@ void timer() /* * Send the requested file. */ -sendfile(pf) +int +tftpsendfile(pf) struct formats *pf; { struct tftphdr *dp, *r_init(); @@@@ -664,7 +754,8 @@@@ void justquit() /* * Receive a file. */ -recvfile(pf) +int +tftprecvfile(pf) struct formats *pf; { struct tftphdr *dp, *w_init(); @@@@ -688,7 +779,7 @@@@ send_ack: write_behind(file, pf->f_convert); for ( ; ; ) { alarm(rexmtval); - n = recv(peer, dp, PKTSIZE, 0); + n = recv(peer, dp, BUF_PKTSIZE, 0); alarm(0); if (n < 0) { /* really? */ syslog(LOG_ERR, "tftpd: read: %m\n"); @@@@ -758,6 +849,7 @@@@ struct errmsg { * standard TFTP codes, or a UNIX errno * offset by 100. */ +static void nak(error) int error; { @ 1.7 log @Update patches for this package so that it builds with -Werror and -Wall with the gcc in NetBSD 5.1, i.e. gcc 4.1.3. Fixes prompted by reports that a build outside of pkgsrc for "64-bit Linux" (amd64) but using this set of patches, gets a segfault, and this fixes that problem. Bump pkgrevision. @ text @d1 1 a1 1 $NetBSD$ d16 5 a20 2 @@@@ -43,9 +43,13 @@@@ static char sccsid[] = "@@(#)tftpd.c 5.12 #include d33 5 a37 1 @@@@ -56,19 +60,45 @@@@ static char sccsid[] = "@@(#)tftpd.c 5.12 @ 1.6 log @Include for inet_ntoa additionally. Fixes coredump with logging on platforms sizeof(int) != sizeof(char*). PR pkg/45243. Bump PKGREVISION. @ text @d1 3 a3 1 $NetBSD: patch-ad,v 1.5 2007/10/02 20:23:08 heinz Exp $ d7 9 d30 1 a30 1 @@@@ -56,17 +60,22 @@@@ static char sccsid[] = "@@(#)tftpd.c 5.12 d43 21 d76 2 a77 1 int fromlen; d79 11 a89 1 @@@@ -105,6 +114,8 @@@@ char **argv; d98 22 a119 1 @@@@ -202,7 +213,7 @@@@ setUpForDebugging() d128 1 a128 1 @@@@ -212,8 +223,9 @@@@ int chan; d140 30 a169 1 @@@@ -294,7 +306,10 @@@@ int n; d181 1 a181 1 @@@@ -303,8 +318,8 @@@@ struct formats { d192 29 a220 1 @@@@ -355,13 +370,13 @@@@ again: d237 9 a245 1 @@@@ -459,17 +474,25 @@@@ validate_access(filename, mode) d274 1 a274 1 @@@@ -481,6 +504,8 @@@@ validate_access(filename, mode) d283 1 a283 1 @@@@ -492,21 +517,54 @@@@ validate_access(filename, mode) d342 1 a342 1 @@@@ -565,7 +623,7 @@@@ validate_access(filename, mode) d351 1 a351 1 @@@@ -593,7 +651,7 @@@@ void timer() d356 1 d361 1 a361 1 @@@@ -664,7 +722,7 @@@@ void justquit() d366 1 d371 1 a371 1 @@@@ -688,7 +746,7 @@@@ send_ack: d380 8 @ 1.5 log @Added compatibility fixes for NetBSD/FreeBSD/Linux/Solaris provided by Yakovetsky Vladimir in PR pkg/36942. Shut up warning by pkglint (PLIST). Introduced PKGMANDIR in software Makefile. @ text @d1 1 a1 1 $NetBSD: patch-ad,v 1.4 2006/03/14 14:11:53 he Exp $ d3 1 a3 1 --- tftpd.c.orig 1995-03-20 21:14:39.000000000 +0100 d5 1 a5 1 @@@@ -43,6 +43,9 @@@@ static char sccsid[] = "@@(#)tftpd.c 5.12 d15 5 a19 1 @@@@ -56,17 +59,22 @@@@ static char sccsid[] = "@@(#)tftpd.c 5.12 d46 1 a46 1 @@@@ -105,6 +113,8 @@@@ char **argv; d55 1 a55 1 @@@@ -202,7 +212,7 @@@@ setUpForDebugging() d64 1 a64 1 @@@@ -212,8 +222,9 @@@@ int chan; d76 1 a76 1 @@@@ -294,7 +305,10 @@@@ int n; d88 1 a88 1 @@@@ -303,8 +317,8 @@@@ struct formats { d99 1 a99 1 @@@@ -355,13 +369,13 @@@@ again: d116 1 a116 1 @@@@ -459,17 +473,25 @@@@ validate_access(filename, mode) d145 1 a145 1 @@@@ -481,6 +503,8 @@@@ validate_access(filename, mode) d154 1 a154 1 @@@@ -492,21 +516,54 @@@@ validate_access(filename, mode) d213 1 a213 1 @@@@ -565,7 +622,7 @@@@ validate_access(filename, mode) d222 1 a222 1 @@@@ -593,7 +650,7 @@@@ void timer() d231 1 a231 1 @@@@ -664,7 +721,7 @@@@ void justquit() d240 1 a240 1 @@@@ -688,7 +745,7 @@@@ send_ack: @ 1.4 log @When opening a file for write, truncate it as well. Bump package revision to 4. @ text @d1 1 a1 1 $NetBSD$ d5 11 a15 1 @@@@ -56,17 +56,19 @@@@ static char sccsid[] = "@@(#)tftpd.c 5.12 d21 3 d42 1 a42 1 @@@@ -105,6 +107,8 @@@@ char **argv; d51 1 a51 1 @@@@ -202,7 +206,7 @@@@ setUpForDebugging() d60 1 a60 1 @@@@ -212,8 +216,9 @@@@ int chan; d72 1 a72 1 @@@@ -294,7 +299,10 @@@@ int n; d84 1 a84 1 @@@@ -303,8 +311,8 @@@@ struct formats { d95 1 a95 1 @@@@ -355,13 +363,13 @@@@ again: d112 1 a112 1 @@@@ -459,17 +467,25 @@@@ validate_access(filename, mode) d141 1 a141 1 @@@@ -481,6 +497,8 @@@@ validate_access(filename, mode) d150 1 a150 1 @@@@ -492,21 +510,54 @@@@ validate_access(filename, mode) d209 1 a209 1 @@@@ -565,7 +616,7 @@@@ validate_access(filename, mode) d218 1 a218 1 @@@@ -593,7 +644,7 @@@@ void timer() d227 1 a227 1 @@@@ -664,7 +715,7 @@@@ void justquit() d236 1 a236 1 @@@@ -688,7 +739,7 @@@@ send_ack: @ 1.3 log @Deorbit some pre-ANSI crap which breaks on DragonFly: - errno from errno.h - calloc and malloc from stdlib.h - strdup from string.h @ text @d3 1 a3 1 --- tftpd.c.orig 1995-03-20 20:14:39.000000000 +0000 d5 1 a5 1 @@@@ -56,17 +56,18 @@@@ static char sccsid[] = "@@(#)tftpd.c 5.12 d10 1 d29 1 a29 1 @@@@ -105,6 +106,8 @@@@ char **argv; d38 1 a38 1 @@@@ -202,7 +205,7 @@@@ setUpForDebugging() d47 1 a47 1 @@@@ -212,8 +215,9 @@@@ int chan; d59 1 a59 1 @@@@ -294,7 +298,10 @@@@ int n; d71 1 a71 1 @@@@ -303,8 +310,8 @@@@ struct formats { d82 1 a82 1 @@@@ -355,13 +362,13 @@@@ again: d99 1 a99 1 @@@@ -459,17 +466,25 @@@@ validate_access(filename, mode) d128 1 a128 1 @@@@ -481,6 +496,8 @@@@ validate_access(filename, mode) d137 1 a137 1 @@@@ -492,21 +509,54 @@@@ validate_access(filename, mode) d196 10 a205 1 @@@@ -593,7 +643,7 @@@@ void timer() d214 1 a214 1 @@@@ -664,7 +714,7 @@@@ void justquit() d223 1 a223 1 @@@@ -688,7 +738,7 @@@@ send_ack: @ 1.2 log @Rename some #define's so they don't conflict with some definitions from arpa.h @ text @d1 1 a1 1 $NetBSD: patch-ad,v 1.1.1.1 2001/07/30 19:43:49 nra Exp $ d3 1 a3 1 --- tftpd.c.orig Mon Mar 20 21:14:39 1995 d5 1 a5 1 @@@@ -56,6 +56,8 @@@@ d13 3 a15 2 extern int errno; @@@@ -66,9 +68,9 @@@@ d28 1 a28 1 @@@@ -105,6 +107,8 @@@@ d37 1 a37 1 @@@@ -202,7 +206,7 @@@@ d46 1 a46 1 @@@@ -212,8 +216,9 @@@@ d58 1 a58 1 @@@@ -294,7 +299,10 @@@@ d70 1 a70 1 @@@@ -303,8 +311,8 @@@@ d81 1 a81 1 @@@@ -355,13 +363,13 @@@@ d98 1 a98 1 @@@@ -459,17 +467,25 @@@@ d127 1 a127 1 @@@@ -481,6 +497,8 @@@@ d136 1 a136 1 @@@@ -492,21 +510,54 @@@@ d195 1 a195 1 @@@@ -593,7 +644,7 @@@@ d204 1 a204 1 @@@@ -664,7 +715,7 @@@@ d213 1 a213 1 @@@@ -739,7 +739,7 @@@@ @ 1.1 log @Initial revision @ text @d1 1 a1 1 $NetBSD$ d14 13 d212 9 @ 1.1.1.1 log @New package yale-tftpd version 3.0. PR 13177 by Stoned Elipot. yale-tftpd is an improved (but slightly incompatible until you configure it) tftpd server. It has a powerful and configurable security setup and is well suited for people who want to boot network devices using their system as a TFTP server. @ text @@