summaryrefslogtreecommitdiff
path: root/go/parabola_hackers/nslcd_backend/db_passwd.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-06-18 02:08:59 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-06-18 02:08:59 -0400
commit34cecd4762e364ade049c455997051ca55663b6f (patch)
tree502182256e773704ca238da3e0b47934a8f495ce /go/parabola_hackers/nslcd_backend/db_passwd.go
parent374539da4c9e1b4ea5ca889771ce89b27b119f48 (diff)
update to use the mutable strings in nslcd_proto
Diffstat (limited to 'go/parabola_hackers/nslcd_backend/db_passwd.go')
-rw-r--r--go/parabola_hackers/nslcd_backend/db_passwd.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/go/parabola_hackers/nslcd_backend/db_passwd.go b/go/parabola_hackers/nslcd_backend/db_passwd.go
index 3f32ddd..7bac808 100644
--- a/go/parabola_hackers/nslcd_backend/db_passwd.go
+++ b/go/parabola_hackers/nslcd_backend/db_passwd.go
@@ -36,12 +36,12 @@ func (o *Hackers) Passwd_ByName(cred s.Ucred, req p.Request_Passwd_ByName) <-cha
defer o.lock.RUnlock()
defer close(ret)
- uid := o.name2uid(req.Name)
+ uid := o.name2uid(string(req.Name))
if uid < 0 {
return
}
passwd := o.users[uid].Passwd
- passwd.PwHash = "x" // only put actual hashes in the Shadow DB
+ passwd.PwHash = p.String("x") // only put actual hashes in the Shadow DB
ret <- passwd
}()
return ret
@@ -59,7 +59,7 @@ func (o *Hackers) Passwd_ByUID(cred s.Ucred, req p.Request_Passwd_ByUID) <-chan
return
}
passwd := user.Passwd
- passwd.PwHash = "x" // only put actual hashes in the Shadow DB
+ passwd.PwHash = p.String("x") // only put actual hashes in the Shadow DB
ret <- passwd
}()
return ret
@@ -74,7 +74,7 @@ func (o *Hackers) Passwd_All(cred s.Ucred, req p.Request_Passwd_All) <-chan p.Pa
for _, user := range o.users {
passwd := user.Passwd
- passwd.PwHash = "x" // only put actual hashes in the Shadow DB
+ passwd.PwHash = p.String("x") // only put actual hashes in the Shadow DB
ret <- passwd
}
}()