summaryrefslogtreecommitdiff
path: root/src/shared/spawn-ask-password-agent.c
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2015-10-07 15:32:42 +0200
committerDaniel Mack <github@zonque.org>2015-10-07 15:32:42 +0200
commit79bec997c911be7c903db9f7e5d07ab2cd303ed7 (patch)
tree1e6e62138a8920a3210b8063157612b484efbea6 /src/shared/spawn-ask-password-agent.c
parentf74431288aec78ffdd05be9a519eab3dbe1c4f81 (diff)
parente287086b8aa2558356af225a12d9bfea8e7d61ca (diff)
Merge pull request #1484 from poettering/ask-pass-kernel-keyring
cache harddisk passwords in the kernel keyring
Diffstat (limited to 'src/shared/spawn-ask-password-agent.c')
-rw-r--r--src/shared/spawn-ask-password-agent.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/shared/spawn-ask-password-agent.c b/src/shared/spawn-ask-password-agent.c
index 70466d17e5..29db855c67 100644
--- a/src/shared/spawn-ask-password-agent.c
+++ b/src/shared/spawn-ask-password-agent.c
@@ -19,13 +19,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <signal.h>
#include <stdlib.h>
#include <unistd.h>
-#include <signal.h>
#include "log.h"
-#include "util.h"
#include "process-util.h"
+#include "util.h"
#include "spawn-ask-password-agent.h"
static pid_t agent_pid = 0;
@@ -46,9 +46,9 @@ int ask_password_agent_open(void) {
SYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH,
SYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH, "--watch", NULL);
if (r < 0)
- log_error_errno(r, "Failed to fork TTY ask password agent: %m");
+ return log_error_errno(r, "Failed to fork TTY ask password agent: %m");
- return r;
+ return 1;
}
void ask_password_agent_close(void) {
@@ -57,8 +57,8 @@ void ask_password_agent_close(void) {
return;
/* Inform agent that we are done */
- kill(agent_pid, SIGTERM);
- kill(agent_pid, SIGCONT);
+ (void) kill(agent_pid, SIGTERM);
+ (void) kill(agent_pid, SIGCONT);
(void) wait_for_terminate(agent_pid, NULL);
agent_pid = 0;
}