openssh-portable/openbsd-compat
Darren Tucker d3e2aee414 Check if realpath works on nonexistent files.
On some platforms the native realpath doesn't work with non-existent
files (this is actually specified in some versions of POSIX), however
the sftp spec says its realpath with "canonicalize any given path name".
On those platforms, use realpath from the compat library.

In addition, when compiling with -DFORTIFY_SOURCE, glibc redefines
the realpath symbol to the checked version, so redefine ours to
something else so we pick up the compat version we want.

bz#2428, ok djm@
2015-07-17 12:58:02 +10:00
..
regress - (dtucker) [entropy.c openbsd-compat/openssl-compat.{c,h} 2014-06-17 23:06:07 +10:00
.cvsignore - (djm) Add .cvsignore files, suggested by Wayne Davison <wayne@blorf.net> 2001-04-30 13:55:37 +10:00
Makefile.in support --without-openssl at configure time 2015-01-15 02:28:36 +11:00
arc4random.c support --without-openssl at configure time 2015-01-15 02:28:36 +11:00
base64.c - otto@cvs.openbsd.org 2006/10/21 09:55:03 2007-10-26 16:17:24 +10:00
base64.h - (bal) openbsd-compat/ clean up. Considate headers, add in $Id$ on our 2003-08-29 16:59:52 +00:00
basename.c - (dtucker) [openbsd-compat/basename.c] Include errno.h. 2006-08-24 19:41:03 +10:00
bcrypt_pbkdf.c upstream commit 2015-05-10 11:57:31 +10:00
bindresvport.c - (djm) [openbsd-compat/bindresvport.c] Use arc4random_uniform(range) 2010-12-03 10:50:26 +11:00
blf.h - [configure.ac openbsd-compat/Makefile.in openbsd-compat/bcrypt_pbkdf.c] 2013-12-07 11:51:51 +11:00
blowfish.c Wrap blf.h include in ifdef. From FreeBSD. 2015-04-07 10:47:15 +10:00
bsd-asprintf.c - (dtucker) [openbsd-compat/bsd-asprintf.c] Plug mem leak in error path. 2007-09-14 10:04:15 +10:00
bsd-closefrom.c - (dtucker) [openbsd-compat/bsd-closefrom.c] Comment out rcsid. 2006-08-18 19:49:58 +10:00
bsd-cray.c - (dtucker) [openbsd-compat/bsd-cray.c] Remove debug from signal handler. 2007-08-15 19:17:43 +10:00
bsd-cray.h - (dtucker) [auth.c loginrec.h openbsd-compat/{bsd-cray,port-aix}.{c,h}] 2005-02-02 17:10:11 +11:00
bsd-cygwin_util.c Replace strcpy with strlcpy. 2015-06-02 20:15:26 +10:00
bsd-cygwin_util.h - (djm) [configure.ac openbsd-compat/bsd-cygwin_util.c] 2014-05-27 14:34:42 +10:00
bsd-getpeereid.c - (dtucker) [configure.ac openbsd-compat/bsd-getpeereid.c] Bug #1287: Use 2007-03-21 21:39:57 +11:00
bsd-misc.c Remove dependency on xmalloc. 2015-02-26 04:12:58 +11:00
bsd-misc.h Use do{}while(0) for no-op functions. 2015-04-07 10:48:04 +10:00
bsd-nextstep.c - deraadt@cvs.openbsd.org 2006/03/19 18:51:18 2006-03-26 00:03:21 +11:00
bsd-nextstep.h - (bal) openbsd-compat/ clean up. Considate headers, add in $Id$ on our 2003-08-29 16:59:52 +00:00
bsd-openpty.c - (dtucker) [openbsd-compat/bsd-openpty.c] Include for ioctl(2). 2006-08-24 19:52:30 +10:00
bsd-poll.c - (dtucker) [openbsd-compat/bsd-poll.c] Don't bother checking for non-NULL 2014-02-06 10:44:13 +11:00
bsd-poll.h - (dtucker) [atomicio.c configure.ac openbsd-compat/Makefile.in 2007-06-25 22:15:12 +10:00
bsd-setres_id.c - (djm) [openbsd-compat/bsd-setres_id.c] Missing header; from Corinna 2013-12-08 08:23:08 +11:00
bsd-setres_id.h - (dtucker) [uidswap.c openbsd-compat/Makefile.in 2012-11-05 17:04:37 +11:00
bsd-snprintf.c - (djm) [openbsd-compat/bsd-snprintf.c] Fix compilation failure (prototype/ 2014-08-22 17:48:27 +10:00
bsd-statvfs.c - (dtucker) [configure.ac openbsd-compat/bsd-statvfs.c 2014-01-17 18:10:58 +11:00
bsd-statvfs.h - (dtucker) [openbsd-compat/bsd-statvfs.h] Only start including headers if we 2014-01-17 18:48:22 +11:00
bsd-waitpid.c - deraadt@cvs.openbsd.org 2006/03/19 18:51:18 2006-03-26 00:03:21 +11:00
bsd-waitpid.h - (bal) openbsd-compat/ clean up. Considate headers, add in $Id$ on our 2003-08-29 16:59:52 +00:00
chacha_private.h - (djm) [openbsd-compat/arc4random.c openbsd-compat/chacha_private.h] Pull 2013-10-09 10:42:32 +11:00
charclass.h - djm@cvs.openbsd.org 2010/09/25 09:30:16 2010-10-07 21:39:17 +11:00
daemon.c - (dtucker) [auth-passwd.c auth1.c auth2-kbdint.c auth2-none.c auth2-passwd.c 2009-03-08 11:40:27 +11:00
dirname.c - (dtucker) [openbsd-compat/daemon.c] Update from OpenBSD 1.10 -> 1.13. 2005-11-10 17:33:00 +11:00
explicit_bzero.c - (djm) [openbsd-compat/explicit_bzero.c] implement explicit_bzero() 2014-08-27 06:32:01 +10:00
fake-rfc2553.c - (djm) [openbsd-compat/fake-rfc2553.c openbsd-compat/fake-rfc2553.h] 2008-07-14 21:37:36 +10:00
fake-rfc2553.h Add AI_NUMERICSERV to fake-rfc2553. 2015-02-24 13:43:57 +11:00
fmt_scaled.c - (djm) [configure.ac mux.c sftp.c openbsd-compat/Makefile.in] 2008-05-20 08:57:06 +10:00
getcwd.c - (djm) [openbsd-compat/getcwd.c] Remove OpenBSD rcsid marker since we no 2011-09-23 10:40:50 +10:00
getgrouplist.c - (djm) [openbsd-compat/getgrouplist.c] Remove OpenBSD rcsid marker: the 2011-09-23 10:44:03 +10:00
getopt.h - (dtucker) [openbsd-compat/getopt.h] Remove unneeded bits. 2013-05-17 16:03:48 +10:00
getopt_long.c - (dtucker) [openbsd-compat/getopt.h openbsd-compat/getopt_long.c 2013-05-10 18:08:49 +10:00
getrrsetbyname-ldns.c avoid uninitialised free of ldns_res 2014-12-30 08:16:11 +11:00
getrrsetbyname.c - (dtucker) [INSTALL LICENCE configure.ac openbsd-compat/Makefile.in 2011-11-04 11:25:24 +11:00
getrrsetbyname.h - jakob@cvs.openbsd.org 2007/10/11 18:36:41 2007-10-26 16:26:46 +10:00
glob.c - djm@cvs.openbsd.org 2011/09/22 06:27:29 2011-09-22 21:22:21 +10:00
glob.h - (tim) [openbsd-compat/glob.h] Remove sys/cdefs.h include that came with 2010-10-24 18:35:55 -07:00
inet_aton.c - (dtucker) [openbsd-compat/inet_aton.c] Update from OpenBSD 1.7 -> 1.9. 2005-11-10 17:21:21 +11:00
inet_ntoa.c - (dtucker) [openbsd-compat/inet_nto.c] Update from OpenBSD 1.4 -> 1.6. 2005-11-10 17:23:54 +11:00
inet_ntop.c - otto@cvs.openbsd.org 2008/12/09 19:38:38 2011-09-23 11:16:09 +10:00
kludge-fd_set.c - (djm) [openbsd-compat/Makefile.in openbsd-compat/kludge-fd_set.c] 2014-10-01 09:43:07 +10:00
md5.c support --without-openssl at configure time 2015-01-14 21:48:18 +11:00
md5.h support --without-openssl at configure time 2015-01-14 21:48:18 +11:00
mktemp.c - (dtucker) [openbsd-compat/mktemp.c] Fix compiler warning. ok djm 2011-10-01 18:46:12 +10:00
openbsd-compat.h Check if realpath works on nonexistent files. 2015-07-17 12:58:02 +10:00
openssl-compat.c support --without-openssl at configure time 2015-01-15 02:28:36 +11:00
openssl-compat.h support --without-openssl at configure time 2015-01-15 02:28:36 +11:00
port-aix.c - (dtucker) [M auth-chall.c auth-krb5.c auth-pam.c cipher-aes.c cipher-ctr.c 2013-06-02 08:07:31 +10:00
port-aix.h - (dtucker) [auth-krb5.c platform.{c,h} openbsd-compat/port-aix.{c,h}] 2009-12-21 10:49:21 +11:00
port-irix.c - (dtucker) [openbsd-compat/port-irix.c] Add errno.h, found by Iain Morgan. 2006-09-02 12:38:56 +10:00
port-irix.h - (bal) openbsd-compat/ clean up. Considate headers, add in $Id$ on our 2003-08-29 16:59:52 +00:00
port-linux.c - (dtucker) [M auth-chall.c auth-krb5.c auth-pam.c cipher-aes.c cipher-ctr.c 2013-06-02 08:07:31 +10:00
port-linux.h - (djm) [configure.ac Makefile.in ssh.c openbsd-compat/port-linux.c 2011-01-25 12:16:15 +11:00
port-solaris.c - (dtucker) [configure.ac platform.{c,h} session.c 2010-11-05 12:03:05 +11:00
port-solaris.h - (dtucker) [configure.ac platform.{c,h} session.c 2010-11-05 12:03:05 +11:00
port-tun.c kludge around tun API mismatch betterer 2015-01-15 03:08:29 +11:00
port-tun.h kludge around tun API mismatch betterer 2015-01-15 03:08:29 +11:00
port-uw.c - (tim) [openbsd-compat/port-uw.c] Include misc.h for fwd_opts, used 2014-07-18 20:00:11 -07:00
port-uw.h 20070326 2007-03-26 09:35:28 -07:00
pwcache.c - (dtucker) [openbsd-compat/pwcache.c] Shrink ifdef area to prevent unused 2010-01-16 13:53:52 +11:00
readpassphrase.c Move definition of _NSIG. 2015-02-25 13:40:45 +11:00
readpassphrase.h - (dtucker) [openbsd-compat/readpassphrase.h] Update from OpenBSD 1.3 -> 1.5. 2005-11-10 16:58:47 +11:00
reallocarray.c Wrap stdint.h includes in ifdefs. 2015-02-23 03:07:24 +11:00
realpath.c - (dtucker) [openbsd-compat/realpath.c] Sync $OpenBSD tag. 2005-11-12 14:14:52 +11:00
rmd160.c Wrap endian.h include inside ifdef (bz#2370). 2015-04-17 10:40:23 +10:00
rmd160.h support --without-openssl at configure time 2015-01-14 21:48:18 +11:00
rresvport.c - (djm) [openbsd-compat/rresvport.c] Add unistd.h for missing close() 2008-07-14 12:03:27 +10:00
setenv.c - (djm) [openbsd-compat/setenv.c] Forklift upgrade, including inclusion 2011-09-23 11:26:34 +10:00
setproctitle.c - (djm) [openbsd-compat/setproctitle.c] Don't fail to compile if a 2014-01-22 16:30:15 +11:00
sha1.c support --without-openssl at configure time 2015-01-14 21:48:18 +11:00
sha1.h support --without-openssl at configure time 2015-01-14 21:48:18 +11:00
sha2.c support --without-openssl at configure time 2015-01-15 02:28:36 +11:00
sha2.h support --without-openssl at configure time 2015-01-15 02:28:36 +11:00
sigact.c - (djm) [openbsd-compat/sigact.c] Avoid NULL derefs in ancient sigaction 2008-06-15 10:55:34 +10:00
sigact.h - (dtucker) [openbsd-compat/sigact.h] Update from OpenBSD 1.2 -> 1.3. 2005-11-10 19:43:48 +11:00
strlcat.c - (dtucker) [openbsd-compat/{LOTS}] Move the "OPENBSD ORIGINAL" markers to 2005-11-10 16:18:56 +11:00
strlcpy.c - millert@cvs.openbsd.org 2006/05/05 15:27:38 2011-09-23 10:38:11 +10:00
strmode.c - (dtucker) [openbsd-compat/strmode.c] Update from OpenBSD 1.5 -> 1.7. 2005-11-10 16:38:54 +11:00
strnlen.c - (dtucker) [configure.ac openbsd-compat/Makefile.in 2011-09-29 23:17:18 +10:00
strptime.c - (dtucker) [configure.ac openbsd-compat/Makefile.in 2010-08-16 13:15:23 +10:00
strsep.c - (dtucker) [openbsd-compat/strsep.c] Update from OpenBSD 1.5 -> 1.6. 2005-11-10 17:28:35 +11:00
strtoll.c - (dtucker) [openbsd-compat/{realpath.c,stroll.c,rresvport.c}] $OpenBSD tag. 2005-11-12 14:28:05 +11:00
strtonum.c - (dtucker) [openbsd-compat/strtonum.c] Include stdlib.h for strtoll, 2006-08-05 16:27:20 +10:00
strtoul.c - (dtucker) [openbsd-compat/strtoul.c] Update from OpenBSD 1.5 -> 1.7. 2005-11-10 16:48:10 +11:00
strtoull.c - (dtucker) [configure.ac openbsd-compat/Makefile.in openbsd-compat/strtoull.c 2013-02-15 12:13:01 +11:00
sys-queue.h - (djm) [openbsd-compat/sys-queue.h] Sync with OpenBSD to get 2012-12-03 09:37:56 +11:00
sys-tree.h - (dtucker) [configure.ac openbsd-compat/sys-tree.h] Test if compiler allows 2013-02-08 11:50:09 +11:00
timingsafe_bcmp.c - matthew@cvs.openbsd.org 2010/09/24 13:33:00 2010-10-07 21:25:27 +11:00
vis.c - (djm) [configure.ac log.c scp.c sshconnect2.c openbsd-compat/vis.c] 2013-03-20 12:55:14 +11:00
vis.h - (djm) [configure.ac log.c scp.c sshconnect2.c openbsd-compat/vis.c] 2013-03-20 12:55:14 +11:00
xcrypt.c support --without-openssl at configure time 2015-01-15 02:28:36 +11:00
xmmap.c - (djm) [regress/conch-ciphers.sh regress/putty-ciphers.sh] 2009-02-16 15:21:39 +11:00