Because the sgid bit is not set on the uipc 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 uipc module and the post-install script of
the debian package so that the sgid bit is set on the uipc directory
and endpoints are created with the correct permissions for uipc
communication between users.
This commit also modifies the Makefile so that the uipc directory is
created during toolbox installation.
mkdir -p $(DESTDIR)/$(PREFIX)/share/toolbox
mkdir -p $(DESTDIR)/$(PREFIX)/bin
mkdir -p $(DESTDIR)/var/lib/toolbox/ipc
+ mkdir -p $(DESTDIR)/var/lib/toolbox/uipc
cp toolbox.sh $(DESTDIR)/$(PREFIX)/share/toolbox/.
cp -r include $(DESTDIR)/$(PREFIX)/share/toolbox/.
cp -r utils $(DESTDIR)/$(PREFIX)/share/toolbox/.
if ! dpkg-statoverride --list /var/lib/toolbox/ipc >/dev/null 2>&1; then
dpkg-statoverride --update --add root toolbox_ipc 2770 /var/lib/toolbox/ipc
fi
+
+ if ! dpkg-statoverride --list /var/lib/toolbox/uipc >/dev/null 2>&1; then
+ dpkg-statoverride --update --add root toolbox_ipc 2770 /var/lib/toolbox/uipc
+ fi
fi
return 0
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