summaryrefslogtreecommitdiff
path: root/src/nshd/hackers_git/db_config.go
blob: 55faa18a01206da8eb312d2d43486280930c9e0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package hackers_git

import (
	p "nslcd_proto"
	"nslcd_proto/util"
)

func (o *Hackers) Config_Get(cred p.Ucred, req p.Request_Config_Get) p.Config_Enumerator {
	o.lock.RLock()
	defer o.lock.RUnlock()

	var val *string = nil

	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
		}
	}

	if val != nil {
		return util.New_Config_List([]p.Config{p.Config{Value: *val}})
	} else {
		return util.Config_Ø{}
	}
}