diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2011-04-12 12:47:14 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-04-12 15:54:48 -0400 |
commit | ae8038f78ca24eba36159876c5089386fbdd15a1 (patch) | |
tree | d61c6c13a9da35834af3121b4078e428fb7e7d24 /src/providers/ldap/ldap_common.c | |
parent | 27b5b511940f5cfc7a6d065dc18e65742bd7840a (diff) | |
download | sssd-ae8038f78ca24eba36159876c5089386fbdd15a1.tar.gz sssd-ae8038f78ca24eba36159876c5089386fbdd15a1.tar.xz sssd-ae8038f78ca24eba36159876c5089386fbdd15a1.zip |
Never remove gecos from the sysdb cachesssd-1.5.1-28.el5
Now that gecos can come from either the 'gecos' or 'cn' attributes,
we need to ensure that we never remove it from the cache.
Diffstat (limited to 'src/providers/ldap/ldap_common.c')
-rw-r--r-- | 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 ce6d41d58..29a5820f5 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 |