Also be more verbose in devnode_acl_all().
strncpy(sa.un.sun_path, m->notify_socket, sizeof(sa.un.sun_path)-1);
r = bind(fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + strlen(sa.un.sun_path));
if (r < 0) {
- log_error("bind() failed: %m");
+ log_error("bind(@%s) failed: %m", sa.un.sun_path+1);
return -errno;
}
r = bind(s->native_fd, &sa.sa, offsetof(union sockaddr_union, un.sun_path) + strlen(sa.un.sun_path));
if (r < 0) {
- log_error("bind() failed: %m");
+ log_error("bind(%s) failed: %m", sa.un.sun_path);
return -errno;
}
r = bind(s->stdout_fd, &sa.sa, offsetof(union sockaddr_union, un.sun_path) + strlen(sa.un.sun_path));
if (r < 0) {
- log_error("bind() failed: %m");
+ log_error("bind(%s) failed: %m", sa.un.sun_path);
return -errno;
}
chmod(sa.un.sun_path, 0666);
if (listen(s->stdout_fd, SOMAXCONN) < 0) {
- log_error("listen() failed: %m");
+ log_error("listen(%s) failed: %m", sa.un.sun_path);
return -errno;
}
} else
r = bind(s->syslog_fd, &sa.sa, offsetof(union sockaddr_union, un.sun_path) + strlen(sa.un.sun_path));
if (r < 0) {
- log_error("bind() failed: %m");
+ log_error("bind(%s) failed: %m", sa.un.sun_path);
return -errno;
}
SET_FOREACH(n, nodes, i) {
int k;
- log_debug("Fixing up ACLs at %s for seat %s", n, seat);
+ log_debug("Changing ACLs at %s for seat %s (uid "UID_FMT"→"UID_FMT"%s%s)",
+ n, seat, old_uid, new_uid,
+ del ? " del" : "", add ? " add" : "");
+
k = devnode_acl(n, flush, del, old_uid, add, new_uid);
if (k == -ENOENT)
log_debug("Device %s disappeared while setting ACLs", n);
if (r < 0) {
r = -errno;
- log_error("bind() failed: %m");
+ log_error("bind(%s) failed: %m", sa.un.sun_path);
goto fail;
}