From: Waldemar Brodkorb <wbx@openadk.org>
To: buildroot@buildroot.org
Subject: [Buildroot] [PATCH] package/pam: fix uclibc compile error
Date: Sun, 27 Aug 2023 13:18:39 +0200 [thread overview]
Message-ID: <ZOsxD6Z372MejW1M@waldemar-brodkorb.de> (raw)
Following build failure occurs:
opasswd.c: In function 'compare_password':
opasswd.c:142:3: error: 'retval' undeclared (first use in this function); did you mean 'outval'?
142 | retval = outval != NULL && strcmp(outval, oldpass) == 0;
| ^~~~~~
| outval
Add a patch from upstream to fix it.
Happens since the update to 1.5.3 in Buildroot commit:
f8147e27cdac8f998ec6644a09ce4e8d62b6433c
Fixes:
- http://autobuild.buildroot.net/results/576/576fc4b9ccbc6cff82569692bdec82192e89f036
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---
...Fix-build-if-crypt_r-isn-t-available.patch | 37 +++++++++++++++++++
1 file changed, 37 insertions(+)
create mode 100644 package/linux-pam/0002-Fix-build-if-crypt_r-isn-t-available.patch
diff --git a/package/linux-pam/0002-Fix-build-if-crypt_r-isn-t-available.patch b/package/linux-pam/0002-Fix-build-if-crypt_r-isn-t-available.patch
new file mode 100644
index 0000000000..c7fdd8be36
--- /dev/null
+++ b/package/linux-pam/0002-Fix-build-if-crypt_r-isn-t-available.patch
@@ -0,0 +1,37 @@
+From b82acc21f1e2f76d4cb0c75bb4958751562039ab Mon Sep 17 00:00:00 2001
+From: Bernhard Rosenkränzer <bero@lindev.ch>
+Date: Wed, 7 Jun 2023 19:49:01 +0200
+Subject: [PATCH] Fix build if crypt_r isn't available
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+retval was being defined only in #ifdef HAVE_CRYPT_R, but used
+unconditionally.
+
+Signed-off-by: Bernhard Rosenkränzer <bero@lindev.ch>
+Fixes: bcba17939e1b ("modules: make use of secure memory erasure")
+Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
+Upstream: https://github.com/linux-pam/linux-pam/commit/b82acc21f1e2f76d4cb0c75bb4958751562039ab
+---
+ modules/pam_pwhistory/opasswd.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/modules/pam_pwhistory/opasswd.c b/modules/pam_pwhistory/opasswd.c
+index 479e3fc4..fc610e2f 100644
+--- a/modules/pam_pwhistory/opasswd.c
++++ b/modules/pam_pwhistory/opasswd.c
+@@ -128,9 +128,9 @@ static int
+ compare_password(const char *newpass, const char *oldpass)
+ {
+ char *outval;
++ int retval;
+ #ifdef HAVE_CRYPT_R
+ struct crypt_data output;
+- int retval;
+
+ output.initialized = 0;
+
+--
+2.39.2
+
--
2.39.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next reply other threads:[~2023-08-27 11:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-27 11:18 Waldemar Brodkorb [this message]
2023-09-02 15:51 ` [Buildroot] [PATCH] package/pam: fix uclibc compile error Thomas Petazzoni via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZOsxD6Z372MejW1M@waldemar-brodkorb.de \
--to=wbx@openadk.org \
--cc=buildroot@buildroot.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox