mirror of
https://salsa.debian.org/ha-team/libqb
synced 2026-01-15 05:10:14 +00:00
Allow group access to the IPC directory
And don't abort if we aren't permitted to chown() it. The client might still have the privileges to enter it.
This commit is contained in:
parent
a8301de262
commit
700fb2b27e
@ -660,11 +660,12 @@ handle_new_connection(struct qb_ipcs_service *s,
|
||||
res = -errno;
|
||||
goto send_response;
|
||||
}
|
||||
res = chown(c->description, c->auth.uid, c->auth.gid);
|
||||
if (res != 0) {
|
||||
if (chmod(c->description, 0770)) {
|
||||
res = -errno;
|
||||
goto send_response;
|
||||
}
|
||||
/* chown can fail because we might not be root */
|
||||
(void)chown(c->description, c->auth.uid, c->auth.gid);
|
||||
|
||||
/* We can't pass just a directory spec to the clients */
|
||||
strncat(c->description,"/qb", CONNECTION_DESCRIPTION);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user