diff options
Diffstat (limited to 'sftp-server.c')
-rw-r--r-- | sftp-server.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sftp-server.c b/sftp-server.c index fb6f0131b..5be2d4db4 100644 --- a/sftp-server.c +++ b/sftp-server.c | |||
@@ -22,7 +22,7 @@ | |||
22 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 22 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
23 | */ | 23 | */ |
24 | #include "includes.h" | 24 | #include "includes.h" |
25 | RCSID("$OpenBSD: sftp-server.c,v 1.6 2000/09/07 20:27:53 deraadt Exp $"); | 25 | RCSID("$OpenBSD: sftp-server.c,v 1.7 2000/12/09 14:08:27 markus Exp $"); |
26 | 26 | ||
27 | #include "ssh.h" | 27 | #include "ssh.h" |
28 | #include "buffer.h" | 28 | #include "buffer.h" |
@@ -904,6 +904,10 @@ process_realpath(void) | |||
904 | 904 | ||
905 | id = get_int(); | 905 | id = get_int(); |
906 | path = get_string(NULL); | 906 | path = get_string(NULL); |
907 | if (path[0] == '\0') { | ||
908 | xfree(path); | ||
909 | path = xstrdup("."); | ||
910 | } | ||
907 | TRACE("realpath id %d path %s", id, path); | 911 | TRACE("realpath id %d path %s", id, path); |
908 | if (realpath(path, resolvedname) == NULL) { | 912 | if (realpath(path, resolvedname) == NULL) { |
909 | send_status(id, errno_to_portable(errno)); | 913 | send_status(id, errno_to_portable(errno)); |