chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
core: move abstract namespace sockets to /dev/.run
[elogind.git]
/
src
/
ask-password-api.c
diff --git
a/src/ask-password-api.c
b/src/ask-password-api.c
index dd54fb6abf22a0680f0849b67fd31f138a5a180a..0b2e9ad84810749553c46a3556c615f0de88ee07 100644
(file)
--- a/
src/ask-password-api.c
+++ b/
src/ask-password-api.c
@@
-179,8
+179,6
@@
int ask_password_tty(
}
}
}
}
- if (ttyfd >= 0)
-
passphrase[p] = 0;
if (!(*_passphrase = strdup(passphrase))) {
passphrase[p] = 0;
if (!(*_passphrase = strdup(passphrase))) {
@@
-225,7
+223,7
@@
static int create_socket(char **name) {
zero(sa);
sa.un.sun_family = AF_UNIX;
zero(sa);
sa.un.sun_family = AF_UNIX;
- snprintf(sa.un.sun_path, sizeof(sa.un.sun_path)-1, "/dev/.systemd/ask-password/sck.%llu", random_ull());
+ snprintf(sa.un.sun_path, sizeof(sa.un.sun_path)-1, "/dev/.
run/
systemd/ask-password/sck.%llu", random_ull());
if (bind(fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + strlen(sa.un.sun_path)) < 0) {
r = -errno;
if (bind(fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + strlen(sa.un.sun_path)) < 0) {
r = -errno;
@@
-267,7
+265,7
@@
int ask_password_agent(
_FD_MAX
};
_FD_MAX
};
- char temp[] = "/dev/.systemd/ask-password/tmp.XXXXXX";
+ char temp[] = "/dev/.
run/
systemd/ask-password/tmp.XXXXXX";
char final[sizeof(temp)] = "";
int fd = -1, r;
FILE *f = NULL;
char final[sizeof(temp)] = "";
int fd = -1, r;
FILE *f = NULL;
@@
-278,7
+276,7
@@
int ask_password_agent(
assert(_passphrases);
assert(_passphrases);
- mkdir_p("/dev/.systemd/ask-password", 0755);
+ mkdir_p("/dev/.
run/
systemd/ask-password", 0755);
if ((fd = mkostemp(temp, O_CLOEXEC|O_CREAT|O_WRONLY)) < 0) {
log_error("Failed to create password file: %m");
if ((fd = mkostemp(temp, O_CLOEXEC|O_CREAT|O_WRONLY)) < 0) {
log_error("Failed to create password file: %m");