summaryrefslogtreecommitdiff
path: root/src/nshd/hackers_git/hackers.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-09-02 12:59:53 -0600
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-09-02 12:59:53 -0600
commit1f87babb40b64892bf090e9ed1bcc71468c51015 (patch)
tree39091dbd664626c1a1c08e2c9cf56bef1feb6da8 /src/nshd/hackers_git/hackers.go
parent1eb1677cf916c13e07f61efc464edca1c571684d (diff)
Implement all of hackers.git, except the group DB
Diffstat (limited to 'src/nshd/hackers_git/hackers.go')
-rw-r--r--src/nshd/hackers_git/hackers.go9
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
+}