mirror of
https://github.com/systemd/systemd.git
synced 2025-03-08 08:58:27 +03:00
repart: warn about world writable key files
We have easy support for this, hence use it for privileged key data.
This commit is contained in:
parent
ae9cf30b2f
commit
8b3c3a4973
@ -3621,7 +3621,11 @@ static int parse_argv(int argc, char *argv[]) {
|
||||
_cleanup_(erase_and_freep) char *k = NULL;
|
||||
size_t n = 0;
|
||||
|
||||
r = read_full_file_full(AT_FDCWD, optarg, READ_FULL_FILE_SECURE|READ_FULL_FILE_CONNECT_SOCKET, NULL, &k, &n);
|
||||
r = read_full_file_full(
|
||||
AT_FDCWD, optarg,
|
||||
READ_FULL_FILE_SECURE|READ_FULL_FILE_WARN_WORLD_READABLE|READ_FULL_FILE_CONNECT_SOCKET,
|
||||
NULL,
|
||||
&k, &n);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to read key file '%s': %m", optarg);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user