| |
@@ -1091,6 +1091,11 @@
|
| |
return;
|
| |
}
|
| |
|
| |
+ /* setup_sysdb_tests creates local provider and we need to handle
|
| |
+ * ldap provider differently with auto_private_groups.
|
| |
+ */
|
| |
+ test_ctx->domain->provider = discard_const_p(char, "ldap");
|
| |
+
|
| |
data = test_data_new_user(test_ctx, _i);
|
| |
fail_if(data == NULL);
|
| |
|
| |
@@ -1107,6 +1112,32 @@
|
| |
}
|
| |
END_TEST
|
| |
|
| |
+ START_TEST(test_user_group_by_name_local)
|
| |
+ {
|
| |
+ struct sysdb_test_ctx *test_ctx;
|
| |
+ struct test_data *data;
|
| |
+ struct ldb_message *msg;
|
| |
+ int ret;
|
| |
+
|
| |
+ /* Setup */
|
| |
+ ret = setup_sysdb_tests(&test_ctx);
|
| |
+ if (ret != EOK) {
|
| |
+ fail("Could not set up the test");
|
| |
+ return;
|
| |
+ }
|
| |
+
|
| |
+ data = test_data_new_user(test_ctx, _i);
|
| |
+ fail_if(data == NULL);
|
| |
+
|
| |
+ ret = sysdb_search_group_by_name(data,
|
| |
+ data->ctx->domain,
|
| |
+ data->username, /* we're searching for the private group */
|
| |
+ NULL,
|
| |
+ &msg);
|
| |
+ fail_if(ret != ENOENT);
|
| |
+ }
|
| |
+ END_TEST
|
| |
+
|
| |
START_TEST (test_sysdb_getgrnam)
|
| |
{
|
| |
struct sysdb_test_ctx *test_ctx;
|
| |
@@ -7092,6 +7123,7 @@
|
| |
* can be found. Regression test for ticket #3615
|
| |
*/
|
| |
tcase_add_loop_test(tc_sysdb, test_user_group_by_name, 27000, 27010);
|
| |
+ tcase_add_loop_test(tc_sysdb, test_user_group_by_name_local, 27000, 27010);
|
| |
|
| |
/* Create a new group */
|
| |
tcase_add_loop_test(tc_sysdb, test_sysdb_add_group, 28000, 28010);
|
| |
We need to return ENOENT for local provider if user have
just magic private group. Otherwise we would not be able
to detect such situation in sss_groupshow
Resolves:
https://pagure.io/SSSD/sssd/issue/3644