~kennylevinsen/seatd

3c80a9db9628aec7009d7e51c1a3393bc801078c — Isaac Freund 3 days ago 2185e8f
libseat: log error when failing to open socket

The most common pain point I've seen with people trying out seat is
forgetting to add themselves to whatever group the distro has chosen
to own the socket.

Logging this error and path of the socket should make it easier to tell
why things aren't working.
1 files changed, 1 insertions(+), 1 deletions(-)

M libseat/backend/seatd.c
M libseat/backend/seatd.c => libseat/backend/seatd.c +1 -1
@@ 75,7 75,7 @@ static int seatd_connect(void) {
	strncpy(addr.unix.sun_path, path, sizeof addr.unix.sun_path - 1);
	socklen_t size = offsetof(struct sockaddr_un, sun_path) + strlen(addr.unix.sun_path);
	if (connect(fd, &addr.generic, size) == -1) {
		log_debugf("Could not connect to socket: %s", strerror(errno));
		log_errorf("Could not connect to socket %s: %s", path, strerror(errno));
		close(fd);
		return -1;
	};