diff options
| author | Jeff Carr <[email protected]> | 2025-10-09 01:30:07 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-09 01:30:07 -0500 |
| commit | e8ee27ea75b4df4f91d00c6c2741bd446694e464 (patch) | |
| tree | 1315f35b9a1e3935856d5cb7bca7f28dfd648e3f /init.go | |
| parent | 1b8a6e514ee86b754025afbf310d669c44528473 (diff) | |
simple root checkv0.0.5
Diffstat (limited to 'init.go')
| -rw-r--r-- | init.go | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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 +} |
