aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd/sharefs
AgeCommit message (Collapse)Author
5 dayscontainer: enter init path earlyOphestra
There is generally no use case where any setup is required before init, and requiring the explicit function call is error-prone and unnecessary. It also causes trouble with packages using a similar trick. This change moves argv0 check early and makes it an import side effect. The stub will be removed in v0.5. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-07-07test: move nix filesOphestra
These are too much clutter. Move them to test directory until the test suite replacement is upstreamed. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-06-08all: apply modernisersOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-07internal/pkg: optionally register binfmtOphestra
This transparently supports curing foreign exec artifacts. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-08cmd/sharefs: group-accessible permission bitsOphestra
This works around the race in vfs via supplementary group. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-08cmd/sharefs: reproduce vfs inode file attribute raceOphestra
This happens in the vfs permissions check only and stale data appears to never reach userspace. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-07container: remove setup pipe helperOphestra
The API forces use of finalizer to close the read end of the setup pipe, which is no longer considered acceptable. Exporting this as part of package container also imposes unnecessary maintenance burden. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-30all: use filepathOphestra
This makes package check portable, and removes nonportable behaviour from package pkg, pipewire, and system. All other packages remain nonportable due to their nature. No latency increase was observed due to this change on amd64 and arm64 linux. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-28cmd: document Rosa OS programsOphestra
The earlyinit and mbf program are not covered by the compatibility promise, so specify that here. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-17fhs: move from containerOphestra
This package is not container-specific. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-17check: move from containerOphestra
This package is not container specific, and widely used across the project. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-02-28container: use /proc/self/exe directlyOphestra
This is a more reliable form of pathname to self and also cheaper than os.Executable. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-27cmd/sharefs: prepare directory earlyOphestra
This change also checks against filesystem daemon running as root early. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-27nix: configure sharefs via fileSystemsOphestra
Turns out this did not work because in the vm test harness, virtualisation.fileSystems completely and silently overrides fileSystems, causing its contents to not even be evaluated anymore. This is not documented as far as I can tell, and is not obvious by any stretch of the imagination. The current hack is cargo culted from nix-community/impermanence and hopefully lasts until this project fully replaces nix. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-27cmd/sharefs: create directory as rootOphestra
This optional behaviour is required on NixOS as it is otherwise impossible to set this up: systemd.mounts breaks startup order somehow even though my unit looks identical to generated ones, fileSystems does not support any kind of initialisation or ordering other than against other mount points. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-27cmd/sharefs: handle mount -t fuse.sharefsOphestra
This should have been handled in a custom option parsing function, but that much extra complexity is unnecessary for this edge case. Honestly I do not know why libfuse does not handle this itself. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-27cmd/sharefs: check option parsing behaviourOphestra
This change makes it possible to check parseOpts behaviour as part of Go tests. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-27cmd/sharefs: containerise filesystem daemonOphestra
This replaces the forking daemonise libfuse function which prevents Go callbacks from calling into the runtime. This also enforces least privilege on the daemon process. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-27cmd/sharefs: opaque setup stateOphestra
This allows unrestricted use of the type system and prepares setup code for cross-process initialisation. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-27cmd/sharefs: expand fuse_mainOphestra
This change should not change behaviour other than making output more consistent. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-27cmd/sharefs: improve help messageOphestra
This improves consistency with the fuse_main help message. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-26cmd/sharefs: allocate sharefs_private earlyOphestra
This also removes global state used by sharefs_init. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-26cmd/sharefs/test: check option handlingOphestra
This verifies behaviour related to setuid/setgid when starting as root. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-26cmd/sharefs: rename fuse-helper to fuse-operationsOphestra
This is not really just library wrapper functions, but instead implements the callbacks, so fuse-operations makes more sense. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-26cmd/sharefs: move translate_pathname body to macro wrapperOphestra
This is never called directly anywhere and it is simple enough to be included in the macro. This avoids passing the pointer around and dereferencing errno location, resulting in over 5% increase in throughput on the clang build. No change in the gcc build though. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-25cmd/sharefs: remove readlinkOphestra
This filesystem does not support symbolic links, so readlink is not useful, and unreachable in this case because of the check in getattr. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-25cmd/sharefs: implement shared filesystemOphestra
This is for passing files between applications, similar to android /sdcard. Signed-off-by: Ophestra <cat@gensokyo.uk>