Skip to content

Commit 2b90a9d

Browse files
committed
mktemp as root, so SELinux allows root to write to the file
1 parent ed5a627 commit 2b90a9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

usr/lib/tik/lib/tik-functions

+1-1
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ reread_partitiontable() {
336336

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

0 commit comments

Comments
 (0)