From 4efe1adf05ee5d3fce44320fcff68735891f4ee6 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Mon, 8 Jul 2019 13:38:39 +1000 Subject: 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@ --- configure.ac | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 23f4de7ef..532bdee83 100644 --- a/configure.ac +++ b/configure.ac @@ -588,7 +588,6 @@ case "$host" in #include ] ) check_for_aix_broken_getaddrinfo=1 - AC_DEFINE([BROKEN_REALPATH], [1], [Define if you have a broken realpath.]) AC_DEFINE([SETEUID_BREAKS_SETUID], [1], [Define if your platform breaks doing a seteuid before a setuid]) AC_DEFINE([BROKEN_SETREUID], [1], [Define if your setreuid() is broken]) @@ -948,7 +947,6 @@ mips-sony-bsd|mips-sony-newsos4) conf_wtmp_location=/usr/adm/wtmp maildir=/usr/spool/mail AC_DEFINE([HAVE_NEXT], [1], [Define if you are on NeXT]) - AC_DEFINE([BROKEN_REALPATH]) AC_DEFINE([USE_PIPES]) AC_DEFINE([BROKEN_SAVED_UIDS], [1], [Needed for NeXT]) ;; @@ -2024,32 +2022,6 @@ AC_CHECK_FUNCS([setresgid], [ ) ]) -AC_CHECK_FUNCS([realpath], [ - dnl the sftp v3 spec says SSH_FXP_REALPATH will "canonicalize any given - dnl path name", however some implementations of realpath (and some - dnl versions of the POSIX spec) do not work on non-existent files, - dnl so we use the OpenBSD implementation on those platforms. - AC_MSG_CHECKING([if realpath works with non-existent files]) - AC_RUN_IFELSE( - [AC_LANG_PROGRAM([[ -#include -#include -#include - ]], [[ - char buf[PATH_MAX]; - if (realpath("/opensshnonexistentfilename1234", buf) == NULL) - if (errno == ENOENT) - exit(1); - exit(0); - ]])], - [AC_MSG_RESULT([yes])], - [AC_DEFINE([BROKEN_REALPATH], [1], - [realpath does not work with nonexistent files]) - AC_MSG_RESULT([no])], - [AC_MSG_WARN([cross compiling: assuming working])] - ) -]) - AC_MSG_CHECKING([for working fflush(NULL)]) AC_RUN_IFELSE( [AC_LANG_PROGRAM([[#include ]], [[fflush(NULL); exit(0);]])], -- cgit v1.2.3