summaryrefslogtreecommitdiffstats
path: root/src/sbus
diff options
context:
space:
mode:
authorStef Walter <stefw@redhat.com>2014-02-18 16:25:15 +0100
committerJakub Hrozek <jhrozek@redhat.com>2014-03-14 13:42:23 +0100
commite35bff1cf25048a0dcafd6d8fdba60da82e88338 (patch)
tree32b143a7ba6f79041ed2226d5b2f758417e6c494 /src/sbus
parent07e941c1bbdc752142bbd3b838c540bc7ecd0ed7 (diff)
downloadsssd-e35bff1cf25048a0dcafd6d8fdba60da82e88338.tar.gz
sssd-e35bff1cf25048a0dcafd6d8fdba60da82e88338.tar.xz
sssd-e35bff1cf25048a0dcafd6d8fdba60da82e88338.zip
sbus: Make sbus_new_server() work for non-priveleged processes
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 <jhrozek@redhat.com> Reviewed-by: Pavel Březina <pbrezina@redhat.com> Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
Diffstat (limited to 'src/sbus')
-rw-r--r--src/sbus/sssd_dbus_server.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sbus/sssd_dbus_server.c b/src/sbus/sssd_dbus_server.c
index b84df2d0f..39c315da5 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;