diff options
author | Damien Miller <djm@mindrot.org> | 2013-08-21 02:40:44 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2013-08-21 02:40:44 +1000 |
commit | 034f27a0c09e69fe3589045b41f03f6e345b63f5 (patch) | |
tree | 2cc8f94b7a702638c36c281ca4f6c31e79a406ff /sftp.c | |
parent | c6895c5c67492144dd28589e5788f783be9152ed (diff) |
- djm@cvs.openbsd.org 2013/08/08 04:52:04
[sftp.c]
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 'sftp.c')
-rw-r--r-- | sftp.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sftp.c,v 1.150 2013/08/07 06:24:51 jmc Exp $ */ | 1 | /* $OpenBSD: sftp.c,v 1.151 2013/08/08 04:52:04 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> | 3 | * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> |
4 | * | 4 | * |
@@ -1358,7 +1358,8 @@ parse_dispatch_command(struct sftp_conn *conn, const char *cmd, char **pwd, | |||
1358 | case I_SYMLINK: | 1358 | case I_SYMLINK: |
1359 | sflag = 1; | 1359 | sflag = 1; |
1360 | case I_LINK: | 1360 | case I_LINK: |
1361 | path1 = make_absolute(path1, *pwd); | 1361 | if (!sflag) |
1362 | path1 = make_absolute(path1, *pwd); | ||
1362 | path2 = make_absolute(path2, *pwd); | 1363 | path2 = make_absolute(path2, *pwd); |
1363 | err = (sflag ? do_symlink : do_hardlink)(conn, path1, path2); | 1364 | err = (sflag ? do_symlink : do_hardlink)(conn, path1, path2); |
1364 | break; | 1365 | break; |