diff options
Diffstat (limited to 'src/nshd/hackers_git/hackers.go')
-rw-r--r-- | src/nshd/hackers_git/hackers.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nshd/hackers_git/hackers.go b/src/nshd/hackers_git/hackers.go index 5876613..4a1021a 100644 --- a/src/nshd/hackers_git/hackers.go +++ b/src/nshd/hackers_git/hackers.go @@ -51,3 +51,12 @@ func (o *Hackers) Reload() error { return o.reload() } + +func (o *Hackers) name2uid(name string) int32 { + for uid, data := range o.users { + if data.passwd.Name == name { + return uid + } + } + return -1 +} |