Because the sgid bit is not set on the IPC directory, endpoints do
not inherit the group ownership from the parent directory. Thus,
endpoints are created with a user's primary group instead of the IPC
group, making inter-user IPC communication impossible.
This commit modifies the IPC module and the post-install script of
the debian package so that the sgid bit is set on the IPC directory
and endpoints are created with the correct permissions for IPC
communication between users.
if addgroup toolbox_ipc; then
if ! dpkg-statoverride --list /var/lib/toolbox/ipc >/dev/null 2>&1; then
- dpkg-statoverride --update --add root toolbox_ipc 0770 /var/lib/toolbox/ipc
+ dpkg-statoverride --update --add root toolbox_ipc 2770 /var/lib/toolbox/ipc
fi
fi
fi
if ! queue_init "$endpoint/queue" ||
- ! echo "$USER" > "$endpoint/owner"; then
+ ! echo "$USER" > "$endpoint/owner" ||
+ ! chmod -R g+rwxs "$endpoint"; then
if ! rm -rf "$endpoint"; then
log_error "Could not clean up $endpoint"
fi