Files
ThothII/tools/tht/internal/backup/restore_projection_linux.go
T

18 lines
293 B
Go

//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
}