Skip to content

Commit 80f80ef

Browse files
committed
wip
1 parent 956d069 commit 80f80ef

File tree

1 file changed

+7
-19
lines changed

1 file changed

+7
-19
lines changed

image/rhel/static-bin/import-additional-cas

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,10 @@ copy_existing /usr/local/share/ca-certificates
2424
copy_existing /etc/pki/injected-ca-trust
2525

2626

27-
# TODO(DO NOT MERGE): We can't override `/etc/pki/ca-trust/extracted` because
28-
# some of the files don't have the write permission bit set.
29-
# TODO(DO NOT MERGE): If we don't care about the warning, this can be
30-
# [ ! -e "/etc/pki/ca-trust/extracted" ] || \
31-
# update-ca-trust extract --output /etc/pki/ca-trust/extracted
32-
if [ -e "/etc/pki/ca-trust/extracted" ]; then
33-
# TODO(DO NOT MERGE): The sensor deployment calls this script twice (once
34-
# during an init container and another when the main container strats),
35-
# which means this warning will always be logged in the current sensor
36-
# deployments.
37-
echo >&2 "Warning: CA trust list already configured. Can't overwrite."
38-
else
39-
# TODO(DO NOT MERGE): For some reason, without the `--output` flag,
40-
# `update-ca-trust` expects `/etc/pki/ca-trust/extracted` to have all the
41-
# necessary directories created. However, if run with the `--output` flag,
42-
# it'll create the directories :shrug:. Figure out why.
43-
# Possible thread to pull on: https://bugzilla.redhat.com/show_bug.cgi?id=2241240
44-
update-ca-trust extract --output /etc/pki/ca-trust/extracted
45-
fi
27+
# update-ca-trust runs `chmod u-w "$DEST/pem/directory-hash"` at the end. Add
28+
# it back before running update-ca-trust again. Currently only relevant to
29+
# sensor.
30+
[ -d "/etc/pki/ca-trust/extracted/pem/directory-hash" ] && chmod u+w "/etc/pki/ca-trust/extracted/pem/directory-hash"
31+
# update-ca-trust will create the necessary directories if the `--output` flag
32+
# is used.
33+
update-ca-trust extract --output /etc/pki/ca-trust/extracted

0 commit comments

Comments
 (0)