]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
firstboot: Don't check twice if /etc/shadow exists
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 21 May 2020 18:31:55 +0000 (20:31 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 27 May 2020 16:54:25 +0000 (18:54 +0200)
src/firstboot/firstboot.c

index f9fdf7b1d7fc67c755856b81953018e37e1eb627..760014588e8f12d55fbaf668358d18c031126263 100644 (file)
@@ -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');