summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoruser <user@localhost>2019-04-28 17:43:19 +0200
committeruser <user@localhost>2019-04-28 17:43:19 +0200
commit371e075cb93729ed2beb256c271dbd86ec3fb3cc (patch)
treeec1b729013cfce7f64701018c90304687c4d7246
parenta3a442e77deb60c798542b3654b57a24de278a29 (diff)
parentb111137caf01c84e15db39f82799e68a044b76f1 (diff)
Merge branch 'bugfix/16568-more-robust-backup' (Closes: #16461)
-rw-r--r--lib/Tails/Persistence/Configuration/ConfigFile.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Tails/Persistence/Configuration/ConfigFile.pm b/lib/Tails/Persistence/Configuration/ConfigFile.pm
index aebff9e..6fc63eb 100644
--- a/lib/Tails/Persistence/Configuration/ConfigFile.pm
+++ b/lib/Tails/Persistence/Configuration/ConfigFile.pm
@@ -96,6 +96,11 @@ Copy the on-disk configuration file to a backup file.
method backup () {
$self->config_file_path->copy($self->backup_config_file_path);
$self->backup_config_file_path->chmod(0600);
+ # Ensure our changes land on the disk
+ systemx('sync', $self->backup_config_file_path->stringify);
+ # Ensure changes made elsewhere are written synchronously on the disk
+ # (in case something else ever needs to modify this file)
+ systemx('chattr', '+S', $self->backup_config_file_path->stringify);
}
=head2 save