- 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
This commit is contained in:
parent
c6895c5c67
commit
034f27a0c0
|
@ -15,6 +15,10 @@
|
||||||
- jmc@cvs.openbsd.org 2013/08/07 06:24:51
|
- jmc@cvs.openbsd.org 2013/08/07 06:24:51
|
||||||
[sftp.1 sftp.c]
|
[sftp.1 sftp.c]
|
||||||
sort -a;
|
sort -a;
|
||||||
|
- 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
|
||||||
|
|
||||||
20130808
|
20130808
|
||||||
- (dtucker) [regress/Makefile regress/test-exec.sh] Don't try to use test -nt
|
- (dtucker) [regress/Makefile regress/test-exec.sh] Don't try to use test -nt
|
||||||
|
|
3
sftp.c
3
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>
|
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
|
||||||
*
|
*
|
||||||
|
@ -1358,6 +1358,7 @@ parse_dispatch_command(struct sftp_conn *conn, const char *cmd, char **pwd,
|
||||||
case I_SYMLINK:
|
case I_SYMLINK:
|
||||||
sflag = 1;
|
sflag = 1;
|
||||||
case I_LINK:
|
case I_LINK:
|
||||||
|
if (!sflag)
|
||||||
path1 = make_absolute(path1, *pwd);
|
path1 = make_absolute(path1, *pwd);
|
||||||
path2 = make_absolute(path2, *pwd);
|
path2 = make_absolute(path2, *pwd);
|
||||||
err = (sflag ? do_symlink : do_hardlink)(conn, path1, path2);
|
err = (sflag ? do_symlink : do_hardlink)(conn, path1, path2);
|
||||||
|
|
Loading…
Reference in New Issue