From 1fbc95d3881390e0e86af07e9c9fece32377535d Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Thu, 21 May 2020 20:31:55 +0200 Subject: [PATCH] firstboot: Don't check twice if /etc/shadow exists --- src/firstboot/firstboot.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c index f9fdf7b1d7..760014588e 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');