From a8d31510d12af6ee39fb3e1e13f3a4f6bdef33c1 Mon Sep 17 00:00:00 2001 From: Pavel Březina Date: Fri, 24 Jul 2015 09:55:28 +0200 Subject: SYSDB: prepare for LOCAL view Objects doesn't have to have overrideDN specified when using LOCAL view. Since the view is not stored on the server we do not want to contact LDAP therefore we special case LOCAL view saying that it is OK that this attribute is missing. Preparation for: https://fedorahosted.org/sssd/ticket/2584 Reviewed-by: Jakub Hrozek --- src/db/sysdb_views.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/db/sysdb_views.c') diff --git a/src/db/sysdb_views.c b/src/db/sysdb_views.c index aadd6018f..1db6c892d 100644 --- a/src/db/sysdb_views.c +++ b/src/db/sysdb_views.c @@ -1186,9 +1186,16 @@ errno_t sysdb_add_overrides_to_object(struct sss_domain_info *domain, override_dn_str = ldb_msg_find_attr_as_string(obj, SYSDB_OVERRIDE_DN, NULL); if (override_dn_str == NULL) { + if (is_local_view(domain->view_name)) { + /* LOCAL view doesn't have to have overrideDN specified. */ + ret = EOK; + goto done; + } + DEBUG(SSSDBG_CRIT_FAILURE, "Missing override DN for objext [%s].\n", ldb_dn_get_linearized(obj->dn)); + ret = ENOENT; goto done; } -- cgit