From f19903865176f469cf13504841965b401584831e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 21 Mar 2024 06:44:21 +0100 Subject: [PATCH] transaction: Add some missing flags for modules --- transaction.go | 7 +++++++ transaction.h | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/transaction.go b/transaction.go index b918a24b..8ff6e863 100644 --- a/transaction.go +++ b/transaction.go @@ -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. diff --git a/transaction.h b/transaction.h index 292aa960..f224d805 100644 --- a/transaction.h +++ b/transaction.h @@ -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