summaryrefslogtreecommitdiff
path: root/init.go
diff options
context:
space:
mode:
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
+}