Skip to content

Commit

Permalink
🐧 Disable pcrlock for all systemd distros (#2778)
Browse files Browse the repository at this point in the history
  • Loading branch information
Itxaka authored Aug 1, 2024
1 parent ada14c8 commit ca9d256
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions images/Dockerfile.kairos
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,11 @@ RUN rm /etc/machine-id || true
RUN rm /var/lib/dbus/machine-id || true
RUN rm /etc/hostname || true

# Disable the make-policy service that its on by default on some systemd versions
# it creates a pcrlock.json policy that conflicts with our mesurements when trying to enroll it
RUN if [ "$(which-init.sh)" = "systemd" ]; then \
systemctl disable systemd-pcrlock-make-policy || true; \
systemctl mask systemd-pcrlock-make-policy || true; \
journalctl --vacuum-size=1K || true; \
fi

Expand Down
4 changes: 4 additions & 0 deletions images/Dockerfile.kairos-alpine
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,11 @@ RUN rm /etc/machine-id || true
RUN rm /var/lib/dbus/machine-id || true
RUN rm /etc/hostname || true

# Disable the make-policy service that its on by default on some systemd versions
# it creates a pcrlock.json policy that conflicts with our mesurements when trying to enroll it
RUN if [ "$(which-init.sh)" = "systemd" ]; then \
systemctl disable systemd-pcrlock-make-policy || true; \
systemctl mask systemd-pcrlock-make-policy || true; \
journalctl --vacuum-size=1K || true; \
fi

Expand Down
4 changes: 4 additions & 0 deletions images/Dockerfile.kairos-debian
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,11 @@ RUN rm /etc/machine-id || true
RUN rm /var/lib/dbus/machine-id || true
RUN rm /etc/hostname || true

# Disable the make-policy service that its on by default on some systemd versions
# it creates a pcrlock.json policy that conflicts with our mesurements when trying to enroll it
RUN if [ "$(which-init.sh)" = "systemd" ]; then \
systemctl disable systemd-pcrlock-make-policy || true; \
systemctl mask systemd-pcrlock-make-policy || true; \
journalctl --vacuum-size=1K || true; \
fi

Expand Down
4 changes: 4 additions & 0 deletions images/Dockerfile.kairos-opensuse
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,11 @@ RUN rm /etc/machine-id || true
RUN rm /var/lib/dbus/machine-id || true
RUN rm /etc/hostname || true

# Disable the make-policy service that its on by default on some systemd versions
# it creates a pcrlock.json policy that conflicts with our mesurements when trying to enroll it
RUN if [ "$(which-init.sh)" = "systemd" ]; then \
systemctl disable systemd-pcrlock-make-policy || true; \
systemctl mask systemd-pcrlock-make-policy || true; \
journalctl --vacuum-size=1K || true; \
fi

Expand Down
4 changes: 4 additions & 0 deletions images/Dockerfile.kairos-rhel
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,11 @@ RUN rm /etc/machine-id || true
RUN rm /var/lib/dbus/machine-id || true
RUN rm /etc/hostname || true

# Disable the make-policy service that its on by default on some systemd versions
# it creates a pcrlock.json policy that conflicts with our mesurements when trying to enroll it
RUN if [ "$(which-init.sh)" = "systemd" ]; then \
systemctl disable systemd-pcrlock-make-policy || true; \
systemctl mask systemd-pcrlock-make-policy || true; \
journalctl --vacuum-size=1K || true; \
fi

Expand Down
4 changes: 4 additions & 0 deletions images/Dockerfile.kairos-ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,11 @@ RUN rm /etc/machine-id || true
RUN rm /var/lib/dbus/machine-id || true
RUN rm /etc/hostname || true

# Disable the make-policy service that its on by default on some systemd versions
# it creates a pcrlock.json policy that conflicts with our mesurements when trying to enroll it
RUN if [ "$(which-init.sh)" = "systemd" ]; then \
systemctl disable systemd-pcrlock-make-policy || true; \
systemctl mask systemd-pcrlock-make-policy || true; \
journalctl --vacuum-size=1K || true; \
fi

Expand Down

0 comments on commit ca9d256

Please sign in to comment.