summaryrefslogtreecommitdiff
path: root/openbsd-compat
AgeCommit message (Collapse)Author
2020-04-06fix inverted test for LibreSSL versionDamien Miller
2020-04-03prefer libcrypto chacha20-poly1305 where possibleDamien Miller
2020-03-13sync fnmatch.c with upstream to fix another typoDamien Miller
2020-03-13another spelling error in commentDamien Miller
2020-03-13spelling mistakesDamien Miller
from https://fossies.org/linux/misc/openssh-8.2p1.tar.gz/codespell.html
2020-02-17Constify aix_krb5_get_principal_name.Darren Tucker
Prevents warning about discarding type qualifiers on AIX.
2020-02-17Check if TILDE is already defined and undef.Darren Tucker
Prevents redefinition warning on AIX.
2020-02-17Prevent unused variable warning.Darren Tucker
2020-02-17Check if getpeereid is actually declared.Darren Tucker
Check in sys/socket.h (AIX) and unistd.h (FreeBSD, DragonFLy and OS X). Prevents undeclared function warning on at least some versions of AIX.
2020-02-06Fix sha2 MAKE_CLONE no-op definitionMichael Forney
The point of the dummy declaration is so that MAKE_CLONE(...) can have a trailing semicolon without introducing an empty declaration. So, the macro replacement text should *not* have a trailing semicolon, just like DEF_WEAK.
2020-01-26Include signal.h to prevent redefintion of _NSIG.Darren Tucker
2020-01-25include tunnel device path in error messageDamien Miller
2020-01-23Fix a couple of mysig_t leftovers.Darren Tucker
2020-01-23Remove mysignal wrapper.Darren Tucker
We switched the main code to use sigaction(), so the wrapper is no longer used.
2020-01-23upstream: Replace all calls to signal(2) with a wrapper arounddtucker@openbsd.org
sigaction(2). This wrapper blocks all other signals during the handler preventing races between handlers, and sets SA_RESTART which should reduce the potential for short read/write operations. OpenBSD-Commit-ID: 5e047663fd77a40d7b07bdabe68529df51fd2519
2020-01-14Improve search for 'struct timespec'.Darren Tucker
Make struct timespec test consistent with existing timeval test. Include time.h for timespec in compat header where required.
2020-01-14Remove configure test & compat code for ripemd160.Darren Tucker
RIPEMD160 support was removed upstream in 2017, however we still had a configure test and compat code for it, so clean those up now.
2019-12-11Check if memmem is declared in system headers.Darren Tucker
If the system (or one of the dependencies) implements memmem but does not define the header, we would not declare it either resulting in compiler warnings. Check for declaration explicitly. bz#3102.
2019-11-29compile sk-dummy.so with no-PIE version of LDFLAGSDamien Miller
This lets it pick up the -L path to libcrypto for example.
2019-11-29(yet) another x-platform fix for sk-dummy.soDamien Miller
Check for -fPIC support from compiler Compile libopenbsd-compat -fPIC Don't mix -fPIE and -fPIC when compiling
2019-11-15upstream commitDamien Miller
revision 1.48 date: 2019/02/04 16:45:40; author: millert; state: Exp; lines: +16 -17; commitid: cpNtVC7erojNyctw; Make gl_pathc, gl_matchc and gl_offs size_t in glob_t to match POSIX. This requires a libc major version bump. OK deraadt@
2019-11-15upstream commitDamien Miller
revision 1.47 date: 2017/05/08 14:53:27; author: millert; state: Exp; lines: +34 -21; commitid: sYfxfyUHAfarP8sE; Fix exponential CPU use with repeated '*' operators by changing '*' handling to be interative instead of recursive. Fix by Yves Orton, ported to OpenBSD glob.c by Ray Lai. OK tb@
2019-11-15upstream commitDamien Miller
revision 1.46 date: 2015/12/28 22:08:18; author: mmcc; state: Exp; lines: +5 -9; commitid: 0uXuF2O13NH9q2e1; Remove NULL-checks before free() and a few related dead assignments. ok and valuable input from millert@
2019-11-15upstream commitDamien Miller
revision 1.44 date: 2015/09/14 16:09:13; author: tedu; state: Exp; lines: +3 -5; commitid: iWfSX2BIn0sLw62l; remove null check before free. from Michael McConville ok semarie
2019-11-15upstream commitDamien Miller
revision 1.43 date: 2015/06/13 16:57:04; author: deraadt; state: Exp; lines: +4 -4; commitid: zOUKuqWBdOPOz1SZ; in glob() initialize the glob_t before the first failure check. from j@pureftpd.org ok millert stsp
2019-11-15upstream commitDamien Miller
revision 1.42 date: 2015/02/05 12:59:57; author: millert; state: Exp; lines: +2 -1; commitid: DTQbfd4poqBW8iSJ; Include stdint.h, not limits.h to get SIZE_MAX. OK guenther@
2019-11-15upstream commitDamien Miller
revision 1.41 date: 2014/10/08 05:35:27; author: deraadt; state: Exp; lines: +3 -3; commitid: JwTGarRLHQKDgPh2; obvious realloc -> reallocarray conversion
2019-11-15upstream commitDamien Miller
revision 1.40 date: 2013/09/30 12:02:34; author: millert; state: Exp; lines: +14 -15; Use PATH_MAX, NAME_MAX and LOGIN_NAME_MAX not MAXPATHNAMELEN, MAXNAMLEN or MAXLOGNAME where possible. OK deraadt@
2019-11-15upstream commitDamien Miller
revision 1.39 date: 2012/01/20 07:09:42; author: tedu; state: Exp; lines: +4 -4; the glob stat limit is way too low. bump to 2048. while here, failed stats should count against the limit too. ok deraadt sthen stsp
2019-11-13Put headers inside ifdef _AIX.Darren Tucker
Prevents compile errors due to missing definitions (eg va_list) on non-AIX platforms.
2019-11-02Define __BSD_VISIBLE in fnmatch.h.Darren Tucker
.. since we use symbols defined only when it is when using the compat fnmatch.
2019-11-01Hook up fnmatch for platforms that don't have it.Darren Tucker
2019-11-01Add missing bracket in realpath macro.Darren Tucker
2019-11-01Import fnmatch.c from OpenBSD.Darren Tucker
2019-11-01Use sftp_realpath if no native realpath.Darren Tucker
2019-11-01Add prototype for localtime_r if needed.Darren Tucker
2019-10-29Add implementation of localtime_r.Darren Tucker
2019-10-28Fix ifdefs to not mask needed bits.Darren Tucker
2019-10-28Make sure we have struct statfs before using.Darren Tucker
2019-10-28Move utimensat definition into timespec section.Darren Tucker
Since utimensat uses struct timespec, move it to the section where we define struct timespec when needed.
2019-10-11Re-add SA_RESTART to mysignal.Darren Tucker
This makes mysignal implement reliable BSD semantics according to Stevens' APUE. This was first attempted in 2001 but was reverted due to problems with HP-UX 10.20 and select() and possibly grantpt(). Modern systems should be fine with it, but if any current platforms have a problem with it now we can disable it just for those. ok djm@
2019-10-10Fix ifdef typo for declaration of memmem.Darren Tucker
Fixes build on IRIX. bz#3081.
2019-10-09Make MAKE_CLONE no-op macro more correct.Darren Tucker
Similar to the previous change to DEF_WEAK, some compilers don't like the empty statement, so convert into a no-op function prototype.
2019-10-08avoid "return (value)" in void-declared functionDamien Miller
spotted by Tim Rice; ok dtucker
2019-09-30Include stdio.h for snprintf.Darren Tucker
Patch from vapier@gentoo.org.
2019-09-02fixed test in OSX closefrom() replacementDamien Miller
from likan_999.student AT sina.com
2019-09-02retain Solaris PRIV_FILE_LINK_ANY in sftp-serverDamien Miller
Dropping this privilege removes the ability to create hard links to files owned by other users. This is required for the legacy sftp rename operation. bz#3036; approach ok Alex Wilson (the original author of the Solaris sandbox/pledge replacement code)
2019-08-30proc_pidinfo()-based closefrom() for OS XDamien Miller
Refactor closefrom() to use a single brute-force close() loop fallback. Based on patch from likan_999.student@sina.com in bz#3049. ok dtucker@
2019-08-24Fix pasto in fallback code.Darren Tucker
There is no parameter called "pathname", it should simply be "path". bz#3059, patch from samuel at cendio.se.
2019-08-05Fix mem leak in unit test.Darren Tucker
Patch from jitendra.sharma at intel.com.