Set correct ownership if qb_ipcs_connection_auth_set() has been used #381
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
qb_ipcs_connection_auth_set
is used, the ownership of the temporary directory that is initially set inhandle_new_connection
must be updated as well, so do this at the beginning ofqb_ipcs_shm_connect
.This pull request fixes USBGuard/usbguard#289: when running USBGuard without the
CAP_DAC_OVERRIDE
capability (as done by the provided system service or by runningusbguard-daemon -C
to drop unnecessary capabilities), the temporary directory cannot be accessed because its group ownership is set to the user of the IPC client despite USBGuard usingqb_ipcs_connection_auth_set(conn, uid, 0, 0660)
to set the gid to root. As a result, all IPC communication with non-root users is broken.Fixes: #369