summaryrefslogtreecommitdiff
path: root/init.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-09 01:30:07 -0500
committerJeff Carr <[email protected]>2025-10-09 01:30:07 -0500
commite8ee27ea75b4df4f91d00c6c2741bd446694e464 (patch)
tree1315f35b9a1e3935856d5cb7bca7f28dfd648e3f /init.go
parent1b8a6e514ee86b754025afbf310d669c44528473 (diff)
simple root checkv0.0.5
Diffstat (limited to 'init.go')
-rw-r--r--init.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/init.go b/init.go
index 92965b1..4a78580 100644
--- a/init.go
+++ b/init.go
@@ -34,3 +34,11 @@ func InitDaemon() *zoopb.Machine {
m.Save()
return m
}
+
+// returns true if you are the root user
+func AreRoot() bool {
+ if os.Getuid() == 0 {
+ return true
+ }
+ return false
+}