Skip to content

Commit

Permalink
mktemp as root, so SELinux allows root to write to the file
Browse files Browse the repository at this point in the history
  • Loading branch information
sysrich committed Nov 6, 2024
1 parent ed5a627 commit 2b90a9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion usr/lib/tik/lib/tik-functions
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ reread_partitiontable() {

create_keyfile() {
# Even if there's no partitions using encryption, systemd-repart will need a key-file defined for the --key-file parameter.
tik_keyfile=$(mktemp /tmp/tik.XXXXXXXXXX)
tik_keyfile=$(prun mktemp /tmp/tik.XXXXXXXXXX)
log "[create_keyfile] Creating keyfile ${tik_keyfile}"
prun /usr/bin/dd bs=512 count=4 if=/dev/urandom of=${tik_keyfile} iflag=fullblock
prun /usr/bin/chmod 400 ${tik_keyfile}
Expand Down

0 comments on commit 2b90a9d

Please sign in to comment.