Skip to content

Commit

Permalink
Allow certain snapshots to be labeled snapperd_data_t
Browse files Browse the repository at this point in the history
  • Loading branch information
rfan1 committed Nov 28, 2024
1 parent c64b098 commit e900d9b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/y2snapper_common.pm
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ It allows to have more control over diffs amongs snapshots.

sub y2snapper_adding_new_snapper_conf {
assert_script_run("btrfs subvolume create /test");
# we only allow certain snapshots to be labeled snapperd_data_t, see poo#168583
assert_script_run("semanage fcontext -a -t 'snapperd_data_t' -s system_u '/test(/.*)?'") if has_selinux;
assert_script_run("snapper -c test create-config /test");
assert_script_run('snapper -c test set-config TIMELINE_CREATE=no TIMELINE_MIN_AGE=0');
assert_script_run('snapper -c test get-config');
Expand Down

0 comments on commit e900d9b

Please sign in to comment.