summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/nss/nsssrv.c12
-rw-r--r--server/providers/data_provider.c3
-rw-r--r--server/providers/data_provider.h2
-rw-r--r--server/sbus_interfaces.h2
-rw-r--r--server/util/service_helpers.c3
5 files changed, 17 insertions, 5 deletions
diff --git a/server/nss/nsssrv.c b/server/nss/nsssrv.c
index 1969fe49..67aae9ea 100644
--- a/server/nss/nsssrv.c
+++ b/server/nss/nsssrv.c
@@ -41,6 +41,8 @@
#include "util/btreemap.h"
#include "util/service_helpers.h"
+#define SSS_NSS_PIPE_NAME "nss"
+
static int provide_identity(DBusMessage *message, void *data, DBusMessage **r);
static int reply_ping(DBusMessage *message, void *data, DBusMessage **r);
static int nss_init_domains(struct nss_ctx *nctx);
@@ -269,14 +271,22 @@ static int nss_sbus_init(struct nss_ctx *nctx)
static int set_unix_socket(struct nss_ctx *nctx)
{
struct sockaddr_un addr;
+ char *default_pipe;
int ret;
+ default_pipe = talloc_asprintf(nctx, "%s/%s", PIPE_PATH, SSS_NSS_PIPE_NAME);
+ if (!default_pipe) {
+ return ENOMEM;
+ }
+
ret = confdb_get_string(nctx->cdb, nctx,
"config/services/nss", "unixSocket",
- SSS_NSS_SOCKET_NAME, &nctx->sock_name);
+ default_pipe, &nctx->sock_name);
if (ret != EOK) {
+ talloc_free(default_pipe);
return ret;
}
+ talloc_free(default_pipe);
nctx->lfd = socket(AF_UNIX, SOCK_STREAM, 0);
if (nctx->lfd == -1) {
diff --git a/server/providers/data_provider.c b/server/providers/data_provider.c
index 0af17a7a..f29f828c 100644
--- a/server/providers/data_provider.c
+++ b/server/providers/data_provider.c
@@ -203,7 +203,8 @@ static int dp_srv_init(struct dp_ctx *dpctx)
}
DEBUG(3, ("Initializing Data Provider D-BUS Server\n"));
- default_dp_address = talloc_asprintf(tmp_ctx, "unix:path=%s/%s", PIPE_PATH, DATA_PROVIDER_PIPE);
+ default_dp_address = talloc_asprintf(tmp_ctx, "unix:path=%s/%s",
+ PIPE_PATH, DATA_PROVIDER_PIPE);
if (default_dp_address == NULL) {
ret = ENOMEM;
goto done;
diff --git a/server/providers/data_provider.h b/server/providers/data_provider.h
index 7df2ce10..68c6db97 100644
--- a/server/providers/data_provider.h
+++ b/server/providers/data_provider.h
@@ -30,7 +30,7 @@
#define DATA_PROVIDER_VERSION 0x0001
#define DATA_PROVIDER_SERVICE_NAME "dp"
-#define DATA_PROVIDER_PIPE "sbus-dp"
+#define DATA_PROVIDER_PIPE "private/sbus-dp"
#define DATA_PROVIDER_DB_FILE "sssd.ldb"
#define DATA_PROVIDER_DB_CONF_SEC "config/services/nss"
diff --git a/server/sbus_interfaces.h b/server/sbus_interfaces.h
index a6a13ad9..455aaad2 100644
--- a/server/sbus_interfaces.h
+++ b/server/sbus_interfaces.h
@@ -38,7 +38,7 @@
#define SERVICE_METHOD_IDENTITY "getIdentity"
#define SERVICE_METHOD_PING "ping"
-#define SSSD_SERVICE_PIPE "sbus-monitor"
+#define SSSD_SERVICE_PIPE "private/sbus-monitor"
/* Data Provider */
diff --git a/server/util/service_helpers.c b/server/util/service_helpers.c
index 13cca832..62321083 100644
--- a/server/util/service_helpers.c
+++ b/server/util/service_helpers.c
@@ -50,7 +50,8 @@ struct service_sbus_ctx *sssd_service_sbus_init(TALLOC_CTX *mem_ctx,
ss_ctx = talloc_zero(ctx, struct service_sbus_ctx);
if (ss_ctx == NULL) return NULL;
- default_monitor_address = talloc_asprintf(ctx, "unix:path=%s/%s", PIPE_PATH,SSSD_SERVICE_PIPE);
+ default_monitor_address = talloc_asprintf(ctx, "unix:path=%s/%s",
+ PIPE_PATH, SSSD_SERVICE_PIPE);
if (default_monitor_address == NULL) goto error;
ret = confdb_get_string(cdb, ctx,