Due to the previous negation the high bits of the mask were set, which
at least some versions of the Android build system prevent with a compile-time
check.
if (access(HA_FIFO, R_OK|W_OK) != 0)
{
- old = umask(~(S_IRWXU | S_IRWXG));
+ old = umask(S_IRWXO);
if (mkfifo(HA_FIFO, S_IRUSR | S_IWUSR) != 0)
{
DBG1(DBG_CFG, "creating HA FIFO %s failed: %s",
}
unlink(unix_addr.sun_path);
- old = umask(~(S_IRWXU | S_IRWXG));
+ old = umask(S_IRWXO);
if (bind(this->socket, (struct sockaddr *)&unix_addr, sizeof(unix_addr)) < 0)
{
DBG1(DBG_CFG, "could not bind XML socket: %s", strerror(errno));
}
unlink(addr.sun_path);
- old = umask(~(S_IRWXU | S_IRWXG));
+ old = umask(S_IRWXO);
if (bind(fd, (struct sockaddr*)&addr, len) < 0)
{
DBG1(DBG_NET, "binding socket '%s' failed: %s", uri, strerror(errno));