aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2012-05-14 16:18:22 +0200
committerMiklos Szeredi <mszeredi@suse.cz>2012-05-14 16:18:22 +0200
commitce6753c88f1d06e537d8f04bc5caf4a87749386c (patch)
tree818d4b6c0bf01006bdadda5fd8401e3340bdb286
parent857d634e095becbdeedeed374ff668370f3a1c66 (diff)
downloadsshfs-ce6753c88f1d06e537d8f04bc5caf4a87749386c.tar
sshfs-ce6753c88f1d06e537d8f04bc5caf4a87749386c.tar.gz
sshfs-ce6753c88f1d06e537d8f04bc5caf4a87749386c.tar.bz2
sshfs-ce6753c88f1d06e537d8f04bc5caf4a87749386c.zip
When checking root directory use LSTAT not STAT
This prevents I/O error being returned after a successful mount if a symlink is mounted. Reported by Bart Friederichs
-rw-r--r--ChangeLog6
-rw-r--r--sshfs.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 618a427..c855c7d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-05-14 Miklos Szeredi <miklos@szeredi.hu>
+
+ * When checking root directory use LSTAT not STAT. This prevents
+ I/O error being returned after a successful mount if a symlink is
+ mounted. Reported by Bart Friederichs
+
2012-03-08 Miklos Szeredi <miklos@szeredi.hu>
* Released 2.4
diff --git a/sshfs.c b/sshfs.c
index 7cfa341..4945302 100644
--- a/sshfs.c
+++ b/sshfs.c
@@ -1620,7 +1620,7 @@ static int sftp_check_root(const char *base_path)
buf_init(&buf, 0);
buf_add_string(&buf, remote_dir);
buf_to_iov(&buf, &iov[0]);
- if (sftp_send_iov(SSH_FXP_STAT, id, iov, 1) == -1)
+ if (sftp_send_iov(SSH_FXP_LSTAT, id, iov, 1) == -1)
goto out;
buf_clear(&buf);
if (sftp_read(&type, &buf) == -1)