diff options
author | Damien Miller <djm@mindrot.org> | 2019-07-08 13:38:39 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2019-07-08 13:38:39 +1000 |
commit | 4efe1adf05ee5d3fce44320fcff68735891f4ee6 (patch) | |
tree | 49b902aab121cc5c7c3b8dd166556036fee4c175 /configure.ac | |
parent | 696fb4298e80f2ebcd188986a91b49af3b7ca14c (diff) |
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@
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 28 |
1 files changed, 0 insertions, 28 deletions
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 | |||
588 | #include <fcntl.h> ] | 588 | #include <fcntl.h> ] |
589 | ) | 589 | ) |
590 | check_for_aix_broken_getaddrinfo=1 | 590 | check_for_aix_broken_getaddrinfo=1 |
591 | AC_DEFINE([BROKEN_REALPATH], [1], [Define if you have a broken realpath.]) | ||
592 | AC_DEFINE([SETEUID_BREAKS_SETUID], [1], | 591 | AC_DEFINE([SETEUID_BREAKS_SETUID], [1], |
593 | [Define if your platform breaks doing a seteuid before a setuid]) | 592 | [Define if your platform breaks doing a seteuid before a setuid]) |
594 | AC_DEFINE([BROKEN_SETREUID], [1], [Define if your setreuid() is broken]) | 593 | AC_DEFINE([BROKEN_SETREUID], [1], [Define if your setreuid() is broken]) |
@@ -948,7 +947,6 @@ mips-sony-bsd|mips-sony-newsos4) | |||
948 | conf_wtmp_location=/usr/adm/wtmp | 947 | conf_wtmp_location=/usr/adm/wtmp |
949 | maildir=/usr/spool/mail | 948 | maildir=/usr/spool/mail |
950 | AC_DEFINE([HAVE_NEXT], [1], [Define if you are on NeXT]) | 949 | AC_DEFINE([HAVE_NEXT], [1], [Define if you are on NeXT]) |
951 | AC_DEFINE([BROKEN_REALPATH]) | ||
952 | AC_DEFINE([USE_PIPES]) | 950 | AC_DEFINE([USE_PIPES]) |
953 | AC_DEFINE([BROKEN_SAVED_UIDS], [1], [Needed for NeXT]) | 951 | AC_DEFINE([BROKEN_SAVED_UIDS], [1], [Needed for NeXT]) |
954 | ;; | 952 | ;; |
@@ -2024,32 +2022,6 @@ AC_CHECK_FUNCS([setresgid], [ | |||
2024 | ) | 2022 | ) |
2025 | ]) | 2023 | ]) |
2026 | 2024 | ||
2027 | AC_CHECK_FUNCS([realpath], [ | ||
2028 | dnl the sftp v3 spec says SSH_FXP_REALPATH will "canonicalize any given | ||
2029 | dnl path name", however some implementations of realpath (and some | ||
2030 | dnl versions of the POSIX spec) do not work on non-existent files, | ||
2031 | dnl so we use the OpenBSD implementation on those platforms. | ||
2032 | AC_MSG_CHECKING([if realpath works with non-existent files]) | ||
2033 | AC_RUN_IFELSE( | ||
2034 | [AC_LANG_PROGRAM([[ | ||
2035 | #include <limits.h> | ||
2036 | #include <stdlib.h> | ||
2037 | #include <errno.h> | ||
2038 | ]], [[ | ||
2039 | char buf[PATH_MAX]; | ||
2040 | if (realpath("/opensshnonexistentfilename1234", buf) == NULL) | ||
2041 | if (errno == ENOENT) | ||
2042 | exit(1); | ||
2043 | exit(0); | ||
2044 | ]])], | ||
2045 | [AC_MSG_RESULT([yes])], | ||
2046 | [AC_DEFINE([BROKEN_REALPATH], [1], | ||
2047 | [realpath does not work with nonexistent files]) | ||
2048 | AC_MSG_RESULT([no])], | ||
2049 | [AC_MSG_WARN([cross compiling: assuming working])] | ||
2050 | ) | ||
2051 | ]) | ||
2052 | |||
2053 | AC_MSG_CHECKING([for working fflush(NULL)]) | 2025 | AC_MSG_CHECKING([for working fflush(NULL)]) |
2054 | AC_RUN_IFELSE( | 2026 | AC_RUN_IFELSE( |
2055 | [AC_LANG_PROGRAM([[#include <stdio.h>]], [[fflush(NULL); exit(0);]])], | 2027 | [AC_LANG_PROGRAM([[#include <stdio.h>]], [[fflush(NULL); exit(0);]])], |