diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2000-12-09 14:08:28 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2000-12-09 14:08:28 +0000 |
commit | abb8658dda11431449b61393d95692459d4c9d31 (patch) | |
tree | 55d29229a06779a4eb50cac83d2a2b442f66fe97 | |
parent | 2d4d2b1515ba88bba9992c0d18d1b3479dfb0053 (diff) |
"" -> "." for realpath; from vinschen@redhat.com
-rw-r--r-- | usr.bin/ssh/sftp-server.c | 6 |
1 files changed, 5 insertions, 1 deletions
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)); |