Commit Graph

1 Commits

Author SHA1 Message Date
Jan Černý
09534972e5 Prevent file permissions errors
The sysctl setting fs.protected_regular doesn't allow O_CREAT open
on regular files that we don't own in world writable sticky directories
(think /tmp). This causes permission denied error when writing HTML
report to a temporary files created by the mktemp command executed as
a normal user and then executing sudo oscap.

If OpenSCAP fails to open the file because of permissions, it will retry
to open the file without O_CREAT flag.

Resolves: rhbz#2048571
2022-02-07 09:16:56 +01:00