summaryrefslogtreecommitdiffstats
path: root/openbsd-compat (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Undef a few new macros in sys-queue.h.Darren Tucker2018-07-141-0/+5
| | | | Prevents macro redefinition warnings on OSX.
* upstream: remove legacy key emulation layer; ok djm@markus@openbsd.org2018-07-121-1/+1
| | | | OpenBSD-Commit-ID: 2b1f9619259e222bbd4fe9a8d3a0973eafb9dd8d
* Include stdlib.h for declaration of free.Darren Tucker2018-07-111-0/+1
| | | | Fixes build with -Werror on at least Fedora and probably others.
* Adapt portable to legacy buffer API removalDamien Miller2018-07-104-11/+17
|
* Defer setting bufsiz in getdelim.Darren Tucker2018-07-061-2/+2
| | | | | Do not write to bufsiz until we are sure the malloc has succeeded, in case any callers rely on it (which they shouldn't). ok djm@
* Add implementation of getline.Darren Tucker2018-07-023-0/+118
| | | | | | Add getline for the benefit of platforms that don't have it. Sourced from NetBSD (OpenBSD's implementation is a little too chummy with the internals of FILE).
* sync fmt_scaled.cDamien Miller2018-05-141-2/+5
| | | | | | | revision 1.17 date: 2018/05/14 04:39:04; author: djm; state: Exp; lines: +5 -2; commitid: 53zY8GjViUBnWo8Z; constrain fractional part to [0-9] (less confusing to static analysis); ok ian@
* Use includes.h instead of config.h.Darren Tucker2018-04-292-2/+2
| | | | | | This ensures it picks up the definition of DEF_WEAK, the lack of which can cause compile errors in some cases (eg modern AIX). From michael at felt.demon.nl.
* Fix tunnel forwarding broken in 7.7p1Damien Miller2018-04-131-2/+2
| | | | bz2855, ok dtucker@
* prefer to use getrandom() for PRNG seedingDamien Miller2018-04-131-3/+13
| | | | | Only applies when built --without-openssl. Thanks Jann Horn for reminder.
* Many typo fixes from Karsten WeissDamien Miller2018-04-109-9/+9
| | | | Spotted using https://github.com/lucasdemarchi/codespell
* Disable native strndup and strnlen on AIX.Darren Tucker2018-03-302-2/+2
| | | | | | | On at least some revisions of AIX, strndup returns unterminated strings under some conditions, apparently because strnlen returns incorrect values in those cases. Disable both on AIX and use the replacements from openbsd-compat. Fixes problem with ECDSA keys there, ok djm.
* Include ssh_api.h for struct ssh.Darren Tucker2018-03-262-0/+2
| | | | | | struct ssh is needed by implementations of sys_auth_passwd() that were converted in commit bba02a50. Needed to fix build on AIX, I assume for the other platforms too (although it should be harmless if not needed).
* Remove UNICOS code missed during removal.Darren Tucker2018-03-261-14/+0
| | | | Fixes compile error on AIX.
* modified: auth-sia.cTim Rice2018-03-252-2/+4
| | | | | | | | | modified: openbsd-compat/port-aix.c modified: openbsd-compat/port-uw.c propogate changes to auth-passwd.c in commit 7c856857607112a3dfe6414696bf4c7ab7fb0cb3 to other providers of sys_auth_passwd()
* Check for and work around buggy fflush(NULL).Darren Tucker2018-03-052-0/+20
| | | | | Some really old platforms (eg SunOS4) segfault on fflush(NULL) so check for and work around. With klausz at haus-gisela.de.
* Add strndup for platforms that need it.Darren Tucker2018-03-032-0/+44
| | | | | Some platforms don't have strndup, which includes Solaris 10, NetBSD 3 and FreeBSD 6.
* Flatten and alphabetize object file lists.Darren Tucker2018-03-031-3/+75
| | | | This will make maintenance and changes easier. "no objection" tim@
* Check if HAVE_DECL_BZERO correctly.Darren Tucker2018-02-261-1/+1
|
* typo: missing ;Darren Tucker2018-02-261-1/+1
|
* Hook up flock() compat code.Darren Tucker2018-02-263-4/+17
| | | | | Also a couple of minor changes: fail if we can't lock instead of silently succeeding, and apply a couple of minor style fixes.
* Import flock() compat from NetBSD.Darren Tucker2018-02-261-0/+76
| | | | From NetBSD's src/trunk/tools/compat/flock.c, no OpenSSH changes yet.
* avoid inclusion of deprecated selinux/flask.hDamien Miller2018-02-261-3/+6
| | | | Use string_to_security_class() instead.
* Invert sense of getpgrp test.Darren Tucker2018-02-251-1/+1
| | | | | 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.
* Add no-op getsid implmentation.Darren Tucker2018-02-252-0/+14
|
* bsd-statvfs: include sys/vfs.h, check for f_flags.Darren Tucker2018-02-252-0/+11
|
* Handle calloc(0,x) where different from malloc.Darren Tucker2018-02-251-0/+2
| | | | | | | | 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.
* Add prototype for readv if needed.Darren Tucker2018-02-251-1/+9
|
* Check for raise and supply if needed.Darren Tucker2018-02-252-0/+12
|
* Check for bzero and supply if needed.Darren Tucker2018-02-252-0/+12
| | | | | Since explicit_bzero uses it via an indirect it needs to be a function not just a macro.
* freezero should check for NULL.Darren Tucker2018-02-161-0/+2
|
* Remove remaining now-obsolete cvs $Ids.Darren Tucker2018-02-152-4/+0
|
* Remove UNICOS support.Darren Tucker2018-02-155-888/+1
| | | | | | | 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.
* Move signal compat code into bsd-signal.{c,h}Darren Tucker2018-02-117-56/+103
|
* Include string.h for explicit_bzero.Darren Tucker2017-11-241-0/+2
|
* Include includes.h for HAVE_GETPAGESIZE.Darren Tucker2017-10-311-0/+2
| | | | | | | | | The configure script checks for getpagesize() and sets HAVE_GETPAGESIZE in config.h, but bsd-getpagesize.c forgot to include includes.h (which indirectly includes config.h) so the checks always fails, causing linker issues when linking statically on systems with getpagesize(). Patch from Peter Korsgaard <peter at korsgaard.com>
* fix rdomain compilation errorsDamien Miller2017-10-262-2/+2
|
* basic valid_rdomain() implementation for LinuxDamien Miller2017-10-251-1/+16
|
* implement get/set_rdomain() for LinuxDamien Miller2017-10-252-4/+43
| | | | Not enabled, pending implementation of valid_rdomain() and autoconf glue
* stubs for rdomain replacement functionsDamien Miller2017-10-252-0/+43
|
* rename port-tun.[ch] => port-net.[ch]Damien Miller2017-10-254-2/+2
| | | | Ahead of adding rdomain support
* upstream commitdjm@openbsd.org2017-10-232-3/+15
| | | | | | | | | | | | | | | Expose devices allocated for tun/tap forwarding. At the client, the device may be obtained from a new %T expansion for LocalCommand. At the server, the allocated devices will be listed in a SSH_TUNNEL variable exposed to the environment of any user sessions started after the tunnel forwarding was established. ok markus Upstream-ID: e61e53f8ae80566e9ddc0d67a5df5bdf2f3c9f9e
* Check for and handle calloc(p, 0) = NULL.Darren Tucker2017-09-262-1/+56
| | | | | | | | 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@
* Add minimal strsignal for platforms without it.Darren Tucker2017-09-252-0/+14
|
* add freezero(3) replacementDamien Miller2017-09-193-1/+34
| | | | ok dtucker@
* adapt portable to channels API changesDamien Miller2017-09-122-9/+8
|
* Add missing includes for bsd-err.c.Darren Tucker2017-08-271-0/+6
| | | | Patch from cjwatson at debian.org via bz#2767.
* fix problems in tunnel forwarding portability codeDamien Miller2017-07-281-42/+41
| | | | | | | | This fixes a few problems in the tun forwarding code, mostly to do with host/network byte order confusion. Based on a report and patch by stepe AT centaurus.uberspace.de; bz#2735; ok dtucker@
* make explicit_bzero/memset safe for sz=0Damien Miller2017-07-141-0/+4
|
* Wrap stdint.h include in #ifdef.Darren Tucker2017-06-091-0/+2
|