summaryrefslogtreecommitdiff
path: root/src/nshd/hackers_git
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-09-05 00:41:55 -0600
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-09-05 00:41:55 -0600
commite729072329556406dfdb19b89d177e89e27ca4a7 (patch)
tree21c7400fb901c365576229cfb389421d74a21dda /src/nshd/hackers_git
parent6b94a9b6588112328fa2738b1c149b48908f5029 (diff)
nslcd_h: each of the custom types should have kind==struct, to make io easy
Diffstat (limited to 'src/nshd/hackers_git')
-rw-r--r--src/nshd/hackers_git/db_config.go4
-rw-r--r--src/nshd/hackers_git/db_passwd.go4
-rw-r--r--src/nshd/hackers_git/db_shadow.go2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/nshd/hackers_git/db_config.go b/src/nshd/hackers_git/db_config.go
index aa8bef8..1de0013 100644
--- a/src/nshd/hackers_git/db_config.go
+++ b/src/nshd/hackers_git/db_config.go
@@ -11,7 +11,7 @@ func (o *Hackers) Config_Get(cred p.Ucred, req p.Request_Config_Get) p.Config_En
var val *string = nil
- switch req {
+ switch req.Key {
case p.NSLCD_CONFIG_PAM_PASSWORD_PROHIBIT_MESSAGE:
if o.cfg.Pam_password_prohibit_message != "" {
val = &o.cfg.Pam_password_prohibit_message
@@ -19,7 +19,7 @@ func (o *Hackers) Config_Get(cred p.Ucred, req p.Request_Config_Get) p.Config_En
}
if val != nil {
- return util.New_Config_List([]p.Config{p.Config(*val)})
+ return util.New_Config_List([]p.Config{p.Config{Value:(*val)}})
} else {
return util.Config_Ø{}
}
diff --git a/src/nshd/hackers_git/db_passwd.go b/src/nshd/hackers_git/db_passwd.go
index 7bc3671..8aad45e 100644
--- a/src/nshd/hackers_git/db_passwd.go
+++ b/src/nshd/hackers_git/db_passwd.go
@@ -16,7 +16,7 @@ func (o *Hackers) Passwd_ByName(cred p.Ucred, req p.Request_Passwd_ByName) p.Pas
o.lock.RLock()
defer o.lock.RUnlock()
- uid := o.name2uid(string(req))
+ uid := o.name2uid(req.Name)
if uid < 0 {
return util.Passwd_Ø{}
}
@@ -30,7 +30,7 @@ func (o *Hackers) Passwd_ByUID(cred p.Ucred, req p.Request_Passwd_ByUID) p.Passw
o.lock.RLock()
defer o.lock.RUnlock()
- user, found := o.users[int32(req)]
+ user, found := o.users[req.UID]
if !found {
return util.Passwd_Ø{}
}
diff --git a/src/nshd/hackers_git/db_shadow.go b/src/nshd/hackers_git/db_shadow.go
index df628cf..468f79d 100644
--- a/src/nshd/hackers_git/db_shadow.go
+++ b/src/nshd/hackers_git/db_shadow.go
@@ -12,7 +12,7 @@ func (o *Hackers) Shadow_ByName(cred p.Ucred, req p.Request_Shadow_ByName) p.Sha
if cred.Uid != 0 {
return util.Shadow_Ø{}
}
- uid := o.name2uid(string(req))
+ uid := o.name2uid(req.Name)
passwd := o.users[uid].passwd
shadow := p.Shadow{
Name: passwd.Name,