summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/libpwquality/files
diff options
context:
space:
mode:
authoralperak <alperyasinak1@gmail.com>2023-12-01 19:03:09 +0300
committerKhem Raj <raj.khem@gmail.com>2023-12-01 08:48:58 -0800
commitd3bd2ddf192dfd1ca3326975cdfd8833deb6677b (patch)
treeb0f81e2c5586c6c65e23a0c7fca255e354524bac /meta-oe/recipes-extended/libpwquality/files
parentb1d55efe056c5f66dd77ef2e6bf67203300db6dc (diff)
downloadmeta-openembedded-d3bd2ddf192dfd1ca3326975cdfd8833deb6677b.tar.gz
libpwquality: upgrade 1.4.4 -> 1.4.5
* 0001-fix-musl-build.patch removed because fixed in the new version. -> https://github.com/libpwquality/libpwquality/pull/53 * Copied ABOUT-NLS from native sysroot's gettext manually because of following error -> error: required file './ABOUT-NLS' not found Building from sources need additional steps. Gettextize would have produced this file properly. But, we don't run it as part of autotools bbclass's autoreconf step Instead of creating an empty ABOUT-NLS file, copied it from native sysroot's gettext manually. Changelog: * Translation updates * Minor bug fixes and documentation enhancements Signed-off-by: alperak <alperyasinak1@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended/libpwquality/files')
-rw-r--r--meta-oe/recipes-extended/libpwquality/files/0001-fix-musl-build.patch72
1 files changed, 0 insertions, 72 deletions
diff --git a/meta-oe/recipes-extended/libpwquality/files/0001-fix-musl-build.patch b/meta-oe/recipes-extended/libpwquality/files/0001-fix-musl-build.patch
deleted file mode 100644
index 2cbdd6c74c..0000000000
--- a/meta-oe/recipes-extended/libpwquality/files/0001-fix-musl-build.patch
+++ /dev/null
@@ -1,72 +0,0 @@
1Do not use fgetpwent_r
2
3fgetpwent_r does not exist on musl
4
5Source: https://git.alpinelinux.org/aports/tree/community/libpwquality/0001-fix-musl-build.patch
6Upstream-Status: Pending
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8--- a/src/pam_pwquality.c
9+++ b/src/pam_pwquality.c
10@@ -19,6 +19,7 @@
11 #include <stdio.h>
12 #include <pwd.h>
13 #include <errno.h>
14+#include <security/pam_modutil.h>
15 #include "pwquality.h"
16
17 /*
18@@ -43,8 +44,6 @@ struct module_options {
19
20 #define CO_RETRY_TIMES 1
21
22-#define PATH_PASSWD "/etc/passwd"
23-
24 static int
25 _pam_parse (pam_handle_t *pamh, struct module_options *opt,
26 int argc, const char **argv)
27@@ -98,44 +97,7 @@ static int
28 check_local_user (pam_handle_t *pamh,
29 const char *user)
30 {
31- struct passwd pw, *pwp;
32- char buf[4096];
33- int found = 0;
34- FILE *fp;
35- int errn;
36-
37- fp = fopen(PATH_PASSWD, "r");
38- if (fp == NULL) {
39- pam_syslog(pamh, LOG_ERR, "unable to open %s: %s",
40- PATH_PASSWD, pam_strerror(pamh, errno));
41- return -1;
42- }
43-
44- for (;;) {
45- errn = fgetpwent_r(fp, &pw, buf, sizeof (buf), &pwp);
46- if (errn == ERANGE) {
47- pam_syslog(pamh, LOG_WARNING, "%s contains very long lines; corrupted?",
48- PATH_PASSWD);
49- /* we can continue here as next call will read further */
50- continue;
51- }
52- if (errn != 0)
53- break;
54- if (strcmp(pwp->pw_name, user) == 0) {
55- found = 1;
56- break;
57- }
58- }
59-
60- fclose (fp);
61-
62- if (errn != 0 && errn != ENOENT) {
63- pam_syslog(pamh, LOG_ERR, "unable to enumerate local accounts: %s",
64- pam_strerror(pamh, errn));
65- return -1;
66- } else {
67- return found;
68- }
69+ return pam_modutil_check_user_in_passwd(pamh, user, NULL) == PAM_SUCCESS;
70 }
71
72 PAM_EXTERN int