From 21b3c8aff20d1987add2a93561653a3d6a9685d4 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Thu, 19 Jul 2012 12:00:29 -0400 Subject: 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. --- src/db/sysdb_selinux.c | 1 + 1 file changed, 1 insertion(+) 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; -- cgit