Commit Graph

111 Commits

Author SHA1 Message Date
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
fa8f034bc1 unifdef RSA_ENCPWD. The matching code does not exist. 2018-12-16 16:06:39 +00:00
maya
87f1587c95 G/C SPX support
It was presented as a draft in 1993. I don't see any mentions since. it
was not enabled.
2018-12-15 23:22:51 +00:00
christos
57aff58910 more const 2018-12-14 23:42:39 +00:00
maya
60dcd2644e Remove unused code 2018-12-13 09:09:32 +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
joerg
dbb874e7a4 Avoid enum type mismatch. 2014-04-26 22:10:40 +00:00
joerg
e16a720f89 Don't depend on HAVE_GCC being always defined. 2012-08-10 12:20:10 +00:00
matt
fa835e8c8b These directories default to WARNS?=5 2012-03-21 05:37:42 +00:00
matt
f9113d007b Use C89 functions definitions.
Remove use of __P
2012-03-21 05:33:26 +00:00
christos
6a6c8f616b PR/45805: Borodin Oleg: telnet/telnetd with -DAUTHENTICATION -DENCRYPTION
(rfc2941)
- minimal fixes to compile with WARNS=4
- separate kerberos (USE_KERBEROS) from encryption (MKCRYPTO)
2012-01-09 15:25:33 +00:00
christos
b49426a4b0 Avoid buffer overflow, reported by Colin Percival at FreeBSD 2011-12-23 16:48:16 +00:00
mbalmer
8e2a0ad61a Correct typo, while here, unfold lines. 2011-07-24 07:18:17 +00:00
christos
cdf62a44d3 - use defines for lengths
- strlcpy/snprintf
- KNK
2011-07-01 15:09:28 +00:00
joerg
cfdb8ebbda Fix memset usage. XXX should use static allocate and proper sizeof() 2011-07-01 01:15:27 +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
elric
8d159f43a8 We no longer need to -I/usr/include/krb5. 2011-04-24 19:00:56 +00:00
elric
6daa88e0a9 Stop using functions that are deprecated in Heimdal. 2011-04-24 19:00:31 +00:00
christos
46edb91e9f bump shared libraries. 2009-01-11 03:07:47 +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
gmcgarry
686556951e Add test for HAVE_PCC with HAVE_GCC which turn off compiler warning flags. 2008-07-12 12:29:42 +00:00
lukem
66176dfdff Rename MKPRIVATELIB to LIBISPRIVATE, to make it clearer that this is
a variable that is used by in-tree Makefiles to control behaviour.
(MKsomevar variables are generally intended to be controlled by the end-user)
2008-05-03 14:48:30 +00:00
tls
4147a3c54a Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry.  RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros.  Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default.  Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 12:06:17 +00:00
hubertf
55ac93d329 Remove more duplicate #includes, and a few spurious whitespaces at EOL
From Slava Semushin <slava.semushin@gmail.com>
2007-01-17 23:24:22 +00:00
mrg
5609a371c9 make MKCRYPTO=no work again. 2006-06-25 03:02:19 +00:00
mrg
aadd7d4847 sprinkle some -fno-strict-aliasing and -Wno-pointer-sign with GCC4. 2006-05-11 23:16:28 +00:00
christos
39f876d6be Coverity CID 2757: Avoid leaking key_block 2006-03-22 16:32:39 +00:00
christos
e2e1c27191 Remove KRB4 dependent code (Jukka Salmi) 2006-03-20 21:23:47 +00:00
christos
85e611dd01 Goodbye KerberosIV 2006-03-20 04:03:10 +00:00
christos
950274b463 Revert part of previous free'ing because it was really a bug in -lkrb5.
Coverity CID 918: Avoid NULL deref (not strictly necessary).
2006-03-19 22:56:36 +00:00
christos
171dd64c65 Coverity CID 1247: Don't use negative index. 2006-03-19 22:54:00 +00:00
christos
0666075024 Coverity CID 1907: Free keyblock, not just the contents. 2006-03-19 22:34:59 +00:00
christos
23dfb0b17f eliminate unused passpromptlen and copy a default password each time we
don't receive one in SRA_CONTINUE.
2005-10-25 23:36:07 +00:00
christos
64fe9d910c XXX: SRA does not have a protocol feature to pass back a password prompt
which is needed for things like S/KEY. We abuse the SRA_CONTINUE message
passing the password prompt there. That is usually NULL, so SRA
implementations usually ignore it. While I am here, if telnet_gets() fails
[user hit <eof> for example], then we exit.
2005-10-25 22:03:34 +00:00
lukem
0d885c3aa4 Don't perform a check for "secure" tty for root logins when using PAM;
that is what we provide pam_securetty(8) for.

Fix the -DNOPAM build option by allowing it to compile
(even though we don't use this source file when USE_PAM=no).
2005-05-05 23:21:58 +00:00
lukem
f4ee085480 PAM may change the user name during the authentication process;
ensure that we deal with this so that SRA authenticated logins
will pass the changed user name to login(1).
2005-05-05 22:43:56 +00:00
lukem
94b84ac8a2 Fix the check for insecure root logins in rootterm():
- It was originally referring to a bogus version of `line'.
  (problem solved by using 'extern char *line' instead of 'extern char line[]')
- It wasn't stripping the leading "/dev/" off `line' before calling getttynam(3)
2005-05-05 02:20:45 +00:00
christos
262b0ba97f check pwd != NULL 2005-04-19 03:19:46 +00:00
christos
382db3eda9 Use getpwnam_r. From john nemeth. 2005-04-09 22:43:51 +00:00
christos
a6d2304b90 constify, whitespace. 2005-02-19 22:55:35 +00:00
christos
9485d63b3e Fix whitespace. 2005-02-19 22:47:51 +00:00
christos
c8127943d0 Fix pk to use BN_ instead of libmp. 2005-02-19 22:47:10 +00:00
christos
185393efaa PAM support from FreeBSD. 2005-02-19 21:55:52 +00:00
agc
f255b51ddc Another fall-out from the de-__Ping round. 2005-02-06 18:00:30 +00:00
perry
4fcf86857c de-__P (really de-P) 2005-02-06 05:53:07 +00:00
perry
0f3d05ee54 remove unneeded definition of "P" macro 2005-02-06 05:52:25 +00:00
perry
252786f3ee de-__P (really de-P), and fix the broken prototype for printsub 2005-02-06 05:48:23 +00:00
dsl
1793b7dd69 Use (unsigned char) cast to sanitise arguments to ctype functions. 2004-10-28 21:14:52 +00:00
dsl
d349cd6749 Fix a load of international alphabet problems with isxxx() and toupper()
Change isspace(*char_ptr) to isspace(*char_ptr & 0xff) so that the correct
piece of memory is looked at for the bit mask.
gcc optimises out the '& 0xff' (on i386 at least).
Fixes problems found by gcc when the splurious (int) cast is removed
from the #defines in ctype.h
2004-10-27 19:59:24 +00:00
lukem
b817247988 Use MKPRIVATELIB=yes instead of providing an empty libinstall:: target and
setting NOLINT, NOPIC, NOPROFILE (etc)
2004-05-23 02:24:50 +00:00