From: Daan De Meyer Date: Thu, 21 May 2020 18:31:55 +0000 (+0200) Subject: firstboot: Don't check twice if /etc/shadow exists X-Git-Tag: v246-rc1~264^2~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1fbc95d3881390e0e86af07e9c9fece32377535d;p=thirdparty%2Fsystemd.git firstboot: Don't check twice if /etc/shadow exists --- diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c index f9fdf7b1d7f..760014588e8 100644 --- a/src/firstboot/firstboot.c +++ b/src/firstboot/firstboot.c @@ -533,7 +533,7 @@ static int process_machine_id(void) { } static int prompt_root_password(void) { - const char *msg1, *msg2, *etc_shadow; + const char *msg1, *msg2; int r; if (arg_root_password) @@ -542,10 +542,6 @@ static int prompt_root_password(void) { if (!arg_prompt_root_password) return 0; - etc_shadow = prefix_roota(arg_root, "/etc/shadow"); - if (laccess(etc_shadow, F_OK) >= 0) - return 0; - print_welcome(); putchar('\n');