summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-07-19 12:00:29 -0400
committerJakub Hrozek <jhrozek@redhat.com>2012-07-20 20:26:58 +0200
commit21b3c8aff20d1987add2a93561653a3d6a9685d4 (patch)
treed327b0117dc40e4bb1ece00546d4c09d1b94670e /src
parent695bca9d2f73096254308e0883fcc74b2631850e (diff)
downloadsssd-21b3c8aff20d1987add2a93561653a3d6a9685d4.tar.gz
sssd-21b3c8aff20d1987add2a93561653a3d6a9685d4.tar.xz
sssd-21b3c8aff20d1987add2a93561653a3d6a9685d4.zip
Fix sysdb_search_selinux_usermap_by_username return value
There was a logic bug in sysdb_search_selinux_usermap_by_username that resulted in returning the value the variable "ret" had after the last call to sysdb_attrs_get_uint32_t, which in cases the last rule processed did not have the requested attributes led to using the default user context.
Diffstat (limited to 'src')
-rw-r--r--src/db/sysdb_selinux.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/db/sysdb_selinux.c b/src/db/sysdb_selinux.c
index 1b020b772..eaf07b50a 100644
--- a/src/db/sysdb_selinux.c
+++ b/src/db/sysdb_selinux.c
@@ -469,6 +469,7 @@ errno_t sysdb_search_selinux_usermap_by_username(TALLOC_CTX *mem_ctx,
*_usermaps = talloc_steal(mem_ctx, usermaps);
+ ret = EOK;
done:
talloc_zfree(tmp_ctx);
return ret;