diff --git a/lib/ipc_setup.c b/lib/ipc_setup.c index 1ef53b9..464de07 100644 --- a/lib/ipc_setup.c +++ b/lib/ipc_setup.c @@ -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);