diff --git a/src/man/sssd-kcm.8.xml b/src/man/sssd-kcm.8.xml
index 022a74ba09..14ba122a5c 100644
--- a/src/man/sssd-kcm.8.xml
+++ b/src/man/sssd-kcm.8.xml
@@ -203,6 +203,13 @@ systemctl restart sssd-kcm.service
Default: /var/run/.heim_org.h5l.kcm-socket
+
+
+ Note: on platforms where systemd is supported, the
+ socket path is overwritten by the one defined in
+ the sssd-kcm.socket unit file.
+
+
diff --git a/src/responder/common/responder_common.c b/src/responder/common/responder_common.c
index 7061d018a6..992d85c6d2 100644
--- a/src/responder/common/responder_common.c
+++ b/src/responder/common/responder_common.c
@@ -1001,6 +1001,8 @@ int activate_unix_sockets(struct resp_ctx *rctx,
connection_setup_t conn_setup)
{
int ret;
+ struct sockaddr_un sockaddr;
+ socklen_t sockaddr_len = sizeof(sockaddr);
#ifdef HAVE_SYSTEMD
if (rctx->lfd == -1 && rctx->priv_lfd == -1) {
@@ -1032,6 +1034,15 @@ int activate_unix_sockets(struct resp_ctx *rctx,
goto done;
}
+ ret = getsockname(rctx->lfd, (struct sockaddr *) &sockaddr, &sockaddr_len);
+ if (ret == EOK) {
+ if (memcmp(rctx->sock_name, sockaddr.sun_path, strlen(rctx->sock_name)) != 0) {
+ DEBUG(SSSDBG_CONF_SETTINGS,
+ "Warning: socket path defined in systemd unit (%s) and sssd.conf (%s) don't match\n",
+ sockaddr.sun_path, rctx->sock_name);
+ }
+ }
+
ret = sss_fd_nonblocking(rctx->lfd);
if (ret != EOK) goto done;
if (numfds == 2) {