cmd/sharefs: group-accessible permission bits

This works around the race in vfs via supplementary group.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-04-08 16:14:47 +09:00
parent 351d6c5a35
commit b0ba165107
3 changed files with 31 additions and 22 deletions

View File

@@ -7,8 +7,8 @@
#endif
#define SHAREFS_MEDIA_RW_ID (1 << 10) - 1 /* owning gid presented to userspace */
#define SHAREFS_PERM_DIR 0700 /* permission bits for directories presented to userspace */
#define SHAREFS_PERM_REG 0600 /* permission bits for regular files presented to userspace */
#define SHAREFS_PERM_DIR 0770 /* permission bits for directories presented to userspace */
#define SHAREFS_PERM_REG 0660 /* permission bits for regular files presented to userspace */
#define SHAREFS_FORBIDDEN_FLAGS O_DIRECT /* these open flags are cleared unconditionally */
/* sharefs_private is populated by sharefs_init and contains process-wide context */