Skip to content

Commit

Permalink
transaction: Add some missing flags for modules
Browse files Browse the repository at this point in the history
  • Loading branch information
3v1n0 committed Mar 21, 2024
1 parent e182844 commit f199038
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,13 @@ const (
// ChangeExpiredAuthtok indicates that the authentication token
// should be changed if it has expired.
ChangeExpiredAuthtok Flags = C.PAM_CHANGE_EXPIRED_AUTHTOK
// PrelimCheck indicates that the password service should only
// perform preliminary checks. No passwords should be updated.
PrelimCheck Flags = C.PAM_PRELIM_CHECK
// UpdateAuthtok indicates that password service should update
// passwords Note: [pam.PrelimCheck] and [pam.UpdateAuthtok] cannot
// both be set simultaneously!
UpdateAuthtok Flags = C.PAM_UPDATE_AUTHTOK
)

// PutEnv adds or changes the value of PAM environment variables.
Expand Down
8 changes: 8 additions & 0 deletions transaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@
#define BINARY_PROMPT_IS_SUPPORTED 0
#endif

#ifndef PAM_PRELIM_CHECK
#define PAM_PRELIM_CHECK 0
#endif

#ifndef PAM_UPDATE_AUTHTOK
#define PAM_UPDATE_AUTHTOK 0
#endif

#ifdef __sun
#define PAM_CONST
#else
Expand Down

0 comments on commit f199038

Please sign in to comment.