File tree Expand file tree Collapse file tree 6 files changed +75
-3
lines changed Expand file tree Collapse file tree 6 files changed +75
-3
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,11 @@ RUN <<EOF
44
44
set -eux
45
45
46
46
systemctl enable systemd-networkd
47
- semanage permissive -a systemd_gpt_generator_t # for volatile-root workaround
47
+
48
+ checkmodule -M -m -o /etc/composefs_workarounds.mod /etc/composefs_workarounds.te
49
+ semodule_package -o /etc/composefs_workarounds.pp -m /etc/composefs_workarounds.mod
50
+ semodule -i /etc/composefs_workarounds.pp
51
+
48
52
passwd -d root
49
53
mkdir /sysroot
50
54
EOF
Original file line number Diff line number Diff line change
1
+ module composefs_workarounds 1 .0 ;
2
+
3
+ require {
4
+ type sshd_t;
5
+ type tmpfs_t;
6
+ type systemd_gpt_generator_t;
7
+ type init_var_run_t;
8
+ class file read;
9
+ class file open;
10
+ class file getattr;
11
+ class lnk_file read;
12
+ }
13
+
14
+ # https://bugzilla.redhat.com/show_bug.cgi?id=2374928
15
+ allow sshd_t tmpfs_t:file open;
16
+ allow sshd_t tmpfs_t:file getattr;
17
+ allow sshd_t tmpfs_t:file read;
18
+
19
+ # for volatile-root workaround
20
+ allow systemd_gpt_generator_t init_var_run_t:lnk_file read;
Original file line number Diff line number Diff line change @@ -28,7 +28,11 @@ RUN <<EOF
28
28
set -eux
29
29
30
30
systemctl enable systemd-networkd
31
- semanage permissive -a systemd_gpt_generator_t # for volatile-root workaround
31
+
32
+ checkmodule -M -m -o /etc/composefs_workarounds.mod /etc/composefs_workarounds.te
33
+ semodule_package -o /etc/composefs_workarounds.pp -m /etc/composefs_workarounds.mod
34
+ semodule -i /etc/composefs_workarounds.pp
35
+
32
36
passwd -d root
33
37
mkdir /sysroot
34
38
EOF
Original file line number Diff line number Diff line change
1
+ module composefs_workarounds 1 .0 ;
2
+
3
+ require {
4
+ type sshd_t;
5
+ type tmpfs_t;
6
+ type systemd_gpt_generator_t;
7
+ type init_var_run_t;
8
+ class file read;
9
+ class file open;
10
+ class file getattr;
11
+ class lnk_file read;
12
+ }
13
+
14
+ # https://bugzilla.redhat.com/show_bug.cgi?id=2374928
15
+ allow sshd_t tmpfs_t:file open;
16
+ allow sshd_t tmpfs_t:file getattr;
17
+ allow sshd_t tmpfs_t:file read;
18
+
19
+ # for volatile-root workaround
20
+ allow systemd_gpt_generator_t init_var_run_t:lnk_file read;
Original file line number Diff line number Diff line change @@ -26,7 +26,11 @@ RUN <<EOF
26
26
set -eux
27
27
28
28
systemctl enable systemd-networkd
29
- semanage permissive -a systemd_gpt_generator_t # for volatile-root workaround
29
+
30
+ checkmodule -M -m -o /etc/composefs_workarounds.mod /etc/composefs_workarounds.te
31
+ semodule_package -o /etc/composefs_workarounds.pp -m /etc/composefs_workarounds.mod
32
+ semodule -i /etc/composefs_workarounds.pp
33
+
30
34
passwd -d root
31
35
mkdir /sysroot
32
36
EOF
Original file line number Diff line number Diff line change
1
+ module composefs_workarounds 1 .0 ;
2
+
3
+ require {
4
+ type sshd_t;
5
+ type tmpfs_t;
6
+ type systemd_gpt_generator_t;
7
+ type init_var_run_t;
8
+ class file read;
9
+ class file open;
10
+ class file getattr;
11
+ class lnk_file read;
12
+ }
13
+
14
+ # https://bugzilla.redhat.com/show_bug.cgi?id=2374928
15
+ allow sshd_t tmpfs_t:file open;
16
+ allow sshd_t tmpfs_t:file getattr;
17
+ allow sshd_t tmpfs_t:file read;
18
+
19
+ # for volatile-root workaround
20
+ allow systemd_gpt_generator_t init_var_run_t:lnk_file read;
You can’t perform that action at this time.
0 commit comments