nss_utils.c revision 7c074ba2f923985ab0d4f9d6a5e01ff3f2f0a7a8
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen Pavel Březina <pbrezina@redhat.com>
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen Copyright (C) 2016 Red Hat
15ab2452b0220a115f4351ad9d7fd5ec70ae7966Timo Sirainen This program is free software; you can redistribute it and/or modify
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen it under the terms of the GNU General Public License as published by
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen the Free Software Foundation; either version 3 of the License, or
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen (at your option) any later version.
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen This program is distributed in the hope that it will be useful,
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen but WITHOUT ANY WARRANTY; without even the implied warranty of
15ab2452b0220a115f4351ad9d7fd5ec70ae7966Timo Sirainen MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15ab2452b0220a115f4351ad9d7fd5ec70ae7966Timo Sirainen GNU General Public License for more details.
0a53eb0283d7ec28c6105f61e118b96fce8ecb95Timo Sirainen You should have received a copy of the GNU General Public License
15ab2452b0220a115f4351ad9d7fd5ec70ae7966Timo Sirainen along with this program. If not, see <http://www.gnu.org/licenses/>.
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainennss_get_name_from_msg(struct sss_domain_info *domain,
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen /* If domain has a view associated we return overridden name
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen * if possible. */
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen name = ldb_msg_find_attr_as_string(msg, OVERRIDE_PREFIX SYSDB_NAME,
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen /* Otherwise we try to return name override from
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen * Default Truest View for trusted users. */
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fbTimo Sirainen name = ldb_msg_find_attr_as_string(msg, SYSDB_DEFAULT_OVERRIDE_NAME, NULL);
a356c4736fe6041142c6096045bc00c15a80af4eTimo Sirainen /* If no override is found we return the original name. */