58 lines
2.2 KiB
Diff
58 lines
2.2 KiB
Diff
|
From 7b3794fbe5e4f0888d4faeba12e6c5268f8cca42 Mon Sep 17 00:00:00 2001
|
||
|
From: Jakub Hrozek <jhrozek@redhat.com>
|
||
|
Date: Tue, 9 Oct 2018 12:12:44 +0200
|
||
|
Subject: [PATCH 73/83] FILES: The files provider should not enumerate
|
||
|
MIME-Version: 1.0
|
||
|
Content-Type: text/plain; charset=UTF-8
|
||
|
Content-Transfer-Encoding: 8bit
|
||
|
|
||
|
Resolves:
|
||
|
https://pagure.io/SSSD/sssd/issue/3849
|
||
|
|
||
|
For reason I cannot explain now, the files provider always enumerates.
|
||
|
There is commit a60e6ec which implements this, but it's clearly wrong,
|
||
|
because then the plain getent passwd output contains duplicates from
|
||
|
nss_files and nss_sss:
|
||
|
|
||
|
$ getent passwd | sort
|
||
|
adm:x:3:4:adm:/var/adm:/sbin/nologin
|
||
|
adm:x:3:4:adm:/var/adm:/sbin/nologin
|
||
|
bin:x:1:1:bin:/bin:/sbin/nologin
|
||
|
bin:x:1:1:bin:/bin:/sbin/nologin
|
||
|
certuser:x:10329:10330::/home/certuser:/bin/bash
|
||
|
certuser:x:10329:10330::/home/certuser:/bin/bash
|
||
|
chrony:x:997:994::/var/lib/chrony:/sbin/nologin
|
||
|
chrony:x:997:994::/var/lib/chrony:/sbin/nologin
|
||
|
daemon:x:2:2:daemon:/sbin:/sbin/nologin
|
||
|
daemon:x:2:2:daemon:/sbin:/sbin/nologin
|
||
|
|
||
|
Reviewed-by: Michal Židek <mzidek@redhat.com>
|
||
|
---
|
||
|
src/confdb/confdb.c | 5 +----
|
||
|
1 files changed, 1 insertions(+), 4 deletions(-)
|
||
|
|
||
|
diff --git a/src/confdb/confdb.c b/src/confdb/confdb.c
|
||
|
index 2f3d900..fdc6122 100644
|
||
|
--- a/src/confdb/confdb.c
|
||
|
+++ b/src/confdb/confdb.c
|
||
|
@@ -875,7 +875,6 @@ static int confdb_get_domain_internal(struct confdb_ctx *cdb,
|
||
|
char *default_domain;
|
||
|
bool fqnames_default = false;
|
||
|
int memcache_timeout;
|
||
|
- bool enum_default;
|
||
|
|
||
|
tmp_ctx = talloc_new(mem_ctx);
|
||
|
if (!tmp_ctx) return ENOMEM;
|
||
|
@@ -1009,10 +1008,8 @@ static int confdb_get_domain_internal(struct confdb_ctx *cdb,
|
||
|
"Interpreting as true\n", domain->name);
|
||
|
domain->enumerate = true;
|
||
|
} else { /* assume the new format */
|
||
|
- enum_default = is_files_provider(domain);
|
||
|
-
|
||
|
ret = get_entry_as_bool(res->msgs[0], &domain->enumerate,
|
||
|
- CONFDB_DOMAIN_ENUMERATE, enum_default);
|
||
|
+ CONFDB_DOMAIN_ENUMERATE, 0);
|
||
|
if(ret != EOK) {
|
||
|
DEBUG(SSSDBG_FATAL_FAILURE,
|
||
|
"Invalid value for %s\n", CONFDB_DOMAIN_ENUMERATE);
|