SHA256
1
0
forked from pool/systemd
systemd/0003-tty-ask-password-agent-return-negative-errno.patch
Stephan Kulow d4886680e8 Accepting request 229352 from Base:System
- Add patch portmap-wants-rpcbind-socket.patch to make sure that
  rpcbind socket as well as service is up with the target
- Add or port upstram bugfix patches:
  0001-journal-fix-export-of-messages-containing-newlines.patch
  0002-systemctl-update-NAME-to-PATTERN-in-help.patch
  0003-tty-ask-password-agent-return-negative-errno.patch
  0004-systemd-python-use-.hex-instead-of-.get_hex.patch
  0005-systemd-python-fix-failing-assert.patch

- Add patch portmap-wants-rpcbind-socket.patch to make sure that
  rpcbind socket as well as service is up with the target
- Add or port upstram bugfix patches:
  0001-journal-fix-export-of-messages-containing-newlines.patch
  0002-systemctl-update-NAME-to-PATTERN-in-help.patch
  0003-tty-ask-password-agent-return-negative-errno.patch
  0004-systemd-python-use-.hex-instead-of-.get_hex.patch
  0005-systemd-python-fix-failing-assert.patch

OBS-URL: https://build.opensuse.org/request/show/229352
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=180
2014-04-09 16:17:19 +00:00

30 lines
1.1 KiB
Diff

From ee0e4cca5ac37a094dfe1074907dae70c7b7701c Mon Sep 17 00:00:00 2001
From: Florian Albrechtskirchinger <falbrechtskirchinger@gmail.com>
Date: Thu, 3 Apr 2014 21:17:20 +0200
Subject: [PATCH] tty-ask-password-agent: return negative errno
Return negative errno in wall_tty_block(). get_ctty_devnr() already
returns a negative errno in case of failure, no need to negate it again.
Reported-by: Simon <hwold@odai.homelinux.net>
---
.../tty-ask-password-agent.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git src/tty-ask-password-agent/tty-ask-password-agent.c src/tty-ask-password-agent/tty-ask-password-agent.c
index 1d067af..3203474 100644
--- src/tty-ask-password-agent/tty-ask-password-agent.c
+++ src/tty-ask-password-agent/tty-ask-password-agent.c
@@ -432,7 +432,7 @@ static int wall_tty_block(void) {
r = get_ctty_devnr(0, &devnr);
if (r < 0)
- return -r;
+ return r;
if (asprintf(&p, "/run/systemd/ask-password-block/%u:%u", major(devnr), minor(devnr)) < 0)
return -ENOMEM;
--
1.7.9.2