diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2013-08-08 04:52:05 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2013-08-08 04:52:05 +0000 |
commit | 1f16d9914c08f4feaf802393454911b5b6514b18 (patch) | |
tree | 4cd5fe9a5ca472b07a3049718f4969576dda3a3e /usr.bin | |
parent | 3c4293cd3c0d7409e63fd2f879d9c9780d409376 (diff) |
fix two year old regression: symlinking a file would incorrectly
canonicalise the target path. bz#2129 report from delphij AT freebsd.org
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/sftp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ssh/sftp.c b/usr.bin/ssh/sftp.c index 55975ff697c..90bb03c516e 100644 --- a/usr.bin/ssh/sftp.c +++ b/usr.bin/ssh/sftp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp.c,v 1.150 2013/08/07 06:24:51 jmc Exp $ */ +/* $OpenBSD: sftp.c,v 1.151 2013/08/08 04:52:04 djm Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> * @@ -1337,7 +1337,8 @@ parse_dispatch_command(struct sftp_conn *conn, const char *cmd, char **pwd, case I_SYMLINK: sflag = 1; case I_LINK: - path1 = make_absolute(path1, *pwd); + if (!sflag) + path1 = make_absolute(path1, *pwd); path2 = make_absolute(path2, *pwd); err = (sflag ? do_symlink : do_hardlink)(conn, path1, path2); break; |