Commit Graph

633 Commits

Author SHA1 Message Date
Damien Miller
857568d2ac removing UseLogin bits from configure.ac 2016-08-23 14:32:37 +10:00
Darren Tucker
33ba55d9e3 Only check for prctl once. 2016-08-17 16:26:04 +10:00
Damien Miller
a1cc637e7e add a --with-login-program configure argument
Saves messing around with LOGIN_PROGRAM env var, which come
packaging environments make hard to do during configure phase.
2016-08-16 14:47:34 +10:00
Damien Miller
8bd81e1596 add --with-pam-service to specify PAM service name
Saves messing around with CFLAGS to do it.
2016-08-16 13:37:26 +10:00
Darren Tucker
5faa52d295 Use tabs consistently inside "case $host". 2016-08-02 15:22:40 +10:00
Darren Tucker
20e5e8ba9c Explicitly test for broken strnvis.
NetBSD added an strnvis and unfortunately made it incompatible with the
existing one in OpenBSD and Linux's libbsd (the former having existed
for over ten years). Despite this incompatibility being reported during
development (see http://gnats.netbsd.org/44977) they still shipped it.
Even more unfortunately FreeBSD and later MacOS picked up this incompatible
implementation.  Try to detect this mess, and assume the only safe option
if we're cross compiling.

OpenBSD 2.9 (2001): strnvis(char *dst, const char *src, size_t dlen, int flag);
NetBSD 6.0 (2012):  strnvis(char *dst, size_t dlen, const char *src, int flag);

ok djm@
2016-08-02 12:16:34 +10:00
Tim Rice
cf3e0be7f5 modified: configure.ac opensshd.init.in
Skip generating missing RSA1 key on startup unless ssh1 support is enabled.
Spotted by Jean-Pierre Radley
2016-08-01 14:31:52 -07:00
Damien Miller
99522ba7ec define _OPENBSD_SOURCE for reallocarray on NetBSD
Report by and debugged with Hisashi T Fujinaka, dtucker nailed
the problem (lack of prototype causing return type confusion).
2016-07-28 08:54:27 +10:00
Darren Tucker
353766e088 Move Cygwin IPPORT_RESERVED overrride to defines.h
Patch from vinschen at redhat.com.
2016-07-23 16:14:42 +10:00
Damien Miller
5fbe93fc6f add a --disable-pkcs11 knob 2016-07-15 14:28:59 +10:00
Damien Miller
679ce88ec2 fix newline escaping for unsupported_algorithms
The hmac-ripemd160 was incorrect and could lead to broken
Makefiles on systems that lacked support for it, but I made
all the others consistent too.
2016-07-15 14:28:59 +10:00
Darren Tucker
7df91b01fc Check for VIS_ALL.
If we don't have it, set BROKEN_STRNVIS to activate the compat replacement.
2016-07-14 12:26:54 +10:00
Darren Tucker
a233358417 Add compat code for missing wcwidth.
If we don't have wcwidth force fallback implementations of nl_langinfo
and mbtowc.  Based on advice from Ingo Schwarze.
2016-07-14 10:59:09 +10:00
Darren Tucker
6310ef27a2 Move err.h replacements into compat lib.
Move implementations of err.h replacement functions into their own file
in the libopenbsd-compat so we can use them in kexfuzz.c too.  ok djm@
2016-07-13 14:42:35 +10:00
Darren Tucker
f3f2cc8386 Check for wchar.h and langinfo.h
Wrap includes in the appropriate #ifdefs.
2016-07-11 17:26:49 +10:00
Damien Miller
b9c50614eb whitelist more architectures for seccomp-bpf
bz#2590 - testing and patch from Jakub Jelen
2016-07-08 13:59:13 +10:00
Darren Tucker
a86ec4d073 Use Solaris setpflags(__PROC_PROTECT, ...).
Where possible, use Solaris setpflags to disable process tracing on
ssh-agent and sftp-server.  bz#2584, based on a patch from huieying.lee
at oracle.com, ok djm.
2016-06-14 10:48:27 +10:00
Tim Rice
e1d93705f8 modified: configure.ac
whitspace clean up. No code changes.
2016-05-31 11:13:22 -07:00
Darren Tucker
5f41f030e2 Remove NO_IPPORT_RESERVED_CONCEPT
Replace by defining IPPORT_RESERVED to zero on Cygwin, which should have
the same effect without causing problems syncing patches with OpenBSD.
Resync the two affected functions with OpenBSD.  ok djm, sanity checked
by Corinna.
2016-04-08 21:21:27 +10:00
Darren Tucker
b3413534aa Tidy up openssl header test. 2016-04-04 11:09:21 +10:00
Darren Tucker
815bcac0b9 Fix configure-time warnings for openssl test. 2016-04-04 11:07:59 +10:00
Damien Miller
39f303b1f3 fix sandbox on OSX Lion
sshd was failing with:

ssh_sandbox_child: sandbox_init: dlopen(/usr/lib/libsandbox.1.dylib, 261):cw
  image not found [preauth]

caused by chroot before sandboxing. Avoid by explicitly linking libsandbox
to sshd. Spotted by Darren.
2016-02-23 12:58:53 +11:00
Darren Tucker
907091acb1 Make Solaris privs code build on older systems.
Not all systems with Solaris privs have priv_basicset so factor that
out and provide backward compatibility code.  Similarly, not all have
PRIV_NET_ACCESS so wrap that in #ifdef.  Based on code from
alex at cooperi.net and djm@ with help from carson at taltos.org and
wieland at purdue.edu.
2016-02-19 09:05:39 +11:00
Darren Tucker
2fee909c3c Look for gethostbyname in libresolv and libnsl.
Should fix build problem on Solaris 2.6 reported by Tom G. Christensen.
2016-02-17 09:48:15 +11:00
Damien Miller
4626cbaf78 Support Illumos/Solaris fine-grained privileges
Includes a pre-auth privsep sandbox and several pledge()
emulations. bz#2511, patch by Alex Wilson.

ok dtucker@
2016-01-08 14:29:12 +11:00
Darren Tucker
b5fa0cd735 Allow --without-ssl-engine with --without-openssl
Patch from Mike Frysinger via github.
2015-12-15 15:10:32 +11:00
Darren Tucker
c1d7e546f6 Include openssl crypto.h for SSLeay.
Patch from doughdemon via github.
2015-12-15 14:27:09 +11:00
Darren Tucker
3ddd15e1b6 Add a null implementation of pledge.
Fixes builds on almost everything.
2015-11-30 07:23:53 +11:00
Darren Tucker
1560596f44 Fix compiler warnings in the openssl header check.
Noted by Austin English.
2015-11-10 11:14:47 +11:00
Damien Miller
fafe1d84a2 s/SANDBOX_TAME/SANDBOX_PLEDGE/g 2015-10-14 09:22:15 -07:00
deraadt@openbsd.org
2539dce2a0 upstream commit
Change all tame callers to namechange to pledge(2).

Upstream-ID: 17e654fc27ceaf523c60f4ffd9ec7ae4e7efc7f2
2015-10-14 03:22:08 +11:00
Damien Miller
9846a2f406 hook tame(2) sandbox up to build
OpenBSD only for now
2015-10-08 04:30:48 +11:00
Darren Tucker
366bada1e9 Correct default value for --with-ssh1.
bz#2457, from konto-mindrot.org at walimnieto.com.
2015-09-11 13:33:23 +10:00
Darren Tucker
7ad8b287c8 Force resolution of _res for correct detection.
bz#2259, from sconeu at yahoo.com.
2015-09-11 13:11:02 +10:00
Damien Miller
f498a98cf8 don't check for yp_match; ok tim@ 2015-09-03 09:11:22 +10:00
Darren Tucker
d3e2aee414 Check if realpath works on nonexistent files.
On some platforms the native realpath doesn't work with non-existent
files (this is actually specified in some versions of POSIX), however
the sftp spec says its realpath with "canonicalize any given path name".
On those platforms, use realpath from the compat library.

In addition, when compiling with -DFORTIFY_SOURCE, glibc redefines
the realpath symbol to the checked version, so redefine ours to
something else so we pick up the compat version we want.

bz#2428, ok djm@
2015-07-17 12:58:02 +10:00
djm@openbsd.org
564d63e1b4 upstream commit
Compile-time disable SSH v.1 again

Upstream-ID: 1d4b513a3a06232f02650b73bad25100d1b800af
2015-07-15 15:24:40 +10:00
Damien Miller
37035c07d4 s/--with-ssh1/--without-ssh1/ 2015-07-01 10:49:37 +10:00
Damien Miller
5c15e22c69 fix syntax error 2015-06-18 15:07:56 +10:00
Damien Miller
99f33d7304 aarch64 support for seccomp-bpf sandbox
Also resort and tidy syscall list. Based on patches by Jakub Jelen
bz#2361; ok dtucker@
2015-06-17 10:50:51 +10:00
Tim Rice
6397eedf95 Remove unneeded backslashes. Patch from Ángel González 2015-06-03 21:41:11 -07:00
Damien Miller
0c2a81dfc2 re-enable SSH protocol 1 at compile time 2015-05-29 17:08:28 +10:00
Darren Tucker
408f4c2ad4 Look for '${host}-ar' before 'ar'.
This changes configure.ac to look for '${host}-ar' as set by
AC_CANONICAL_HOST before looking for the unprefixed 'ar'.
Useful when cross-compiling when all your binutils are prefixed.

Patch from moben at exherbo org via astrand at lysator liu se and
bz#2352.
2015-04-17 09:39:58 +10:00
djm@openbsd.org
2aa9da1a3b upstream commit
Compile-time disable SSH protocol 1. You can turn it
 back on using the Makefile.inc knob if you need it to talk to ancient
 devices.
2015-03-27 12:00:37 +11:00
Damien Miller
00797e86b2 check for crypt and DES_crypt in openssl block
fixes builds on systems that use DES_crypt; based on patch
from Roumen Petrov
2015-03-04 05:02:45 +11:00
Darren Tucker
e50e8c97a9 Add null declaration of AI_NUMERICINFO.
Some platforms (older FreeBSD and DragonFly versions) do have
getaddrinfo() but do not have AI_NUMERICINFO. so define it to zero
in those cases.
2015-02-21 15:10:33 +11:00
Damien Miller
72ef7c148c support --without-openssl at configure time
Disables and removes dependency on OpenSSL. Many features don't
work and the set of crypto options is greatly restricted. This
will only work on system with native arc4random or /dev/urandom.

Considered highly experimental for now.
2015-01-15 02:28:36 +11:00
Damien Miller
76c0480a85 add --without-ssh1 option to configure
Allows disabling support for SSH protocol 1.
2015-01-13 19:38:18 +11:00
Darren Tucker
642652d280 Add reallocarray to compat library 2014-12-10 01:32:23 +11:00
Damien Miller
7d0ba53366 include version number in OpenSSL-too-old error 2014-10-30 10:45:41 +11:00