feat(server): activate projected authentication safely

This commit is contained in:
User
2026-08-22 01:01:36 +02:00
parent 903c0b4de5
commit 3d9a9f0675
32 changed files with 1837 additions and 38 deletions
@@ -0,0 +1,17 @@
//go:build linux
package backup
import (
"errors"
"os"
)
var restoreProjectionEffectiveUID = os.Geteuid
func requireAuthProjectionRestorePrivilege() error {
if restoreProjectionEffectiveUID() != 0 {
return errors.New("projected authentication restore requires root")
}
return nil
}