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

import p "nslcd_proto"

func (o *Hackers) Config_Get(cred p.Ucred, req p.Request_Config_Get) <-chan p.Config {
	o.lock.RLock()
	ret := make(chan p.Config)
	go func() {
		defer o.lock.RUnlock()
		defer close(ret)

		switch req.Key {
		case p.NSLCD_CONFIG_PAM_PASSWORD_PROHIBIT_MESSAGE:
			if o.Cfg.Pam_password_prohibit_message != "" {
				ret <- p.Config{Value: o.Cfg.Pam_password_prohibit_message}
			}
		}
	}()
	return ret
}