summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/sdap_async.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/providers/ldap/sdap_async.c')
-rw-r--r--src/providers/ldap/sdap_async.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/providers/ldap/sdap_async.c b/src/providers/ldap/sdap_async.c
index f5cc962b3..e905d2dd6 100644
--- a/src/providers/ldap/sdap_async.c
+++ b/src/providers/ldap/sdap_async.c
@@ -2318,12 +2318,23 @@ sdap_save_all_names(const char *name,
goto done;
}
- ret = sysdb_attrs_add_string(attrs, SYSDB_NAME_ALIAS, domname);
- if (ret) {
- DEBUG(SSSDBG_OP_FAILURE, ("Failed to add alias [%s] into the "
- "attribute list\n", aliases[i]));
- goto done;
+ if (lowercase) {
+ ret = sysdb_attrs_add_lc_name_alias(attrs, domname);
+ if (ret) {
+ DEBUG(SSSDBG_OP_FAILURE, ("Failed to add lower-cased version "
+ "of alias [%s] into the "
+ "attribute list\n", aliases[i]));
+ goto done;
+ }
+ } else {
+ ret = sysdb_attrs_add_string(attrs, SYSDB_NAME_ALIAS, domname);
+ if (ret) {
+ DEBUG(SSSDBG_OP_FAILURE, ("Failed to add alias [%s] into the "
+ "attribute list\n", aliases[i]));
+ goto done;
+ }
}
+
}
ret = EOK;