Documentation ¶
Overview ¶
Package pam implements a subset of Pluggable Authentication Modules (PAM). The supported subset of the PAM stack is "account" and "session" modules.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildHasPAM ¶
func BuildHasPAM() bool
BuildHasPAM returns true if the binary was build with support for PAM compiled in.
func SystemHasPAM ¶
func SystemHasPAM() bool
SystemHasPAM returns true if the PAM library exists on the system.
Types ¶
type Config ¶
type Config struct { // Enabled controls if PAM checks will occur or not. Enabled bool // ServiceName is the name of the policy to apply typically in /etc/pam.d/ ServiceName string // Login is the *nix login that that is being used. Login string `json:"login"` // Stdin is the input stream which the conversation function will use to // obtain data from the user. Stdin io.Reader // Stdout is the output stream which the conversation function will use to // show data to the user. Stdout io.Writer // Stderr is the output stream which the conversation function will use to // report errors to the user. Stderr io.Writer }
Config holds the configuration used by Teleport when creating a PAM context and executing PAM transactions.
func (*Config) CheckDefaults ¶
CheckDefaults makes sure the Config structure has minimum required values.
type PAM ¶
type PAM struct { }
PAM is used to create a PAM context and initiate PAM transactions to checks the users account and open/close a session.
func Open ¶
Open creates a PAM context and initiates a PAM transaction to check the account and then opens a session.
func (*PAM) Close ¶
Close will close the session, the PAM context, and release any allocated memory.
func (*PAM) Environment ¶
Environment returns the PAM environment variables associated with a PAM handle.