From abb8658dda11431449b61393d95692459d4c9d31 Mon Sep 17 00:00:00 2001 From: Markus Friedl Date: Sat, 9 Dec 2000 14:08:28 +0000 Subject: "" -> "." for realpath; from vinschen@redhat.com --- usr.bin/ssh/sftp-server.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/usr.bin/ssh/sftp-server.c b/usr.bin/ssh/sftp-server.c index 018a03cc209..f0d6fc4bf3a 100644 --- a/usr.bin/ssh/sftp-server.c +++ b/usr.bin/ssh/sftp-server.c @@ -22,7 +22,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "includes.h" -RCSID("$OpenBSD: sftp-server.c,v 1.6 2000/09/07 20:27:53 deraadt Exp $"); +RCSID("$OpenBSD: sftp-server.c,v 1.7 2000/12/09 14:08:27 markus Exp $"); #include "ssh.h" #include "buffer.h" @@ -892,6 +892,10 @@ process_realpath(void) id = get_int(); path = get_string(NULL); + if (path[0] == '\0') { + xfree(path); + path = xstrdup("."); + } TRACE("realpath id %d path %s", id, path); if (realpath(path, resolvedname) == NULL) { send_status(id, errno_to_portable(errno)); -- cgit v1.2.3