summaryrefslogtreecommitdiff
path: root/src/tty-ask-password-agent.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-11-16 03:12:54 +0100
committerLennart Poettering <lennart@poettering.net>2010-11-16 03:12:54 +0100
commit967072694d4ebb1b7c5989b92aa71af48954a975 (patch)
tree219e7c279f66c6409195c418468c314f9f086d76 /src/tty-ask-password-agent.c
parent180f90cb13ffbf8e6269ec3afb24243fec936e0c (diff)
plymouth: use updated socket name
Diffstat (limited to 'src/tty-ask-password-agent.c')
-rw-r--r--src/tty-ask-password-agent.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/tty-ask-password-agent.c b/src/tty-ask-password-agent.c
index 1d17e2289e..d389c98a48 100644
--- a/src/tty-ask-password-agent.c
+++ b/src/tty-ask-password-agent.c
@@ -80,9 +80,9 @@ static int ask_password_plymouth(const char *message, usec_t until, const char *
zero(sa);
sa.sa.sa_family = AF_UNIX;
- strncpy(sa.un.sun_path+1, "/ply-boot-protocol", sizeof(sa.un.sun_path)-1);
-
- if (connect(fd, &sa.sa, sizeof(sa.un)) < 0) {
+ strncpy(sa.un.sun_path+1, "/org/freedesktop/plymouthd", sizeof(sa.un.sun_path)-1);
+ if (connect(fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + 1 + strlen(sa.un.sun_path+1)) < 0) {
+ log_error("FIALED TO CONNECT: %m");
r = -errno;
goto finish;
}
@@ -481,7 +481,7 @@ static int watch_passwords(void) {
for (;;) {
if ((r = show_passwords()) < 0)
- break;
+ goto finish;
if (poll(pollfd, _FD_MAX, -1) < 0) {
@@ -614,6 +614,9 @@ int main(int argc, char *argv[]) {
else
r = show_passwords();
+ if (r < 0)
+ log_error("Error: %s", strerror(-r));
+
finish:
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
}