Commit c7e798f8 authored by Michael Biebl's avatar Michael Biebl

manager: Pass correct errno to strerror()

have_ask_password contains negative error values which have to be
negated when being passed to strerror().
parent 2a6ef968
systemd (215-18) UNRELEASED; urgency=medium
* manager: Pass correct errno to strerror(), have_ask_password contains
negative error values which have to be negated when being passed to
strerror().
-- Michael Biebl <biebl@debian.org> Fri, 17 Apr 2015 15:40:29 +0200
systemd (215-17) unstable; urgency=high
* cryptsetup: Implement offset and skip options. (Closes: #751707,
......
From 6d025bafdb9a3317fac014bdf19acf09256a1531 Mon Sep 17 00:00:00 2001
From: Michael Biebl <biebl@debian.org>
Date: Thu, 16 Apr 2015 13:56:28 +0200
Subject: [PATCH] manager: pass correct errno to strerror()
have_ask_password contains negative error values which have to be
negated when being passed to strerror().
---
src/core/manager.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/manager.c b/src/core/manager.c
index 47e23ba..06ef376 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -241,7 +241,7 @@ static int manager_dispatch_ask_password_fd(sd_event_source *source,
if (m->have_ask_password < 0)
/* Log error but continue. Negative have_ask_password
* is treated as unknown status. */
- log_error("Failed to list /run/systemd/ask-password: %s", strerror(m->have_ask_password));
+ log_error("Failed to list /run/systemd/ask-password: %s", strerror(-m->have_ask_password));
return 0;
}
--
2.1.4
......@@ -149,6 +149,7 @@ timesyncd-enable-timesyncd-in-virtual-machines.patch
logind-handle-runtime-dir-without-CAP_SYS_ADMIN.patch
sd-bus-create-clean-error-when-a-property-Set-call-w.patch
manager-do-not-print-anything-while-passwords-are-be.patch
manager-pass-correct-errno-to-strerror.patch
## Debian specific patches:
Add-back-support-for-Debian-specific-config-files.patch
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment