mirror of
https://github.com/systemd/systemd
synced 2026-03-15 17:44:49 +01:00
Compare commits
No commits in common. "7b5018ca9e6d3279887ec7113818f41d5b831c4d" and "d57e871c60805e3f1f57729ea8022477a611697d" have entirely different histories.
7b5018ca9e
...
d57e871c60
@ -528,13 +528,6 @@
|
||||
prevent typos.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>silent</option></term>
|
||||
|
||||
<listitem><para>If the encryption password is read from console, no asterisks will be shown
|
||||
while typing the password.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>pkcs11-uri=</option></term>
|
||||
|
||||
|
||||
@ -57,7 +57,6 @@ static char *arg_header = NULL;
|
||||
static unsigned arg_tries = 3;
|
||||
static bool arg_readonly = false;
|
||||
static bool arg_verify = false;
|
||||
static bool arg_silent = false;
|
||||
static bool arg_discards = false;
|
||||
static bool arg_same_cpu_crypt = false;
|
||||
static bool arg_submit_from_crypt_cpus = false;
|
||||
@ -234,8 +233,6 @@ static int parse_one_option(const char *option) {
|
||||
arg_readonly = true;
|
||||
else if (streq(option, "verify"))
|
||||
arg_verify = true;
|
||||
else if (streq(option, "silent"))
|
||||
arg_silent = true;
|
||||
else if (STR_IN_SET(option, "allow-discards", "discard"))
|
||||
arg_discards = true;
|
||||
else if (streq(option, "same-cpu-crypt"))
|
||||
@ -542,7 +539,6 @@ static int get_password(
|
||||
_cleanup_strv_free_erase_ char **passwords = NULL;
|
||||
char **p, *id;
|
||||
int r = 0;
|
||||
AskPasswordFlags flags = ASK_PASSWORD_PUSH_CACHE | (arg_silent*ASK_PASSWORD_SILENT);
|
||||
|
||||
assert(vol);
|
||||
assert(src);
|
||||
@ -565,7 +561,7 @@ static int get_password(
|
||||
id = strjoina("cryptsetup:", disk_path);
|
||||
|
||||
r = ask_password_auto(text, "drive-harddisk", id, "cryptsetup", "cryptsetup.passphrase", until,
|
||||
flags | (accept_cached*ASK_PASSWORD_ACCEPT_CACHED),
|
||||
ASK_PASSWORD_PUSH_CACHE | (accept_cached*ASK_PASSWORD_ACCEPT_CACHED),
|
||||
&passwords);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to query password: %m");
|
||||
@ -580,7 +576,7 @@ static int get_password(
|
||||
|
||||
id = strjoina("cryptsetup-verification:", disk_path);
|
||||
|
||||
r = ask_password_auto(text, "drive-harddisk", id, "cryptsetup", "cryptsetup.passphrase", until, flags, &passwords2);
|
||||
r = ask_password_auto(text, "drive-harddisk", id, "cryptsetup", "cryptsetup.passphrase", until, ASK_PASSWORD_PUSH_CACHE, &passwords2);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to query verification password: %m");
|
||||
|
||||
|
||||
@ -364,24 +364,22 @@ int dhcp4_server_configure(Link *link) {
|
||||
|
||||
if (link->network->dhcp_server_emit_timezone) {
|
||||
_cleanup_free_ char *buffer = NULL;
|
||||
const char *tz = NULL;
|
||||
const char *tz;
|
||||
|
||||
if (link->network->dhcp_server_timezone)
|
||||
tz = link->network->dhcp_server_timezone;
|
||||
else {
|
||||
r = get_timezone(&buffer);
|
||||
if (r < 0)
|
||||
log_link_warning_errno(link, r, "Failed to determine timezone, not sending timezone: %m");
|
||||
else
|
||||
return log_link_error_errno(link, r, "Failed to determine timezone: %m");
|
||||
|
||||
tz = buffer;
|
||||
}
|
||||
|
||||
if (tz) {
|
||||
r = sd_dhcp_server_set_timezone(link->dhcp_server, tz);
|
||||
if (r < 0)
|
||||
return log_link_error_errno(link, r, "Failed to set timezone for DHCP server: %m");
|
||||
}
|
||||
}
|
||||
|
||||
ORDERED_HASHMAP_FOREACH(p, link->network->dhcp_server_send_options) {
|
||||
r = sd_dhcp_server_add_option(link->dhcp_server, p);
|
||||
|
||||
@ -799,14 +799,12 @@ int ask_password_agent(
|
||||
"Socket=%s\n"
|
||||
"AcceptCached=%i\n"
|
||||
"Echo=%i\n"
|
||||
"NotAfter="USEC_FMT"\n"
|
||||
"Silent=%i\n",
|
||||
"NotAfter="USEC_FMT"\n",
|
||||
getpid_cached(),
|
||||
socket_name,
|
||||
(flags & ASK_PASSWORD_ACCEPT_CACHED) ? 1 : 0,
|
||||
(flags & ASK_PASSWORD_ECHO) ? 1 : 0,
|
||||
until,
|
||||
(flags & ASK_PASSWORD_SILENT) ? 1 : 0);
|
||||
until);
|
||||
|
||||
if (message)
|
||||
fprintf(f, "Message=%s\n", message);
|
||||
|
||||
@ -169,7 +169,7 @@ static int agent_ask_password_tty(
|
||||
|
||||
static int process_one_password_file(const char *filename) {
|
||||
_cleanup_free_ char *socket_name = NULL, *message = NULL;
|
||||
bool accept_cached = false, echo = false, silent = false;
|
||||
bool accept_cached = false, echo = false;
|
||||
uint64_t not_after = 0;
|
||||
unsigned pid = 0;
|
||||
|
||||
@ -180,7 +180,6 @@ static int process_one_password_file(const char *filename) {
|
||||
{ "Ask", "PID", config_parse_unsigned, 0, &pid },
|
||||
{ "Ask", "AcceptCached", config_parse_bool, 0, &accept_cached },
|
||||
{ "Ask", "Echo", config_parse_bool, 0, &echo },
|
||||
{ "Ask", "Silent", config_parse_bool, 0, &silent },
|
||||
{}
|
||||
};
|
||||
|
||||
@ -240,7 +239,6 @@ static int process_one_password_file(const char *filename) {
|
||||
SET_FLAG(flags, ASK_PASSWORD_ACCEPT_CACHED, accept_cached);
|
||||
SET_FLAG(flags, ASK_PASSWORD_CONSOLE_COLOR, arg_console);
|
||||
SET_FLAG(flags, ASK_PASSWORD_ECHO, echo);
|
||||
SET_FLAG(flags, ASK_PASSWORD_SILENT, silent);
|
||||
|
||||
if (arg_plymouth)
|
||||
r = ask_password_plymouth(message, not_after, flags, filename, &passwords);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user