firstboot: don't create/modify passwd and shadow if not asked
This commit is contained in:
parent
3d3d6e10da
commit
67d5d9d5ce
|
@ -815,6 +815,10 @@ static int process_root_args(void) {
|
|||
* files. */
|
||||
if ((laccess(etc_passwd, F_OK) >= 0 || laccess(etc_shadow, F_OK) >= 0) && !arg_force)
|
||||
return 0;
|
||||
/* Don't create/modify passwd and shadow if not asked */
|
||||
if (!(arg_root_password || arg_prompt_root_password || arg_copy_root_password || arg_delete_root_password ||
|
||||
arg_root_shell || arg_prompt_root_shell || arg_copy_root_shell))
|
||||
return 0;
|
||||
|
||||
(void) mkdir_parents(etc_passwd, 0755);
|
||||
|
||||
|
|
Loading…
Reference in a new issue