Skip to content

Commit 2c7da39

Browse files
authored
Merge pull request torvalds#457 from rafaelgieschke/chown-symlink
lkl tools: lklfuse: Fix `lchown(2)` on symlinks
2 parents 58dc202 + db9dea3 commit 2c7da39

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/lkl/lklfuse.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,8 @@ static int lklfuse_chmod(const char *path, mode_t mode)
211211

212212
static int lklfuse_chown(const char *path, uid_t uid, gid_t gid)
213213
{
214-
return lkl_sys_chown(path, uid, gid);
214+
return lkl_sys_fchownat(LKL_AT_FDCWD, path, uid, gid,
215+
LKL_AT_SYMLINK_NOFOLLOW);
215216
}
216217

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

0 commit comments

Comments
 (0)