Skip to content

Commit

Permalink
init: builtins: don't wipe data when set policy fails
Browse files Browse the repository at this point in the history
Happens when using a new FBE container with existing data.
(Maybe also when re-using an old container with wiped data)

Change-Id: I9202c04cd7e0a9bb201617d9bcb05116d7f6c16d
Signed-off-by: Simao Gomes Viana <xdevs23@outlook.com>
  • Loading branch information
Simao Gomes Viana committed Nov 13, 2019
1 parent 37c1bbf commit 301f465
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion init/builtins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ static Result<Success> do_mkdir(const BuiltinArguments& args) {
if (fscrypt_is_native()) {
if (fscrypt_set_directory_policy(args[1].c_str())) {
return reboot_into_recovery(
{"--prompt_and_wipe_data", "--reason=set_policy_failed:"s + args[1]});
{"--reason=set_policy_failed:"s + args[1]});
}
}
return Success();
Expand Down

0 comments on commit 301f465

Please sign in to comment.