Commit Graph

221 Commits

Author SHA1 Message Date
mrg de11d87641 introduce some common variables for use in GCC warning disables:
GCC_NO_FORMAT_TRUNCATION    -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION  -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW    -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE   -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints.  many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
2019-10-13 07:28:04 +00:00
mrg 0af6a5291a use memmove() instead of strncpy() for overlapping strings.
ensure nul termination.
2019-10-04 11:39:44 +00:00
mrg 21303c93e9 convert HAVE_GCC == 7 to HAVE_GCC >= 7. 2019-09-29 23:44:58 +00:00
mrg a5ca97c6e5 apply -Wno-error=implicit-fallthrough on files that have fallthru
comments but are missed by the current checker.
2019-02-04 09:51:47 +00:00
maya 8a135c6afb Match the function prototype of encrypthandler instead of casting to it.
Make GCC 9 snapshot happier with the code

While here, remove unnecessary braces around return (KNF).
2019-01-05 08:55:58 +00:00
maya f96d98db06 Bump WARNS to 5, and remove unnecessary -Wno (tested with pkgsrc clang 7) 2019-01-05 06:59:46 +00:00
maya d9e6b51adf Remove advertising clause, permitted by the copyright author. 2019-01-05 06:56:03 +00:00
maya 68daebb7bc unifdef compatibility for old BSD servers. This has been
disabled, so no binary change. from openbsd.
2019-01-05 06:47:24 +00:00
maya 28da966269 Avoid unnecessary casts, from openbsd. No binary change. 2019-01-05 06:30:05 +00:00
maya c1e97742c6 Remove README relevant to 1995 telnet. 2018-12-15 22:56:51 +00:00
wiz 4abf4a7a7a Remove reference to krb_realmofhost(3) which does not exist.
Someone who speaks kerberos might want to check the -k description.

