Skip to content

Commit 372b9a5

Browse files
BownairoNikolaMilosa
authored andcommitted
Revert "feat: [NODE-1441] Upgrade GuestOS to 24.04 (#938)"
This reverts commit 87ed927.
1 parent 8822742 commit 372b9a5

File tree

16 files changed

+29
-47
lines changed

16 files changed

+29
-47
lines changed

ic-os/components/early-boot/relabel-machine-id/guestos/relabel-machine-id.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22

33
# machine-id is set up in initramfs and bind-mounted over to the rootfs. Since
44
# policy is not loaded in initramfs yet, it has wrong security context.
5-
systemd-machine-id-setup --commit
65
restorecon -v /etc/machine-id

ic-os/components/early-boot/relabel-machine-id/relabel-machine-id.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@
44
# over to the rootfs. Since policy is not loaded in initramfs yet, it has
55
# wrong security context. Fix this up, but ignore failures (this will not
66
# work on first boot).
7-
systemd-machine-id-setup --commit
87
restorecon -v /etc/machine-id || true

ic-os/components/init/bootstrap-ic-node/bootstrap-ic-node.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ while [ ! -f /boot/config/CONFIGURED ]; do
174174
fi
175175

176176
# Fix up permissions. This is actually the wrong place.
177-
chown ic-replica:nogroup -R /var/lib/ic/data
177+
chown ic-replica.nogroup -R /var/lib/ic/data
178178

179179
if [ "${DEV}" != "" ]; then
180180
umount /mnt

ic-os/components/init/setup-encryption/setup-encryption.service

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ Description=Set up encrypted storage on first boot
33
DefaultDependencies=no
44
After=boot-config.mount
55
Requires=boot-config.mount
6-
Before=cryptsetup-pre.target
7-
Wants=cryptsetup-pre.target
6+
Before=systemd-cryptsetup@vda10\x2dcrypt.service
87

98
[Install]
109
WantedBy=local-fs.target
10+
RequiredBy=systemd-cryptsetup@vda10\x2dcrypt.service
1111

1212
[Service]
1313
Type=oneshot
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
vda10-crypt /dev/vda10 /boot/config/store.keyfile luks,discard
1+
vda10-crypt /dev/vda10 /boot/config/store.keyfile luks2,discard

ic-os/components/networking/generate-network-config/guestos/generate-network-config.service

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[Unit]
22
Description=Generate network config
33
After=bootstrap-ic-node.service
4-
Requires=bootstrap-ic-node.service
54
Before=systemd-networkd.service
65

76
[Install]

ic-os/components/selinux/filebeat/filebeat.te

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ init_daemon_domain(filebeat_t, filebeat_exec_t)
4141
# Allow filebeat to perform its primary function, namely to read
4242
# the journal files.
4343
systemd_read_journal_files(filebeat_t)
44-
systemd_watch_journal_dirs(filebeat_t)
4544

4645
# It wants to send the logs to remote host, allow unrestricted TCP for
4746
# this for now. Maybe this can be reasonably constrained more tightly.
@@ -57,7 +56,6 @@ corenet_all_recvfrom_unlabeled(filebeat_t)
5756

5857
# Read generic etc files (e.g. nsswitch.conf)
5958
files_read_etc_files(filebeat_t)
60-
files_read_etc_runtime_files(filebeat_t)
6159

6260
# Read CA certificate
6361
miscfiles_read_generic_certs(filebeat_t)
@@ -126,7 +124,6 @@ require {
126124
search_dirs_pattern(filebeat_t, bin_t, bin_t)
127125

128126
# Allow to read `/sys/fs/cgroup/unified/system.slice/filebeat.service/cgroup.controllers`
129-
require { type cgroup_t; }
130127
fs_read_cgroup_files(filebeat_t)
131128
allow filebeat_t cgroup_t:dir read;
132129

ic-os/components/selinux/ic-node/ic-node.te

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,6 @@ allow ic_canister_sandbox_t ic_canister_mem_t : file { map read write getattr };
322322
allow ic_replica_t ic_canister_mem_t : file { map read write getattr };
323323

324324
# Wants to read its own control group. Should deny that.
325-
require { type cgroup_t; }
326325
dontaudit ic_canister_sandbox_t cgroup_t : dir { search };
327326
dontaudit ic_canister_sandbox_t cgroup_t : file { open read getattr };
328327

ic-os/components/selinux/manageboot/manageboot.te

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ application_domain(ic_manageboot_t, ic_manageboot_exec_t)
2222
# write upgrades into partition). Allow entering sudo, and return
2323
# to the original domain when sudo re-executes the script (so
2424
# it is now running same domain, but with root privileges).
25-
sudo_role_template(ic_manageboot, ic_manageboot_t, ic_manageboot_exec_t, system_r)
25+
sudo_role_template(ic_manageboot, system_r, ic_manageboot_t)
2626
domtrans_pattern(ic_manageboot_sudo_t, ic_manageboot_exec_t, ic_manageboot_t)
2727
# Under certain circumstances, sudo signals its children.
2828
allow ic_manageboot_sudo_t ic_manageboot_t : process { signal };
@@ -123,7 +123,7 @@ allow ic_manageboot_t ic_manageboot_t : unix_stream_socket { connect create geta
123123
# Allow searching runtime process directories (/var/run which is symlinked to /run).
124124
# It is not perfectly clear what/why it is doing that, but it is harmless
125125
# enough. May to to forbid it and see if it still works.
126-
files_search_runtime(ic_manageboot_t)
126+
files_search_pids(ic_manageboot_t)
127127

128128
# Allow reading /opt/ic/share/version.txt
129-
read_files_pattern(ic_manageboot_t, usr_t, usr_t)
129+
read_files_pattern(ic_manageboot_t, usr_t, usr_t)

ic-os/components/selinux/misc-fixes/misc-fixes.te

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,12 @@ permissive unconfined_t;
1515
require { type lvm_t; }
1616

1717
# Note that "cryptsetup" is also running as lvm_t.
18-
require { type initrc_t, initrc_runtime_t; }
19-
allow lvm_t initrc_t : sem rw_sem_perms;
2018

2119
# cryptsetup needs to create /run/cryptsetup: This is its lockfile directory to
2220
# track which devices, which is the lockfile directory tracking devices on
2321
# which operations are in progress
24-
require { type var_run_t, initrc_runtime_t; }
22+
require { type var_run_t; }
2523
create_dirs_pattern(lvm_t, var_run_t, var_run_t)
26-
manage_dirs_pattern(lvm_t, initrc_runtime_t, initrc_runtime_t)
27-
manage_files_pattern(lvm_t, initrc_runtime_t, initrc_runtime_t)
2824

2925
# lvm cryptsetup needs to manage its own cryptographic keys
3026
allow lvm_t lvm_t : key manage_key_perms;

0 commit comments

Comments
 (0)