I don't think sending a message to trace really captures the severity
of the situation adequately.
- chmod(sun.sun_path, 0600);
+ if (chmod(sun.sun_path, 0600)) {
+ die(EXIT_FAILURE, "failed to set socket permissions: %s",
+ strerror(errno));
+ }
if (chown(sun.sun_path, u, g)) {
if (chown(sun.sun_path, u, g)) {
- T( trace(T_ADMIN,
- "admin: failed to give away socket: %s",
- strerror(errno)); )
+ die(EXIT_FAILURE, "failed to set socket owner: %s",
+ strerror(errno));
}
umask(omask);
fdflags(fd, O_NONBLOCK, O_NONBLOCK, FD_CLOEXEC, FD_CLOEXEC);
}
umask(omask);
fdflags(fd, O_NONBLOCK, O_NONBLOCK, FD_CLOEXEC, FD_CLOEXEC);