From 3c80a9db9628aec7009d7e51c1a3393bc801078c Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Sat, 21 Nov 2020 16:59:01 +0100 Subject: 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. --- libseat/backend/seatd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libseat/backend/seatd.c') diff --git a/libseat/backend/seatd.c b/libseat/backend/seatd.c index f728a33..e4ce7c4 100644 --- a/libseat/backend/seatd.c +++ b/libseat/backend/seatd.c @@ -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; }; -- cgit v1.2.3