Skip to content

Commit

Permalink
Avoid changing uid/gid if they are -1 (invalid)
Browse files Browse the repository at this point in the history
  • Loading branch information
netheril96 committed Jul 28, 2024
1 parent 709b8e1 commit 2076d60
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sources/full_format.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,10 @@ int FuseHighLevelOps::vchown(const char* path,
return -ENOENT;
}
FileLockGuard fg(**opened);
(**opened).set_uid(uid);
(**opened).set_gid(gid);
if (uid != -1)
(**opened).set_uid(uid);
if (gid != -1)
(**opened).set_gid(gid);
return 0;
};
int FuseHighLevelOps::vsymlink(const char* to, const char* from, const fuse_context* ctx)
Expand Down

0 comments on commit 2076d60

Please sign in to comment.