aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd/fsu
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/fsu')
-rw-r--r--cmd/fsu/main.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/fsu/main.go b/cmd/fsu/main.go
index 1ec3a4bc..d232818a 100644
--- a/cmd/fsu/main.go
+++ b/cmd/fsu/main.go
@@ -123,6 +123,11 @@ func main() {
suppGroups = []int{uid}
}
+ // final bounds check to catch any bugs
+ if uid < 1000000 || uid >= 2000000 {
+ panic("uid out of bounds")
+ }
+
// careful! users in the allowlist is effectively allowed to drop groups via fsu
if err := syscall.Setresgid(uid, uid, uid); err != nil {