Commit Graph

691 Commits

Author SHA1 Message Date
Darren Tucker 146c3bd28c Check dlopen has RTLD_NOW before enabling pkcs11. 2018-02-27 15:28:31 +11:00
Darren Tucker 1323f120d0 Check for attributes on prototype args.
Some compilers (gcc 2.9.53, 3.0 and probably others, see gcc bug #3481)
do not accept __attribute__ on function pointer prototype args.  Check for
this and hide them if they're not accepted.
2018-02-27 08:51:56 +11:00
Darren Tucker cd3ab57f9b Hook up flock() compat code.
Also a couple of minor changes: fail if we can't lock instead of
silently succeeding, and apply a couple of minor style fixes.
2018-02-26 14:37:06 +11:00
Damien Miller f885474137 XMSS-related files get includes.h 2018-02-26 12:18:14 +11:00
Darren Tucker c7b5a47e3b Invert sense of getpgrp test.
AC_FUNC_GETPGRP tests if getpgrp(0) works, which it does if it's not
declared.  Instead, test if the zero-arg version we want to use works.
2018-02-26 00:14:42 +11:00
Darren Tucker b39593a6de Add no-op getsid implmentation. 2018-02-26 00:09:04 +11:00
Darren Tucker 11057564eb bsd-statvfs: include sys/vfs.h, check for f_flags. 2018-02-26 00:09:04 +11:00
Darren Tucker e9dede06e5 Handle calloc(0,x) where different from malloc.
Configure assumes that if malloc(0) returns null then calloc(0,n)
also does.  On some old platforms (SunOS4) malloc behaves as expected
(as determined by AC_FUNC_MALLOC) but calloc doesn't.  Test for this
at configure time and activate the replacement function if found, plus
handle this case in rpl_calloc.
2018-02-26 00:09:04 +11:00
Darren Tucker 2eb4041493 Add prototype for readv if needed. 2018-02-26 00:09:04 +11:00
Darren Tucker 6c8c9a615b Check for raise and supply if needed. 2018-02-26 00:09:04 +11:00
Darren Tucker a9004425a0 Check for bzero and supply if needed.
Since explicit_bzero uses it via an indirect it needs to be a function
not just a macro.
2018-02-26 00:09:04 +11:00
Darren Tucker b59162da99 Check for ifaddrs.h for BindInterface.
BindInterface required getifaddr and friends so disable if not available
(eg Solaris 10).  We should be able to add support for some systems with
a bit more work but this gets the building again.
2018-02-23 15:20:42 +11:00
Darren Tucker ce066f688d Add headers for sys/audit.h.
On some older platforms (at least sunos4, probably others) sys/audit.h
requires some other headers.  Patch from klausz at haus-gisela.de.
2018-02-22 21:00:06 +11:00
Darren Tucker f833842858 Remove now-unused check for getrusage.
getrusage was used in ssh-rand-helper but that's now long gone.
Patch from klauszh at haus-gisela.de.
2018-02-18 15:53:15 +11:00
Darren Tucker 265d88d4e6 Remove remaining now-obsolete cvs $Ids. 2018-02-15 20:06:19 +11:00
Darren Tucker ddc0f38148 Remove UNICOS support.
The code required to support it is quite invasive to the mainline
code that is synced with upstream and is an ongoing maintenance burden.
Both the hardware and software are literal museum pieces these days and
we could not find anyone still running OpenSSH on one.
2018-02-15 20:04:02 +11:00
Darren Tucker 174bed6869 Retpoline linker flag only needed for linking. 2018-02-13 18:12:47 +11:00
Darren Tucker 075e258c2c Default PidFile is sshd.pid not ssh.pid. 2018-02-13 17:36:43 +11:00
Darren Tucker 24d2a33bd3 Include headers for linux/if.h.
Prevents configure-time "present but cannot be compiled" warning.
2018-02-11 21:17:33 +11:00
Darren Tucker bc02181c24 Fix test for -z,retpolineplt linker flag. 2018-02-11 21:17:21 +11:00
Darren Tucker 3377df00ea Add checks for Spectre v2 mitigation (retpoline)
This adds checks for gcc and clang flags for mitigations for Spectre
variant 2, ie "retpoline".  It'll automatically enabled if the compiler
supports it as part of toolchain hardening flag.  ok djm@
2018-02-11 09:32:37 +11:00
Darren Tucker 3c000d57d4 Remove obsolete "Smartcard support" message
The configure checks that populated $SCARD_MSG were removed in commits
7ea845e4 and d8f60022 when the smartcard support was replaced with
PKCS#11.
2018-02-07 09:26:45 +11:00
Darren Tucker 79c0e1d299 Add autogenerated dependency info to Makefile.
Adds a .depend file containing dependency information generated by
makedepend, which is appended to the generated Makefile by configure.

You can regen the file with "make -f Makefile.in depend" if necessary,
but we'll be looking at some way to automatically keep this up to date.

"no objection" djm@
2017-12-11 14:38:33 +11:00
Darren Tucker f001de8fbf Fix pasto in ldns handling.
When ldns-config is not found, configure would check the wrong variable.
ok djm@
2017-12-11 13:42:51 +11:00
Darren Tucker bb82e61a40 Remove now-used check for perl. 2017-12-09 08:06:00 +11:00
Darren Tucker 6c8a246437 Replace mkinstalldirs with mkdir -p.
Check for MIKDIR_P and use it instead of mkinstalldirs.  Should fix "mkdir:
cannot create directory:... File exists" during "make install".
Patch from eb at emlix.com.
2017-12-01 17:13:34 +11:00
Darren Tucker 81c9ccdbf6 Check for linux/if.h when enabling rdomain.
musl libc doesn't seem to have linux/if.h, so check for its presence
before enabling rdomain support on Linux.
2017-11-03 14:52:51 +11:00
Darren Tucker fa1b834cce Add headers for sys/sysctl.h and net/route.h
On at least older OpenBSDs, sys/sysctl.h and net/route.h require
sys/types and, in the case of sys/sysctl.h, sys/param.h for MAXLOGNAME.
2017-11-03 14:09:45 +11:00
Damien Miller 6bd5b569fd autoconf glue to enable Linux VRF 2017-10-25 14:15:42 +11:00
Damien Miller 3235473bc8 check for net/route.h and sys/sysctl.h 2017-10-25 13:11:37 +11:00
Damien Miller bba69c246f don't fatal ./configure for LibreSSL 2017-09-28 16:06:21 -07:00
Damien Miller 04dc070e8b abort in configure when only openssl-1.1.x found
We don't support openssl-1.1.x yet (see multiple threads on the
openssh-unix-dev@ mailing list for the reason), but previously
./configure would accept it and the compilation would subsequently
fail. This makes ./configure display an explicit error message and
abort.

