Commit Graph

204 Commits

Author SHA1 Message Date
Darren Tucker 134a74f4e0 Add SSIZE_MAX when we define ssize_t. 2019-11-15 18:55:13 +11:00
Darren Tucker 2912596aec Define UINT32_MAX if needed. 2019-10-28 16:27:53 +11:00
Darren Tucker 0c7f8d2326 Make DEF_WEAK more likely to be correct.
Completely nop-ing out DEF_WEAK leaves an empty statemment which some
compilers don't like.  Replace with a no-op function template.  ok djm@
2019-10-08 14:48:32 +11:00
Darren Tucker c1e0a32fa8 Add more ToS bits, currently only used by netcat. 2019-09-24 21:17:20 +10:00
Damien Miller 4efe1adf05 remove realpath() compat replacement
We shipped a BSD implementation of realpath() because sftp-server
depended on its behaviour.

OpenBSD is now moving to a more strictly POSIX-compliant realpath(2),
so sftp-server now unconditionally requires its own BSD-style realpath
implementation. As such, there is no need to carry another independant
implementation in openbsd-compat.

ok dtucker@
2019-07-08 13:38:39 +10:00
Damien Miller 87f08be054 Remove support for S/Key
Most people will 1) be using modern multi-factor authentication methods
like TOTP/OATH etc and 2) be getting support for multi-factor
authentication via PAM or BSD Auth.
2018-07-31 12:59:30 +10: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
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
Darren Tucker d29ba6f450 Define INT32_MAX and INT64_MAX if needed. 2017-05-01 13:53:55 +10:00
Darren Tucker 032147b695 Move DEF_WEAK into defines.h.
As well pull in more recent changes from OpenBSD these will start to
arrive so put it where the definition is shared.
2016-10-15 05:51:12 +11:00
Darren Tucker 1e8013a17f Remove obsolete CVS $Id from source files.
Since -portable switched to git the CVS $Id tags are no longer being
updated and are becoming increasingly misleading.  Remove them.
2016-08-17 14:08:42 +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
Darren Tucker 8db134e7f4 Prevent name collisions with system glob (bz#2463)
Move glob.h from includes.h to the only caller (sftp) and override the
names for the symbols.  This prevents name collisions with the system glob
in the case where something other than ssh uses it (eg kerberos).  With
jjelen at redhat.com, ok djm@
2015-10-29 10:48:23 +11:00
Damien Miller d1bc844322 Revert "define __unused to nothing if not already defined"
This reverts commit 1598419e38.

Some system headers have objects named __unused
2015-03-04 06:31:45 +11:00
Damien Miller 1598419e38 define __unused to nothing if not already defined
fixes builds on BSD/OS
2015-03-04 04:59:13 +11:00
Darren Tucker 1734e276d9 Move definition of _NSIG.
_NSIG is only unsed in one file, so move it there prevent redefinition
warnings reported by Kevin Brott.
2015-02-25 13:40:45 +11:00
Damien Miller 38806bda6d include netdb.h to look for MAXHOSTNAMELEN; ok tim 2015-02-24 16:50:36 -08:00
Tim Rice 676c38d7cb portability fix: if we can't dind a better define for HOST_NAME_MAX, use 255 2015-02-23 21:51:33 -08:00
Darren Tucker 28ba006c1a More correct checking of HAVE_DECL_AI_NUMERICSERV. 2015-02-21 15:41:07 +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 a2c95c1bf3 OSX lacks HOST_NAME_MAX, has _POSIX_HOST_NAME_MAX 2015-01-27 23:06:59 +11:00
Damien Miller 23f269562b - (djm) [defines.h sshbuf.c] Move __predict_true|false to defines.h and
conditionalise to avoid duplicate definition.
2014-09-03 05:33:25 +10:00
Darren Tucker af665bb7b0 - (dtucker) [defines.h] Fix undef of _PATH_MAILDIR. From rak at debian via
OpenSMTPD and chl@
2014-06-16 22:50:55 +10:00
Darren Tucker cf5392c2db - (dtucker) [defines.h] Add va_copy if we don't already have it, taken from
openbsd-compat/bsd-asprintf.c.
2014-06-12 05:22:49 +10:00
Damien Miller 18912775cb - (djm) [commit configure.ac defines.h sshpty.c] don't attempt to use
vhangup on Linux. It doens't work for non-root users, and for them
   it just messes up the tty settings.
2014-05-21 17:06:46 +10:00
Damien Miller 686c7d9ee6 - djm@cvs.openbsd.org 2014/05/02 03:27:54
[chacha.h cipher-chachapoly.h digest.h hmac.h kex.h kexc25519.c]
     [misc.h poly1305.h ssh-pkcs11.c defines.h]
     revert __bounded change; it causes way more problems for portable than
     it solves; pointed out by dtucker@
2014-05-15 14:37:03 +10:00
Darren Tucker f028460d0b - (dtucker) [defines.h] Define __GNUC_PREREQ__ macro if we don't already
have it.  Only attempt to use __attribute__(__bounded__) for gcc.
2014-05-01 02:24:35 +10:00
Damien Miller 4f40209aa4 - djm@cvs.openbsd.org 2014/03/26 04:55:35
[chacha.h cipher-chachapoly.h digest.h hmac.h kex.h kexc25519.c
     [misc.h poly1305.h ssh-pkcs11.c]
     use __bounded(...) attribute recently added to sys/cdefs.h instead of
     longform __attribute__(__bounded(...));

     for brevity and a warning free compilation with llvm/clang
2014-04-20 13:21:22 +10:00
Darren Tucker 355f861022 - (dtucker) [defines.h] Move our definitions of uintXX_t types down to after
they're defined if we have to define them ourselves.  Fixes builds on old
   AIX.
2014-01-18 00:12:38 +11:00
Darren Tucker acad351a5b - (dtucker) [defines.h] Add typedefs for uintXX_t types for platforms that
don't have them.
2014-01-17 14:20:05 +11:00
Damien Miller df8b030b15 - (djm) [configure.ac defines.h] Skip arc4random_stir() calls on platforms
that lack it but have arc4random_uniform()
2013-11-07 13:28:16 +11:00
Darren Tucker 007e3b357e - (dtucker) [configure.ac defines.h] Add typedefs for intmax_t and uintmax_t
for platforms that don't have them.
2013-11-03 18:43:55 +11:00
Darren Tucker c7aad0058c - (dtucker) [configure.ac defines.h] Test for fd_mask, howmany and NFDBITS
rather than trying to enumerate the plaforms that don't have them.
   Based on a patch from Nathan Osman, with help from tim@.
2013-06-02 07:18:47 +10:00
Darren Tucker 9243ef086f - (dtucker) [defines.h] Remove SIZEOF_CHAR bits since the test for it is
was removed in configure.ac rev 1.481 as it was redundant.
2013-03-07 20:06:13 +11:00
Tim Rice 96ce9a1e45 20121205
- (tim) [defines.h] Some platforms are missing ULLONG_MAX. Feedback djm@.
2012-12-04 07:50:03 -08:00
Tim Rice f79b5d38a1 - (tim) [defines.h] move chunk introduced in 1.125 before MAXPATHLEN so
it actually works.
2012-02-14 20:13:05 -08:00
Damien Miller 5ffe1c4b43 - (djm) [configure.ac defines.h] No need to detect sizeof(char); patch
from des AT des.no
2011-09-29 11:11:51 +10:00
Tim Rice 90f42b0705 - (tim) [configure.ac defines.h] Run test program to detect system mail
directory. Add --with-maildir option to override. Fixed OpenServer 6
   getting it wrong. Fixed many systems having MAIL=/var/mail//username
   ok dtucker
2011-06-02 18:17:49 -07:00
Tim Rice 9abb697d4f - (tim) [defines.h] Deal with platforms that do not have S_IFSOCK ok djm@ 2011-05-04 23:06:59 -07:00
Damien Miller 68790fedef - (djm) [defines.h] Move up include of netinet/ip.h for IPTOS
definitions.
2011-05-05 11:19:13 +10:00
Darren Tucker ea52a82969 - (dtucker) [LICENCE Makefile.in audit-bsm.c audit-linux.c audit.c audit.h
configure.ac defines.h loginrec.c]  Bug #1402: add linux audit subsystem
   support, based on patches from Tomas Mraz and jchadima at redhat.
2011-01-17 21:15:27 +11:00
Damien Miller 73de86ac5a - (djm) [defines.h] Add IP DSCP defines 2010-11-24 10:50:04 +11:00
Darren Tucker 54b1f3121d - (dtucker) [defines.h] Use SIZE_T_MAX for SIZE_MAX for platforms that have a
native one.
2010-10-25 16:54:28 +11:00
Darren Tucker 7bc236de21 - (dtucker) [defines.h] Add SIZE_MAX for the benefit of platforms that don't
have it.
2010-10-24 11:58:43 +11:00
Darren Tucker 261d93a5cf - (dtucker) [configure.ac defines.h loginrec.c logintest.c] Bug #1732: enable
utmpx support on FreeBSD where possible.  Patch from Ed Schouten, ok djm@
2010-04-09 18:13:27 +10:00
Tim Rice d4a7fcbc46 - (tim) [defines.h] openbsd-compat/readpassphrase.c now needs _NSIG.
feedback and ok dtucker@
2010-01-13 15:44:34 -08:00
Darren Tucker 269275c90c - (dtucker) [defines.h] Remove now-undeeded PRIu64 define. 2010-01-09 22:33:37 +11:00
Darren Tucker 709d0ce672 - (dtucker) [defines.h] define PRIu64 for platforms that don't have it. 2010-01-09 09:25:54 +11:00
Darren Tucker 86e30a0166 - (dtucker) [clientloop.c configure.ac defines.h] Make the client's IO buffer
size a compile-time option and set it to 64k on Cygwin, since Corinna
   reports that it makes a significant difference to performance.  ok djm@
2009-08-28 11:21:06 +10:00
Darren Tucker 3278062bf3 - (dtucker) [configure.ac defines.h] Bug #1607: handle the case where fsid_t
is a struct with a __val member.  Fixes build on, eg, Redhat 6.2.
2009-06-16 16:11:02 +10:00