diff options
author | Jan Janssen <medhefgo@web.de> | 2022-02-18 19:38:09 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-02-19 10:15:38 +0100 |
commit | b7de9651db7bdbb42befa653791980daa50448bb (patch) | |
tree | f1b109e1183039ba801ef6fe3a1932a3aaf1dd5d /src/shared/generator.c | |
parent | Merge pull request #22546 from poettering/resolved-bus-error-reply-rework (diff) | |
download | systemd-b7de9651db7bdbb42befa653791980daa50448bb.tar.xz systemd-b7de9651db7bdbb42befa653791980daa50448bb.zip |
generator: Rename password arg
This function does not expect a password, but a key file path. The
cryptsetup helper binary even calls it that.
No Code changes.
Follow up on: 6e41f4dd916293f35d7d35cea7eed1807d7ea771
Fixes: https://github.com/systemd/systemd/security/code-scanning/81
Diffstat (limited to '')
-rw-r--r-- | src/shared/generator.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/shared/generator.c b/src/shared/generator.c index 014b34747d..ca66673d84 100644 --- a/src/shared/generator.c +++ b/src/shared/generator.c @@ -616,10 +616,10 @@ int generator_write_cryptsetup_service_section( FILE *f, const char *name, const char *what, - const char *password, + const char *key_file, const char *options) { - _cleanup_free_ char *name_escaped = NULL, *what_escaped = NULL, *password_escaped = NULL, *options_escaped = NULL; + _cleanup_free_ char *name_escaped = NULL, *what_escaped = NULL, *key_file_escaped = NULL, *options_escaped = NULL; assert(f); assert(name); @@ -633,9 +633,9 @@ int generator_write_cryptsetup_service_section( if (!what_escaped) return log_oom(); - if (password) { - password_escaped = specifier_escape(password); - if (!password_escaped) + if (key_file) { + key_file_escaped = specifier_escape(key_file); + if (!key_file_escaped) return log_oom(); } @@ -655,7 +655,7 @@ int generator_write_cryptsetup_service_section( "OOMScoreAdjust=500\n" /* Unlocking can allocate a lot of memory if Argon2 is used */ "ExecStart=" SYSTEMD_CRYPTSETUP_PATH " attach '%s' '%s' '%s' '%s'\n" "ExecStop=" SYSTEMD_CRYPTSETUP_PATH " detach '%s'\n", - name_escaped, what_escaped, strempty(password_escaped), strempty(options_escaped), + name_escaped, what_escaped, strempty(key_file_escaped), strempty(options_escaped), name_escaped); return 0; |