cmd/sharefs: group-accessible permission bits
All checks were successful
Test / Create distribution (push) Successful in 1m16s
Test / Sandbox (push) Successful in 3m17s
Test / Hakurei (push) Successful in 4m21s
Test / ShareFS (push) Successful in 4m30s
Test / Sandbox (race detector) (push) Successful in 5m43s
Test / Hakurei (race detector) (push) Successful in 6m48s
Test / Flake checks (push) Successful in 1m28s
All checks were successful
Test / Create distribution (push) Successful in 1m16s
Test / Sandbox (push) Successful in 3m17s
Test / Hakurei (push) Successful in 4m21s
Test / ShareFS (push) Successful in 4m30s
Test / Sandbox (race detector) (push) Successful in 5m43s
Test / Hakurei (race detector) (push) Successful in 6m48s
Test / Flake checks (push) Successful in 1m28s
This works around the race in vfs via supplementary group. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -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 */
|
||||
|
||||
@@ -8,7 +8,10 @@
|
||||
description = "Alice Foobar";
|
||||
password = "foobar";
|
||||
uid = 1000;
|
||||
extraGroups = [ "wheel" ];
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"sharefs"
|
||||
];
|
||||
};
|
||||
untrusted = {
|
||||
isNormalUser = true;
|
||||
|
||||
@@ -1,24 +1,30 @@
|
||||
{ lib, pkgs, ... }:
|
||||
let
|
||||
inherit (pkgs) buildGoModule;
|
||||
in
|
||||
{
|
||||
environment.systemPackages = [
|
||||
(buildGoModule rec {
|
||||
name = "raceattr";
|
||||
pname = name;
|
||||
tags = [ "raceattr" ];
|
||||
security.wrappers.raceattr =
|
||||
let
|
||||
inherit (pkgs) buildGoModule;
|
||||
in
|
||||
{
|
||||
setuid = true;
|
||||
owner = "root";
|
||||
group = "root";
|
||||
source = "${
|
||||
(buildGoModule rec {
|
||||
name = "raceattr";
|
||||
pname = name;
|
||||
tags = [ "raceattr" ];
|
||||
|
||||
src = builtins.path {
|
||||
name = "${pname}-src";
|
||||
path = lib.cleanSource ../../cmd/sharefs/test;
|
||||
filter = path: type: (type == "directory") || (type == "regular" && lib.hasSuffix ".go" path);
|
||||
};
|
||||
vendorHash = null;
|
||||
src = builtins.path {
|
||||
name = "${pname}-src";
|
||||
path = lib.cleanSource ../../cmd/sharefs/test;
|
||||
filter = path: type: (type == "directory") || (type == "regular" && lib.hasSuffix ".go" path);
|
||||
};
|
||||
vendorHash = null;
|
||||
|
||||
preBuild = ''
|
||||
go mod init hakurei.app/raceattr >& /dev/null
|
||||
'';
|
||||
})
|
||||
];
|
||||
preBuild = ''
|
||||
go mod init hakurei.app/raceattr >& /dev/null
|
||||
'';
|
||||
})
|
||||
}/bin/raceattr";
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user