summaryrefslogtreecommitdiff
path: root/openbsd-compat
Commit message (Collapse)AuthorAgeFilesLines
* Initial len for the fmt=NULL case.Darren Tucker2018-09-071-1/+1
| | | | | Patch from jjelen at redhat via bz#2687. (OpenSSH never calls setproctitle with a null format so len is always initialized).
* Include stdlib.h.Darren Tucker2018-09-071-0/+1
| | | | Patch from jjelen at redhat via bz#2687.
* modified: openbsd-compat/port-uw.cTim Rice2018-08-211-1/+0
| | | | remove obsolete and un-needed include
* cygwin: add missing stdarg.h includeCorinna Vinschen2018-08-131-0/+1
| | | | | | | Further header file standarization in Cygwin uncovered a lazy indirect include in bsd-cygwin_util.c Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
* Some AIX fixes; report from Michael FeltDamien Miller2018-08-111-2/+3
|
* correct snprintf truncation check in closefrom()Damien Miller2018-07-271-1/+1
| | | | | | | Truncation cannot happen unless the system has set PATH_MAX to some nonsensically low value. bz#2862, patch from Daniel Le
* 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-271-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-261-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-262-0/+14
|
* bsd-statvfs: include sys/vfs.h, check for f_flags.Darren Tucker2018-02-262-0/+11
|
* Handle calloc(0,x) where different from malloc.Darren Tucker2018-02-261-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-261-1/+9
|
* Check for raise and supply if needed.Darren Tucker2018-02-262-0/+12
|
* Check for bzero and supply if needed.Darren Tucker2018-02-262-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-272-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-272-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
|