chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
journal-remote: fix client_cert memory leak
[elogind.git]
/
src
/
cryptsetup
/
cryptsetup.c
diff --git
a/src/cryptsetup/cryptsetup.c
b/src/cryptsetup/cryptsetup.c
index e6b37acb8620bc1da130fa1cffb05d7ae43ca488..3f613d9b6572aa0056eb9c66563cdc4524b6a250 100644
(file)
--- a/
src/cryptsetup/cryptsetup.c
+++ b/
src/cryptsetup/cryptsetup.c
@@
-295,7
+295,7
@@
static int get_password(const char *name, usec_t until, bool accept_cached, char
if (!escaped_name)
return log_oom();
if (!escaped_name)
return log_oom();
- id = str
append
a("cryptsetup:", escaped_name);
+ id = str
join
a("cryptsetup:", escaped_name);
r = ask_password_auto(text, "drive-harddisk", id, until, accept_cached, passwords);
if (r < 0)
r = ask_password_auto(text, "drive-harddisk", id, until, accept_cached, passwords);
if (r < 0)
@@
-309,7
+309,7
@@
static int get_password(const char *name, usec_t until, bool accept_cached, char
if (asprintf(&text, "Please enter passphrase for disk %s! (verification)", name) < 0)
return log_oom();
if (asprintf(&text, "Please enter passphrase for disk %s! (verification)", name) < 0)
return log_oom();
- id = str
append
a("cryptsetup-verification:", escaped_name);
+ id = str
join
a("cryptsetup-verification:", escaped_name);
r = ask_password_auto(text, "drive-harddisk", id, until, false, &passwords2);
if (r < 0)
r = ask_password_auto(text, "drive-harddisk", id, until, false, &passwords2);
if (r < 0)
@@
-624,7
+624,7
@@
int main(int argc, char *argv[]) {
/* Ideally we'd do this on the open fd, but since this is just a
* warning it's OK to do this in two steps. */
/* Ideally we'd do this on the open fd, but since this is just a
* warning it's OK to do this in two steps. */
- if (stat(key_file, &st) >= 0 && (st.st_mode & 0005))
+ if (stat(key_file, &st) >= 0 &&
S_ISREG(st.st_mode) &&
(st.st_mode & 0005))
log_warning("Key file %s is world-readable. This is not a good idea!", key_file);
}
log_warning("Key file %s is world-readable. This is not a good idea!", key_file);
}