diff options
| author | Jeff Carr <[email protected]> | 2024-01-06 05:32:52 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-06 05:32:52 -0600 |
| commit | 8b59a3141a6bd70eb8b434edbe347c3a22bfb3d6 (patch) | |
| tree | 8e80b90b15f267748aea060161752376312ec2c7 /linuxstatus/linuxloop.go | |
| parent | 3457aefa86ccc9bc6c4eda059e48ebcb8830b410 (diff) | |
move UID code
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'linuxstatus/linuxloop.go')
| -rw-r--r-- | linuxstatus/linuxloop.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/linuxstatus/linuxloop.go b/linuxstatus/linuxloop.go index 44946c6..fbbe653 100644 --- a/linuxstatus/linuxloop.go +++ b/linuxstatus/linuxloop.go @@ -5,6 +5,8 @@ package linuxstatus import ( + "os" + "os/user" "strconv" "go.wit.com/log" @@ -30,6 +32,12 @@ func linuxLoop() { } // me.IPv6.SetText(all) + user, _ := user.Current() + log.Println("os.Getuid =", user.Username, os.Getuid()) + if (me.uid != nil) { + me.uid.Set(user.Username + " (" + strconv.Itoa(os.Getuid()) + ")") + } + /* processName := getProcessNameByPort(53) fmt.Println("Process with port 53:", processName) |
