40 lines
1.3 KiB
Diff
40 lines
1.3 KiB
Diff
|
From 25b7b37fd65df957c24c46ed06884ef19e2852cb Mon Sep 17 00:00:00 2001
|
||
|
From: Sam James <sam@gentoo.org>
|
||
|
Date: Wed, 7 Sep 2022 05:42:17 +0100
|
||
|
Subject: [PATCH] pam_pwquality: add include for
|
||
|
pam_modutil_check_user_in_passwd
|
||
|
|
||
|
After 9084c1b032161cdb53d5f66132a91bdc207faecf, one gets:
|
||
|
```
|
||
|
pam_pwquality.c: In function 'check_local_user':
|
||
|
pam_pwquality.c:102:16: error: implicit declaration of function 'pam_modutil_check_user_in_passwd' [-Werror=implicit-function-declaration]
|
||
|
102 | return pam_modutil_check_user_in_passwd(pamh, user, NULL) == PAM_SUCCESS;
|
||
|
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||
|
cc1: some warnings being treated as errors
|
||
|
make[2]: *** [Makefile:634: pam_pwquality.lo] Error 1
|
||
|
make[2]: *** Waiting for unfinished jobs....
|
||
|
```
|
||
|
|
||
|
We need to include security/pam_modutil.h when appropriate.
|
||
|
|
||
|
Signed-off-by: Sam James <sam@gentoo.org>
|
||
|
---
|
||
|
src/pam_pwquality.c | 4 ++++
|
||
|
1 file changed, 4 insertions(+)
|
||
|
|
||
|
diff --git a/src/pam_pwquality.c b/src/pam_pwquality.c
|
||
|
index 5c09bc7..d68118a 100644
|
||
|
--- a/src/pam_pwquality.c
|
||
|
+++ b/src/pam_pwquality.c
|
||
|
@@ -34,6 +34,10 @@
|
||
|
#include <security/_pam_macros.h>
|
||
|
#include <security/pam_ext.h>
|
||
|
|
||
|
+#ifdef HAVE_PAM_CHECK_USER_IN_PASSWD
|
||
|
+#include <security/pam_modutil.h>
|
||
|
+#endif
|
||
|
+
|
||
|
/* argument parsing */
|
||
|
#define PAM_DEBUG_ARG 0x0001
|
||
|
|