Remove some macros that do nothing and use \(em.
2018-12-15 22:17:02 +00:00
maya 067f4a3470 You can encrypt outside of north america now. 2018-12-15 22:12:15 +00:00
christos dbe0036b5a minor cleanup:
- more const
- prevent overflow of the argument vector
- change a lot of unsigned to signed to eliminate casts
2018-12-14 23:40:17 +00:00
maya 4f0678d2a5 Remove unneeded casts 2018-12-14 06:28:49 +00:00
maya 5d185efcae Remove some effectively if 0'd code. 2018-12-14 06:27:40 +00:00
maya 5b38d170b8 Inline the only use of NetNonblockingIO.
While here inline SetSockOpt. From openbsd.
2018-12-14 06:17:30 +00:00
maya 4e424770ac G/C In3270 - always false 2018-12-14 06:08:18 +00:00
maya 6aa0aef1f6 Expand SIG_FUNC_RET -from openbsd. 2018-12-13 09:20:05 +00:00
maya 16d5f4a25f Remove unused code. 2018-12-13 09:07:53 +00:00
maya e1e42e087d Remove unused code. 2018-12-13 05:22:14 +00:00
maya 342e9885b0 ExitString is used for error exit, do the minimum necessary here.
Avoid infinite loop:
telrcv->suboption->ExitString->SetForExit->telrcv

Reported by hacker fantastic, thanks!
2018-12-13 05:15:11 +00:00
maya 233931799b static-ify. 2018-12-13 05:07:03 +00:00
maya 7c20b20625 unifdef TN3270 which is never defined (and wouldn't build if it was)
delete tn3270 file no longer needed.
SetIn3270(); expands to nothing now, so remove it.

No functional change.
2018-12-13 04:49:19 +00:00
maya 3a1a1fef8c switch sprintf to snprintf in places.
Reported by hacker fantastic, thanks!

ok xtos.
2018-12-12 19:05:32 +00:00
mrg 2e19323388 add LIBKRB5_LDADD/LIBKRB5_DPADD and their static counterparts
to bsd.prog.mk.  use them instead of hard coding various lists
of libraries for krb5.

this fixes static builds.
2018-02-25 00:16:48 +00:00
mrg aa20739e7d fixes for GCC 6.4:
mail's execute() needs a volatile for setjmp().

telnet has a missing {} issue.

isdnd's print_config() has a missing/wrong {} issue, and
its p_q931bc() has inconsistent indentation (but not any
actual problem.)

map-mbone's accept_neighbors2() compares a vs. a instead
of a vs. b.

sysinst's pm_cgd_check() has missing {} issue.

timed's main() has missing {} issue.
2018-02-04 09:01:12 +00:00
wiz 01869ca4d2 Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
riastradh ef315f7931 Remove MKCRYPTO option.
Originally, MKCRYPTO was introduced because the United States
classified cryptography as a munition and restricted its export.  The
export controls were substantially relaxed fifteen years ago, and are
essentially irrelevant for software with published source code.

In the intervening time, nobody bothered to remove the option after
its motivation -- the US export restriction -- was eliminated.  I'm
not aware of any other operating system that has a similar option; I
expect it is mainly out of apathy for churn that we still have it.
Today, cryptography is an essential part of modern computing -- you
can't use the internet responsibly without cryptography.

The position of the TNF board of directors is that TNF makes no
representation that MKCRYPTO=no satisfies any country's cryptography
regulations.

My personal position is that the availability of cryptography is a
basic human right; that any local laws restricting it to a privileged
few are fundamentally immoral; and that it is wrong for developers to
spend effort crippling cryptography to work around such laws.

As proposed on tech-crypto, tech-security, and tech-userlevel to no
objections:

https://mail-index.netbsd.org/tech-crypto/2017/05/06/msg000719.html
https://mail-index.netbsd.org/tech-security/2017/05/06/msg000928.html
https://mail-index.netbsd.org/tech-userlevel/2017/05/06/msg010547.html

P.S.  Reviewing all the uses of MKCRYPTO in src revealed a lot of
*bad* crypto that was conditional on it, e.g. DES in telnet...  That
should probably be removed too, but on the grounds that it is bad,
not on the grounds that it is (nominally) crypto.
2017-05-21 15:28:36 +00:00
christos ce31bd9da4 add sqlite3 2017-01-28 23:42:36 +00:00
joerg 5937818688 GC header left from earlier diagnostic test. 2016-10-04 14:36:11 +00:00
joerg 2f2a5be7f3 Remove source routing support. 2016-10-04 14:35:38 +00:00
sevan 39bbc68a3b Drop main() prototype. 2016-09-05 00:40:28 +00:00
joerg 9edf9a0457 Remove many HAVE_GCC || HAVE_PCC conditionals as the options also apply
to Clang. Add a few cases of HAVE_LLVM for -fno-strict-aliasing.
2012-08-10 12:10:27 +00:00
wiz 1ac719d147 Remove unnecessary Bk/Ek pairs from SYNOPSIS.
No effective change except where I used the opportunity to sort options
and/or option descriptions.
2012-04-08 22:00:37 +00:00
wiz 3957bea1ef Fix whitespace nits. Suggested by Bug Hunting. 2012-03-22 07:58:16 +00:00
matt d34c2845b8 Use C89 function definitions 2012-03-20 20:34:57 +00:00
joerg 4c70cdf100 Use __dead 2012-01-10 23:39:11 +00:00
christos 06c8e120ad fix signed/unsigned comparison. 2012-01-10 13:49:32 +00:00
christos fcdbba429b PR/45805: Borodin Oleg: telnet/telnetd with -DAUTHENTICATION -DENCRYPTION
(rfc2941)
- Minimal diffs to separate MKCRYPTO from USE_KERBEROS
2012-01-09 16:08:55 +00:00
drochner 8fd6dadaf8 include <netipsec/ipsec.h> rather than <netinet6/ipsec.h> from userland
where possible, for consistency and compatibility to FreeBSD
(exception: KAME specific statistics gathering in netstat(1) and systat(1))
2012-01-04 16:09:40 +00:00
christos 1dcb02d8c7 remove casts 2011-10-07 16:30:17 +00:00
joerg 26c79d78b3 Simplify 2011-10-07 10:14:22 +00:00
roy 47e1ece0c2 Use terminfo and the non-standard ttytype rather than termcap. 2011-10-05 10:48:54 +00:00
mrg 75e42fa7da remove most of the remaining HAVE_GCC tests that are always true in
the modern world.
2011-06-20 07:43:56 +00:00
joerg a216da57a6 Default to -Wno-sign-compare -Wno-pointer-sign for clang.
Push -Wno-array-bounds down to the cases that depend on it.
Selectively disable warnings for 3rd party software or non-trivial
issues to be reviewed later to get clang -Werror to build most of the
tree.
2011-05-26 12:56:24 +00:00
elric 07b0c75a48 We no longer need -I/usr/include/krb5. 2011-04-24 21:42:06 +00:00
roy 98eb889579 Userland now builds and uses terminfo instead of termcap.
OK: core@, jdc@
2010-02-03 15:34:37 +00:00
lukem c1ceae17f0 Enable WARNS=4 by default for usr.bin, except for:
awk  bdes  checknr  compile_et  error  gss  hxtool  kgetcred  kinit
	klist  ldd  less  lex  locale  login  m4  man  menuc  mk_cmds
	mklocale  msgc  openssl  rpcgen  rpcinfo  sdiff  spell  ssh
	string2key  telnet  tn3270  verify_krb5_conf  xlint
2009-04-14 22:15:16 +00:00
joerg 8929e0dce4 Don't workaround ancient macro argument limit with .Xo/.Xc. 2009-03-11 13:58:29 +00:00
gmcgarry 3c9a95916d Wrap compiler-specific flags with HAVE_GCC and HAVE_PCC as necessary. Add a few flags for PCC. 2008-08-29 00:02:21 +00:00