mirror of
https://salsa.debian.org/ha-team/libqb
synced 2026-08-12 22:17:34 +00:00
ipc: set file permissions on created sockets
When using sockets for IPC the file permissions default to whatever the umask is. This isn't a problem on Linux since it uses abstract namespace sockets which don't have any permissions, but on other platforms this causes problems with pacemaker which spawns processes under the hacluster user and ends up failing to connect.
This commit is contained in:
parent
a1011c5f18
commit
29b2c44fb6
@ -84,6 +84,9 @@ qb_ipc_dgram_sock_setup(const char *base_name,
|
||||
#endif
|
||||
res = bind(request_fd, (struct sockaddr *)&local_address,
|
||||
sizeof(local_address));
|
||||
#if !(defined(QB_LINUX) || defined(QB_CYGWIN))
|
||||
chmod(local_address.sun_path, 0660);
|
||||
#endif
|
||||
if (res < 0) {
|
||||
goto error_connect;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user