diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | sshfs.c | 4 |
2 files changed, 9 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2011-11-25 Miklos Szeredi <miklos@szeredi.hu> + + * Make chown respect the UID mapping policy. Reported and tested + by Vivenzio Pagliari + 2011-11-16 Miklos Szeredi <miklos@szeredi.hu> * Submit max 32k reads and writes to the sftp server. Also don't @@ -2150,6 +2150,10 @@ static int sshfs_chown(const char *path, uid_t uid, gid_t gid) { int err; struct buffer buf; + + if (sshfs.remote_uid_detected && uid == sshfs.local_uid) + uid = sshfs.remote_uid; + buf_init(&buf, 0); buf_add_path(&buf, path); buf_add_uint32(&buf, SSH_FILEXFER_ATTR_UIDGID); |