Documentation
¶
Overview ¶
Package pam binds libpam through purego, so a program stays CGO_ENABLED=0: transactions, their conversation, and the items lys reads back.
Index ¶
- Constants
- func CheckLibrary() error
- type Converse
- type Message
- type Reply
- type Style
- type Txn
- func (t *Txn) AcctMgmt() int32
- func (t *Txn) Authenticate() int32
- func (t *Txn) Authtok() []byte
- func (t *Txn) Chauthtok(flags int32) int32
- func (t *Txn) CloseSession() int32
- func (t *Txn) End(status int32)
- func (t *Txn) Getenvlist() []string
- func (t *Txn) OpenSession() int32
- func (t *Txn) Putenv(kv string) int32
- func (t *Txn) Setcred(flags int32) int32
- func (t *Txn) Strerror(code int32) string
Constants ¶
const ( Success = 0 BufErr = 5 ConvErr = 19 )
PAM return codes (security/_pam_types.h).
const ItemAuthtok = 6
ItemAuthtok is PAM_AUTHTOK.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Converse ¶
Converse answers one batch of messages, or returns a PAM error code that ends the conversation.
type Reply ¶
Reply is one conversation answer; Set false leaves the C response slot NULL (info and error messages).
type Txn ¶
type Txn struct {
// contains filtered or unexported fields
}
Txn is one libpam transaction.
func Start ¶
Start opens a transaction for service and user whose conversation calls converse for every batch of messages. confdir, when set, reads the service from that directory with pam_start_confdir instead of /etc/pam.d (tests).
func (*Txn) Getenvlist ¶
Getenvlist is the transaction's environment, the C list freed once copied.