summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStef Walter <stefw@redhat.com>2014-02-18 16:25:15 +0100
committerJakub Hrozek <jhrozek@redhat.com>2014-06-02 19:03:26 +0200
commit1f61185837c26a07cf6196c95631d55d8af0ee40 (patch)
tree2bda91530e3f8b3cc5a13330cde95a5d675322e0 /src
parent5312bab5fa3a472111e0d6452ac326293adbfdbd (diff)
downloadsssd-1f61185837c26a07cf6196c95631d55d8af0ee40.tar.gz
sssd-1f61185837c26a07cf6196c95631d55d8af0ee40.tar.xz
sssd-1f61185837c26a07cf6196c95631d55d8af0ee40.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> (cherry picked from commit e35bff1cf25048a0dcafd6d8fdba60da82e88338)
Diffstat (limited to 'src')
-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 5ab4ad0bb..68dab85ca 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;