sssd/0003-Never-remove-gecos-from-the-sysdb-cache.patch

35 lines
1.3 KiB
Diff
Raw Normal View History

From 9d5a7dec9eb1201f48f497b3f5355439977f0c88 Mon Sep 17 00:00:00 2001
From: Stephen Gallagher <sgallagh@redhat.com>
Date: Tue, 12 Apr 2011 12:47:14 -0400
Subject: [PATCH] Never remove gecos from the sysdb cache
Now that gecos can come from either the 'gecos' or 'cn' attributes,
we need to ensure that we never remove it from the cache.
---
src/providers/ldap/ldap_common.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/src/providers/ldap/ldap_common.c b/src/providers/ldap/ldap_common.c
index ce6d41d5872a6dd474aff4bab8e2920688abda92..29a5820f5c6c765646c43948a9d17fe0016931ed 100644
--- a/src/providers/ldap/ldap_common.c
+++ b/src/providers/ldap/ldap_common.c
@@ -962,6 +962,15 @@ errno_t list_missing_attrs(TALLOC_CTX *mem_ctx,
continue;
}
+ /* GECOS is another special case. Its value can come
+ * either from the 'gecos' attribute or the 'cn'
+ * attribute. It's best if we just never remove it.
+ */
+ if (strcasecmp(sysdb_name, SYSDB_GECOS) == 0) {
+ talloc_free(sysdb_name);
+ continue;
+ }
+
for (j = 0; j < recvd_attrs->num; j++) {
/* Check whether this expected attribute appeared in the
* received attributes and had a non-zero number of
--
1.7.4.2