head 1.6; access; symbols pkgsrc-2026Q1:1.6.0.2 pkgsrc-2026Q1-base:1.6 pkgsrc-2025Q4:1.5.0.112 pkgsrc-2025Q4-base:1.5 pkgsrc-2025Q3:1.5.0.110 pkgsrc-2025Q3-base:1.5 pkgsrc-2025Q2:1.5.0.108 pkgsrc-2025Q2-base:1.5 pkgsrc-2025Q1:1.5.0.106 pkgsrc-2025Q1-base:1.5 pkgsrc-2024Q4:1.5.0.104 pkgsrc-2024Q4-base:1.5 pkgsrc-2024Q3:1.5.0.102 pkgsrc-2024Q3-base:1.5 pkgsrc-2024Q2:1.5.0.100 pkgsrc-2024Q2-base:1.5 pkgsrc-2024Q1:1.5.0.98 pkgsrc-2024Q1-base:1.5 pkgsrc-2023Q4:1.5.0.96 pkgsrc-2023Q4-base:1.5 pkgsrc-2023Q3:1.5.0.94 pkgsrc-2023Q3-base:1.5 pkgsrc-2023Q2:1.5.0.92 pkgsrc-2023Q2-base:1.5 pkgsrc-2023Q1:1.5.0.90 pkgsrc-2023Q1-base:1.5 pkgsrc-2022Q4:1.5.0.88 pkgsrc-2022Q4-base:1.5 pkgsrc-2022Q3:1.5.0.86 pkgsrc-2022Q3-base:1.5 pkgsrc-2022Q2:1.5.0.84 pkgsrc-2022Q2-base:1.5 pkgsrc-2022Q1:1.5.0.82 pkgsrc-2022Q1-base:1.5 pkgsrc-2021Q4:1.5.0.80 pkgsrc-2021Q4-base:1.5 pkgsrc-2021Q3:1.5.0.78 pkgsrc-2021Q3-base:1.5 pkgsrc-2021Q2:1.5.0.76 pkgsrc-2021Q2-base:1.5 pkgsrc-2021Q1:1.5.0.74 pkgsrc-2021Q1-base:1.5 pkgsrc-2020Q4:1.5.0.72 pkgsrc-2020Q4-base:1.5 pkgsrc-2020Q3:1.5.0.70 pkgsrc-2020Q3-base:1.5 pkgsrc-2020Q2:1.5.0.66 pkgsrc-2020Q2-base:1.5 pkgsrc-2020Q1:1.5.0.46 pkgsrc-2020Q1-base:1.5 pkgsrc-2019Q4:1.5.0.68 pkgsrc-2019Q4-base:1.5 pkgsrc-2019Q3:1.5.0.64 pkgsrc-2019Q3-base:1.5 pkgsrc-2019Q2:1.5.0.62 pkgsrc-2019Q2-base:1.5 pkgsrc-2019Q1:1.5.0.60 pkgsrc-2019Q1-base:1.5 pkgsrc-2018Q4:1.5.0.58 pkgsrc-2018Q4-base:1.5 pkgsrc-2018Q3:1.5.0.56 pkgsrc-2018Q3-base:1.5 pkgsrc-2018Q2:1.5.0.54 pkgsrc-2018Q2-base:1.5 pkgsrc-2018Q1:1.5.0.52 pkgsrc-2018Q1-base:1.5 pkgsrc-2017Q4:1.5.0.50 pkgsrc-2017Q4-base:1.5 pkgsrc-2017Q3:1.5.0.48 pkgsrc-2017Q3-base:1.5 pkgsrc-2017Q2:1.5.0.44 pkgsrc-2017Q2-base:1.5 pkgsrc-2017Q1:1.5.0.42 pkgsrc-2017Q1-base:1.5 pkgsrc-2016Q4:1.5.0.40 pkgsrc-2016Q4-base:1.5 pkgsrc-2016Q3:1.5.0.38 pkgsrc-2016Q3-base:1.5 pkgsrc-2016Q2:1.5.0.36 pkgsrc-2016Q2-base:1.5 pkgsrc-2016Q1:1.5.0.34 pkgsrc-2016Q1-base:1.5 pkgsrc-2015Q4:1.5.0.32 pkgsrc-2015Q4-base:1.5 pkgsrc-2015Q3:1.5.0.30 pkgsrc-2015Q3-base:1.5 pkgsrc-2015Q2:1.5.0.28 pkgsrc-2015Q2-base:1.5 pkgsrc-2015Q1:1.5.0.26 pkgsrc-2015Q1-base:1.5 pkgsrc-2014Q4:1.5.0.24 pkgsrc-2014Q4-base:1.5 pkgsrc-2014Q3:1.5.0.22 pkgsrc-2014Q3-base:1.5 pkgsrc-2014Q2:1.5.0.20 pkgsrc-2014Q2-base:1.5 pkgsrc-2014Q1:1.5.0.18 pkgsrc-2014Q1-base:1.5 pkgsrc-2013Q4:1.5.0.16 pkgsrc-2013Q4-base:1.5 pkgsrc-2013Q3:1.5.0.14 pkgsrc-2013Q3-base:1.5 pkgsrc-2013Q2:1.5.0.12 pkgsrc-2013Q2-base:1.5 pkgsrc-2013Q1:1.5.0.10 pkgsrc-2013Q1-base:1.5 pkgsrc-2012Q4:1.5.0.8 pkgsrc-2012Q4-base:1.5 pkgsrc-2012Q3:1.5.0.6 pkgsrc-2012Q3-base:1.5 pkgsrc-2012Q2:1.5.0.4 pkgsrc-2012Q2-base:1.5 pkgsrc-2012Q1:1.5.0.2 pkgsrc-2012Q1-base:1.5 pkgsrc-2011Q4:1.4.0.4 pkgsrc-2011Q4-base:1.4 pkgsrc-2011Q3:1.4.0.2 pkgsrc-2011Q3-base:1.4 pkgsrc-2011Q2:1.3.0.36 pkgsrc-2011Q2-base:1.3 pkgsrc-2011Q1:1.3.0.34 pkgsrc-2011Q1-base:1.3 pkgsrc-2010Q4:1.3.0.32 pkgsrc-2010Q4-base:1.3 pkgsrc-2010Q3:1.3.0.30 pkgsrc-2010Q3-base:1.3 pkgsrc-2010Q2:1.3.0.28 pkgsrc-2010Q2-base:1.3 pkgsrc-2010Q1:1.3.0.26 pkgsrc-2010Q1-base:1.3 pkgsrc-2009Q4:1.3.0.24 pkgsrc-2009Q4-base:1.3 pkgsrc-2009Q3:1.3.0.22 pkgsrc-2009Q3-base:1.3 pkgsrc-2009Q2:1.3.0.20 pkgsrc-2009Q2-base:1.3 pkgsrc-2009Q1:1.3.0.18 pkgsrc-2009Q1-base:1.3 pkgsrc-2008Q4:1.3.0.16 pkgsrc-2008Q4-base:1.3 pkgsrc-2008Q3:1.3.0.14 pkgsrc-2008Q3-base:1.3 cube-native-xorg:1.3.0.12 cube-native-xorg-base:1.3 pkgsrc-2008Q2:1.3.0.10 pkgsrc-2008Q2-base:1.3 cwrapper:1.3.0.8 pkgsrc-2008Q1:1.3.0.6 pkgsrc-2008Q1-base:1.3 pkgsrc-2007Q4:1.3.0.4 pkgsrc-2007Q4-base:1.3 pkgsrc-2007Q3:1.3.0.2 pkgsrc-2007Q3-base:1.3 pkgsrc-2007Q2:1.2.0.28 pkgsrc-2007Q2-base:1.2 pkgsrc-2007Q1:1.2.0.26 pkgsrc-2007Q1-base:1.2 pkgsrc-2006Q4:1.2.0.24 pkgsrc-2006Q4-base:1.2 pkgsrc-2006Q3:1.2.0.22 pkgsrc-2006Q3-base:1.2 pkgsrc-2006Q2:1.2.0.20 pkgsrc-2006Q2-base:1.2 pkgsrc-2006Q1:1.2.0.18 pkgsrc-2006Q1-base:1.2 pkgsrc-2005Q4:1.2.0.16 pkgsrc-2005Q4-base:1.2 pkgsrc-2005Q3:1.2.0.14 pkgsrc-2005Q3-base:1.2 pkgsrc-2005Q2:1.2.0.12 pkgsrc-2005Q2-base:1.2 pkgsrc-2005Q1:1.2.0.10 pkgsrc-2005Q1-base:1.2 pkgsrc-2004Q4:1.2.0.8 pkgsrc-2004Q4-base:1.2 pkgsrc-2004Q3:1.2.0.6 pkgsrc-2004Q3-base:1.2 pkgsrc-2004Q2:1.2.0.4 pkgsrc-2004Q2-base:1.2 pkgsrc-2004Q1:1.2.0.2 pkgsrc-2004Q1-base:1.2 pkgsrc-2003Q4:1.1.0.10 pkgsrc-2003Q4-base:1.1 netbsd-1-6-1:1.1.0.6 netbsd-1-6-1-base:1.1 netbsd-1-6:1.1.0.8 netbsd-1-6-RELEASE-base:1.1 pkgviews:1.1.0.4 pkgviews-base:1.1 buildlink2:1.1.0.2 buildlink2-base:1.1 netbsd-1-5-PATCH003:1.1; locks; strict; comment @# @; 1.6 date 2026.03.22.09.42.12; author nia; state Exp; branches; next 1.5; commitid wyx4Jwva6uIvbXyG; 1.5 date 2012.01.25.09.56.08; author he; state Exp; branches; next 1.4; 1.4 date 2011.09.06.11.20.19; author obache; state Exp; branches; next 1.3; 1.3 date 2007.10.02.20.23.08; author heinz; state Exp; branches; next 1.2; 1.2 date 2004.03.21.10.29.51; author seb; state Exp; branches; next 1.1; 1.1 date 2002.04.01.00.04.44; author dmcmahill; state Exp; branches; next ; desc @@ 1.6 log @yale-tftpd: Fix implicit function decls @ text @$NetBSD: patch-ai,v 1.5 2012/01/25 09:56:08 he Exp $ A number of changes to make this build with no warnings under -Wall. --- tftpyale.c.orig 1995-03-20 20:11:11.000000000 +0000 +++ tftpyale.c @@@@ -2,8 +2,10 @@@@ #include #include #include -#include +#include #include +#include +#include #include #include #include "tftpyale.h" @@@@ -73,6 +75,10 @@@@ static char* accessFormatError; static char* cfgets(); static struct stat configStat; static int defaultAccessList; +static int addFileRestriction(int, char **); +static void resetConfig(); +static void accessDebugDump(); + /* for debugging printouts */ static char* permNames[] ={ "deny", "readonly", "writeonly", "readwrite" }; @@@@ -90,12 +96,12 @@@@ static char* permNames[] ={ "deny", "rea #define CMD_INPUT_WAIT 7 /* Add a file restriction clause to the list */ -static +static int addFileRestriction (ac, av) int ac; char** av; { - int list; + long list; ac--; av++; if (ac != 2) { @@@@ -104,7 +110,7 @@@@ char** av; } /* get list number */ - list = atoi (av[1]); + list = atol (av[1]); if (list <= 0) { accessFormatError = "list argument not positive integer"; return 0; @@@@ -142,6 +148,7 @@@@ int *lineCount; /* Return whether the file named by the argument stat structure * is the same as the configuration file. */ +int isConfigFile (sb) struct stat* sb; { @@@@ -157,27 +164,24 @@@@ struct stat* sb; * qualified (starts with '/') check to see if the * prefix matches the default directory. */ -static int +static long getAccessList (fileName) char* fileName; { - unsigned int list; + unsigned long list; char* rindex(); if (*fileName == '/') { - 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++; } } - list = (int)dict_find (fileAccessDict, fileName); + list = (long)dict_find (fileAccessDict, fileName); return list ? list : defaultAccessList; } @@@@ -202,7 +206,7 @@@@ char* arg; * on the file and check to see if it's been modified since * the last read. */ - +int readConfigFile(argc, argv) int argc; char** argv; @@@@ -216,12 +220,14 @@@@ char** argv; struct stat statb; Config cnf; + fileName=""; /* If given an argument, it must be the name * of a configuration file. Otherwise use * the default. */ if (tftpDebugLevel > 3) { - syslog(LOG_DEBUG, "readConfigFile(%d,0x%08x)", argc, argv); + syslog(LOG_DEBUG, "readConfigFile(%d,0x%08x)", + argc, (intptr_t) argv); } if (configf == 0) { fileName = dfltConfigFile; @@@@ -238,7 +244,7 @@@@ char** argv; } if (tftpDebugLevel > 3) { syslog(LOG_DEBUG, "configFile = '%s'; FILE* = 0x%08x", - fileName, configf); + fileName, (intptr_t)configf); } /* See if the file has been changed since the last time we @@@@ -250,7 +256,7 @@@@ char** argv; fstat(fileno(configf), &statb); configStat = statb; if (statb.st_mtime == configModTime) - return; + return 0; configModTime = statb.st_mtime; /* Read the config file */ @@@@ -262,14 +268,13 @@@@ char** argv; config_setoptions (cnf, config_getoptions (cnf)& ~CFG_OPT_CASEMAP); while (cfgets (buf, sizeof buf, configf, &configLineNumber) != NULL) { - char* end; cargc = config_scanbuf (cnf, buf); if (cargc == 0) continue; cargv = config_fields(cnf); - switch ((int)dict_find (commandDict, cargv[0])) { + switch ((long)dict_find (commandDict, cargv[0])) { /* specify default directory */ case CMD_DEFAULT_DIR: if (cargc != 2) @@@@ -446,7 +451,7 @@@@ char* buf; /* squeeze out current and parent entries */ { - register i, j; + int i, j; for (i=0, j=0; i < num; i++) { char* cur = obuf[i]; @@@@ -481,28 +486,28 @@@@ char* buf; static struct CMDS { char* cmdName; - int cmdVal; + long cmdVal; } configCmds[] ={ - "default-directory", CMD_DEFAULT_DIR, - "defaultDirectory", CMD_DEFAULT_DIR, - "debug-level", CMD_DEBUG_LEVEL, - "debugLevel", CMD_DEBUG_LEVEL, - "root-directory", CMD_ROOT_DIR, - "rootDirectory", CMD_ROOT_DIR, - "access-list", CMD_ACCESS_LIST, - "accessList", CMD_ACCESS_LIST, - "default-access-list", CMD_DEFAULT_ACCESS_LIST, - "defaultAccessList", CMD_DEFAULT_ACCESS_LIST, - "restrict", CMD_RESTRICT, - "inputWait", CMD_INPUT_WAIT, - "input-wait", CMD_INPUT_WAIT, - (char*)0, 0 + { "default-directory", CMD_DEFAULT_DIR }, + { "defaultDirectory", CMD_DEFAULT_DIR }, + { "debug-level", CMD_DEBUG_LEVEL }, + { "debugLevel", CMD_DEBUG_LEVEL }, + { "root-directory", CMD_ROOT_DIR }, + { "rootDirectory", CMD_ROOT_DIR }, + { "access-list", CMD_ACCESS_LIST }, + { "accessList", CMD_ACCESS_LIST }, + { "default-access-list",CMD_DEFAULT_ACCESS_LIST }, + { "defaultAccessList", CMD_DEFAULT_ACCESS_LIST }, + { "restrict", CMD_RESTRICT }, + { "inputWait", CMD_INPUT_WAIT }, + { "input-wait", CMD_INPUT_WAIT }, + { (char*)0, 0 } }; /* reset configuration options to defaults */ +static void resetConfig() { - register int i; extern char* dfltDefaultDirectory; extern char* dfltRootDirectory; extern int dfltDebugLevel; @@@@ -603,12 +608,14 @@@@ int type; #ifndef DEBUG +static void accessDebugDump() { } #else #include +static void accessDebugDump() { FILE* logf; @ 1.5 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$ d7 1 a7 1 @@@@ -2,8 +2,9 @@@@ d12 1 d19 1 a19 1 @@@@ -73,6 +74,10 @@@@ static char* accessFormatError; d30 1 a30 1 @@@@ -90,12 +95,12 @@@@ static char* permNames[] ={ "deny", "rea d45 1 a45 1 @@@@ -104,7 +109,7 @@@@ char** av; d54 1 a54 1 @@@@ -142,6 +147,7 @@@@ int *lineCount; d62 1 a62 1 @@@@ -157,27 +163,24 @@@@ struct stat* sb; d96 1 a96 1 @@@@ -202,7 +205,7 @@@@ char* arg; d105 1 a105 1 @@@@ -216,12 +219,14 @@@@ char** argv; d121 1 a121 1 @@@@ -238,7 +243,7 @@@@ char** argv; d130 1 a130 1 @@@@ -250,7 +255,7 @@@@ char** argv; d139 1 a139 1 @@@@ -262,14 +267,13 @@@@ char** argv; d155 1 a155 1 @@@@ -446,7 +450,7 @@@@ char* buf; d164 1 a164 1 @@@@ -481,28 +485,28 @@@@ char* buf; d209 1 a209 1 @@@@ -603,12 +607,14 @@@@ int type; @ 1.4 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-ai,v 1.3 2007/10/02 20:23:08 heinz Exp $ d18 18 a35 1 @@@@ -95,7 +96,7 @@@@ addFileRestriction (ac, av) d44 1 a44 1 @@@@ -104,7 +105,7 @@@@ char** av; d53 9 a61 1 @@@@ -157,27 +158,24 @@@@ struct stat* sb; d95 51 a145 1 @@@@ -269,7 +267,7 @@@@ char** argv; d154 10 a163 1 @@@@ -481,7 +479,7 @@@@ char* buf; d170 53 a222 2 "default-directory", CMD_DEFAULT_DIR, "defaultDirectory", CMD_DEFAULT_DIR, @ 1.3 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-ai,v 1.2 2004/03/21 10:29:51 seb Exp $ d3 1 a3 1 --- tftpyale.c.orig 1995-03-20 21:11:11.000000000 +0100 d5 1 a5 1 @@@@ -2,8 +2,8 @@@@ d11 1 d16 1 a16 1 @@@@ -95,7 +95,7 @@@@ addFileRestriction (ac, av) d25 1 a25 1 @@@@ -104,7 +104,7 @@@@ char** av; d34 1 a34 1 @@@@ -157,27 +157,24 @@@@ struct stat* sb; d68 1 a68 1 @@@@ -269,7 +266,7 @@@@ char** argv; d77 1 a77 1 @@@@ -481,7 +478,7 @@@@ char* buf; @ 1.2 log @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. @ text @d1 1 a1 1 $NetBSD$ d5 10 @ 1.1 log @fix for LP64 systems. Mostly just adding missing header files. @ text @d3 1 a3 1 --- tftpyale.c.orig Mon Mar 20 15:11:11 1995 d5 1 a5 1 @@@@ -95,7 +95,7 @@@@ d14 1 a14 1 @@@@ -104,7 +104,7 @@@@ d23 1 a23 1 @@@@ -157,11 +157,11 @@@@ d37 12 a48 1 @@@@ -177,7 +177,7 @@@@ d57 1 a57 1 @@@@ -269,7 +269,7 @@@@ d66 1 a66 1 @@@@ -481,7 +481,7 @@@@ @