ok dtucker@
2017-09-28 14:54:34 -07:00
Darren Tucker 74c1c3660a Check for and handle calloc(p, 0) = NULL.
On some platforms (AIX, maybe others) allocating zero bytes of memory
via the various *alloc functions returns NULL, which is permitted
by the standards.  Autoconf has some macros for detecting this (with
the exception of calloc for some reason) so use these and if necessary
activate shims for them.  ok djm@
2017-09-27 07:44:41 +10:00
Darren Tucker 44fc334c7a Add minimal strsignal for platforms without it. 2017-09-25 09:48:10 +10:00
Damien Miller b79569190b add freezero(3) replacement
ok dtucker@
2017-09-19 14:16:45 +10:00
Damien Miller 161af8f5ec move FORTIFY_SOURCE into hardening options group
It's still on by default, but now it's possible to turn it off using
--without-hardening. This is useful since it's known to cause problems
with some -fsanitize options. ok dtucker@
2017-09-19 10:22:33 +10:00
Damien Miller de35c38289 Give configure ability to set CFLAGS/LDFLAGS later
Some CFLAGS/LDFLAGS may disrupt the configure script's operation,
in particular santization and fuzzer options that break assumptions
about memory and file descriptor dispositions.

This adds two flags to configure --with-cflags-after and
--with-ldflags-after that allow specifying additional compiler and
linker options that are added to the resultant Makefiles but not
used in the configure run itself.

E.g.

env CC=clang-3.9 ./configure \
  --with-cflags-after=-fsantize=address \
  --with-ldflags-after="-g -fsanitize=address"
2017-09-08 12:38:31 +10:00
Darren Tucker dd9d9b3381 Switch Capsicum header to sys/capsicum.h.
FreeBSD's <sys/capability.h> was renamed to <sys/capsicum.h> in 2014 to
avoid future conflicts with POSIX capabilities (the last release that
didn't have it was 9.3) so switch to that.  Patch from des at des.no.
2017-08-28 16:48:27 +10:00
Tim Rice 8433d51e06 modified: configure.ac
UnixWare needs BROKEN_TCGETATTR_ICANON like Solaris
Analysis by Robbie Zhang
2017-07-11 18:47:56 -07:00
Damien Miller bcd1485075 portability for sftp globbed ls sort by mtime
Include replacement timespeccmp() for systems that lack it.
Support time_t struct stat->st_mtime in addition to
timespec stat->st_mtim, as well as unsorted fallback.
2017-06-10 23:41:25 +10:00
Damien Miller 151c6e433a add recallocarray replacement and dependency
recallocarray() needs getpagesize() so add a tiny replacement for that.
2017-06-01 15:25:13 +10:00
Mike Frysinger dcc714c65c configure: actually set cache vars when cross-compiling
The cross-compiling fallback message says it's assuming the test
passed, but it didn't actually set the cache var which causes
later tests to fail.
2017-05-25 14:34:52 +10:00
Damien Miller f7849e6c83 remove configure --with-ssh1 2017-05-01 10:05:07 +10:00
Darren Tucker d9048861be Check for and use gcc's -pipe.
Speeds up configure and build by a couple of percent.  ok djm@
2017-03-31 11:04:43 +11:00
Darren Tucker 5346f271fc Remove check for OpenSSL < 0.9.8g.
We no longer support OpenSSL < 1.0.1 so remove check for unreliable ECC
in OpenSSL < 0.9.8g.
2017-03-29 10:23:58 +11:00
Darren Tucker 7af27bf538 Enable ldns when using ldns-config.
Actually enable ldns when attempting to use ldns-config.  bz#2697, patch
from fredrik at fornwall.net.
2017-03-24 09:44:56 +11:00
Darren Tucker d38f05dbdd Add llabs() implementation. 2017-03-20 13:39:27 +11:00
Damien Miller 2429cf78dd require OpenSSL >=1.0.1 2017-03-14 18:01:52 +11:00
Damien Miller 523db8540b prefer to use ldns-config to find libldns
Should fix bz#2603 - "Build with ldns and without kerberos support
fails if ldns compiled with kerberos support" by including correct
cflags/libs

ok dtucker@
2017-02-03 16:03:05 +11:00
Darren Tucker c61d5ec3c1 Remove _XOPEN_SOURCE from wide char detection.
Having _XOPEN_SOURCE unconditionally causes problems on some platforms
and configurations, notably Solaris 64-bit binaries.  It was there for
the benefit of Linux put the required bits in the *-*linux* section.

Patch from yvoinov at gmail.com.
2017-02-03 14:10:34 +11:00