fsu: implement simple setuid user switcher

Contains path to fortify, set at compile time, authenticates based on a simple uid range assignment file which also acts as the allow list.

Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
2024-10-27 23:45:52 +09:00
parent 09feda3783
commit d9cb2a9f2b
3 changed files with 136 additions and 3 deletions

View File

@@ -20,6 +20,8 @@ buildGoModule rec {
"-w"
"-X"
"main.Version=v${version}"
"-X"
"main.FortifyPath=${placeholder "out"}/bin/fortify"
];
buildInputs = [
@@ -36,5 +38,7 @@ buildGoModule rec {
xdg-dbus-proxy
]
}
mv $out/bin/fsu $out/bin/.fsu
'';
}