Bugzilla – Attachment 2669 Details for
Bug 2428
realpath command doesn't work
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Check if realpath works with non-existent files.
openssh-realpath-ENOENT.patch (text/plain), 1.22 KB, created by
Darren Tucker
on 2015-07-15 11:50:47 AEST
(
hide
)
Description:
Check if realpath works with non-existent files.
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2015-07-15 11:50:47 AEST
Size:
1.22 KB
patch
obsolete
>diff --git a/configure.ac b/configure.ac >index bb0095f..4cc4015 100644 >--- a/configure.ac >+++ b/configure.ac >@@ -1674,7 +1674,6 @@ AC_CHECK_FUNCS([ \ > pstat \ > readpassphrase \ > reallocarray \ >- realpath \ > recvmsg \ > rresvport_af \ > sendmsg \ >@@ -1891,6 +1890,32 @@ 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 <limits.h> >+#include <stdlib.h> >+#include <errno.h> >+ ]], [[ >+ 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])] >+ ) >+]) >+ > dnl Checks for time functions > AC_CHECK_FUNCS([gettimeofday time]) > dnl Checks for utmp functions
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 2428
:
2665
|
2666
|
2667
|
2668
|
2669
|
2671
|
2672