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:47:27 -0400 |
commit | 68c5b7f6cb855c5742db2502533d02c92847fca3 (patch) | |
tree | 81e3df52232fed440463b5b1f57f96dfdee5d768 /src/providers | |
parent | 2a5790216f57e9bdfb2930d52860bb5300366536 (diff) | |
download | sssd-68c5b7f6cb855c5742db2502533d02c92847fca3.tar.gz sssd-68c5b7f6cb855c5742db2502533d02c92847fca3.tar.xz sssd-68c5b7f6cb855c5742db2502533d02c92847fca3.zip |
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.
Diffstat (limited to 'src/providers')
-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 9eb9cc379..68b8e153d 100644 --- a/src/providers/ldap/ldap_common.c +++ b/src/providers/ldap/ldap_common.c @@ -964,6 +964,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 |