>From 8c3f0939c3e59d4d59f0f9adc874697685a93118 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Tue, 18 Feb 2014 16:25:15 +0100 Subject: [PATCH 3/5] sbus: Make sbus_new_server() work for non-priveleged processes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I'd like to use this during testing. We should check that the socket ownership is the same as the process, rather than limiting it to root. Reviewed-by: Jakub Hrozek Reviewed-by: Pavel Březina Reviewed-by: Lukáš Slebodník (cherry picked from commit e35bff1cf25048a0dcafd6d8fdba60da82e88338) --- src/sbus/sssd_dbus_server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sbus/sssd_dbus_server.c b/src/sbus/sssd_dbus_server.c index 5ab4ad0bb45ae0d0e3608187daac0452e0125b86..68dab85caad9fa6e8ebea0a4826e7f628b3da8e0 100644 --- a/src/sbus/sssd_dbus_server.c +++ b/src/sbus/sssd_dbus_server.c @@ -249,7 +249,7 @@ int sbus_new_server(TALLOC_CTX *mem_ctx, /* Both check_file and chmod can handle both the symlink and * the socket */ - ret = check_file(filename, 0, 0, -1, CHECK_SOCK, &stat_buf, true); + ret = check_file(filename, getuid(), getgid(), -1, CHECK_SOCK, &stat_buf, true); if (ret != EOK) { DEBUG(SSSDBG_CRIT_FAILURE, "check_file failed for [%s].\n", filename); ret = EIO; -- 1.9.0