|
|
b2d430 |
From 0686ce29cadb7875638d5f782199ea4bb186dee3 Mon Sep 17 00:00:00 2001
|
|
|
b2d430 |
From: Petr Cech <pcech@redhat.com>
|
|
|
b2d430 |
Date: Tue, 12 Jul 2016 16:14:04 +0200
|
|
|
b2d430 |
Subject: [PATCH 16/18] PROVIDERS: Setting right {u,g}id if unprivileged
|
|
|
b2d430 |
MIME-Version: 1.0
|
|
|
b2d430 |
Content-Type: text/plain; charset=UTF-8
|
|
|
b2d430 |
Content-Transfer-Encoding: 8bit
|
|
|
b2d430 |
|
|
|
b2d430 |
be_ctx had talloc_zero() initialized uid and gid which was used
|
|
|
b2d430 |
in function dp_init(). Therefore back-end was every time started as root
|
|
|
b2d430 |
and therefore non-root responders could not communicate with back-end
|
|
|
b2d430 |
due to wrong permission of unix sockets.
|
|
|
b2d430 |
|
|
|
b2d430 |
This patch sets right uid and gid to data-providers if sssd runs
|
|
|
b2d430 |
as non-root user.
|
|
|
b2d430 |
|
|
|
b2d430 |
Resolves:
|
|
|
b2d430 |
https://fedorahosted.org/sssd/ticket/3077
|
|
|
b2d430 |
|
|
|
b2d430 |
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
|
|
|
b2d430 |
(cherry picked from commit 75dead699a19dda7d8dfca89e2f97efbf0c264a2)
|
|
|
b2d430 |
---
|
|
|
b2d430 |
src/providers/data_provider_be.c | 2 ++
|
|
|
b2d430 |
1 file changed, 2 insertions(+)
|
|
|
b2d430 |
|
|
|
b2d430 |
diff --git a/src/providers/data_provider_be.c b/src/providers/data_provider_be.c
|
|
|
b2d430 |
index 78efed851b2bf053ba890caa05e655431996892a..2ae713054429e789c1ba79c1f5e7a3889af3b291 100644
|
|
|
b2d430 |
--- a/src/providers/data_provider_be.c
|
|
|
b2d430 |
+++ b/src/providers/data_provider_be.c
|
|
|
b2d430 |
@@ -386,6 +386,8 @@ errno_t be_process_init(TALLOC_CTX *mem_ctx,
|
|
|
b2d430 |
|
|
|
b2d430 |
be_ctx->ev = ev;
|
|
|
b2d430 |
be_ctx->cdb = cdb;
|
|
|
b2d430 |
+ be_ctx->uid = uid;
|
|
|
b2d430 |
+ be_ctx->gid = gid;
|
|
|
b2d430 |
be_ctx->identity = talloc_asprintf(be_ctx, "%%BE_%s", be_domain);
|
|
|
b2d430 |
be_ctx->conf_path = talloc_asprintf(be_ctx, CONFDB_DOMAIN_PATH_TMPL, be_domain);
|
|
|
b2d430 |
if (be_ctx->identity == NULL || be_ctx->conf_path == NULL) {
|
|
|
b2d430 |
--
|
|
|
b2d430 |
2.4.11
|
|
|
b2d430 |
|