sssd/0065-TEST_NEGCACHE-Test-that-root-is-always-added-to-ncac.patch
Lukas Slebodnik 4c80037896 Backport few upstream patches/fixes
(cherry picked from commit fa4807ec45)
(cherry picked from commit 323dbdee02)
(cherry picked from commit 7e532024f0)
2017-09-01 21:46:00 +02:00

44 lines
1.5 KiB
Diff

From e54764d62bfcc48770d9b2578132979aa58636e5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= <fidencio@redhat.com>
Date: Wed, 16 Aug 2017 10:45:19 +0200
Subject: [PATCH 65/93] TEST_NEGCACHE: Test that "root" is always added to
ncache
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Simply modify test_sss_ncache_prepopulate() in order to ensure that
"root" user and group are always added to the negative cache, no matter
whether they're set as part of the filter_users or filter_groups
options.
Related: https://pagure.io/SSSD/sssd/issue/3460
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
---
src/tests/cmocka/test_negcache.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/tests/cmocka/test_negcache.c b/src/tests/cmocka/test_negcache.c
index d608c20ad3248c80e68029c8c27b826395a61ddc..163e4653e0aa423eb5ccc4206734dec3a40050e6 100644
--- a/src/tests/cmocka/test_negcache.c
+++ b/src/tests/cmocka/test_negcache.c
@@ -630,6 +630,12 @@ static void test_sss_ncache_prepopulate(void **state)
ret = check_group_in_ncache(ncache, dom, "testgroup3@somedomain");
assert_int_equal(ret, ENOENT);
+
+ ret = check_user_in_ncache(ncache, dom, "root");
+ assert_int_equal(ret, EEXIST);
+
+ ret = check_group_in_ncache(ncache, dom, "root");
+ assert_int_equal(ret, EEXIST);
}
static void test_sss_ncache_default_domain_suffix(void **state)
--
2.14.1