Skip to content

Commit

Permalink
Merge pull request torvalds#457 from rafaelgieschke/chown-symlink
Browse files Browse the repository at this point in the history
lkl tools: lklfuse: Fix `lchown(2)` on symlinks
  • Loading branch information
tavip authored Jan 5, 2019
2 parents 58dc202 + db9dea3 commit 2c7da39
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/lkl/lklfuse.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@ static int lklfuse_chmod(const char *path, mode_t mode)

static int lklfuse_chown(const char *path, uid_t uid, gid_t gid)
{
return lkl_sys_chown(path, uid, gid);
return lkl_sys_fchownat(LKL_AT_FDCWD, path, uid, gid,
LKL_AT_SYMLINK_NOFOLLOW);
}

static int lklfuse_truncate(const char *path, off_t off)
Expand Down

0 comments on commit 2c7da39

Please sign in to comment.