-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathhandle.go
More file actions
34 lines (27 loc) · 1001 Bytes
/
Copy pathhandle.go
File metadata and controls
34 lines (27 loc) · 1001 Bytes
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
27
28
29
30
31
32
33
34
package pam
import "unsafe"
type Handle interface {
// SetItem allows applications and PAM service modules
// to update PAM information.
// See pam_set_item(3).
SetItem(ItemType, unsafe.Pointer) error
// GetItem allows applications and PAM service modules
// to retrieve PAM information.
// See pam_get_item(3).
GetItem(ItemType) (unsafe.Pointer, error)
// GetUser returns the name of the user specified by `pam_start`
// if this is NULL, the username is obtained via the `pam_conv`
// mechanism.
// See pam_get_user(3).
GetUser(prompt string) (string, error)
// PutEnv is used to add or change the value of PAM environment variables.
// See pam_putenv(3).
PutEnv(key, value string) error
// GetEnv searches the PAM environment list for an item
// that matches the key and returns the value.
// See pam_getenv(3).
GetEnv(key string) string
// GetEnvList returns a complete copy of the PAM environment.
// See pam_get_envlist(3).
GetEnvList() (map[string]string, error)
}