diff options
author | Pavel Březina <pbrezina@redhat.com> | 2015-07-24 09:55:28 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2015-07-27 22:48:19 +0200 |
commit | a8d31510d12af6ee39fb3e1e13f3a4f6bdef33c1 (patch) | |
tree | 316bacbe4ed2a794a047bda17a65b95c2b4b73da /src/db/sysdb_views.c | |
parent | 166a622bcba319aaa7190fbc348af887cbba30bf (diff) | |
download | sssd-a8d31510d12af6ee39fb3e1e13f3a4f6bdef33c1.tar.gz sssd-a8d31510d12af6ee39fb3e1e13f3a4f6bdef33c1.tar.xz sssd-a8d31510d12af6ee39fb3e1e13f3a4f6bdef33c1.zip |
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 <jhrozek@redhat.com>
Diffstat (limited to 'src/db/sysdb_views.c')
-rw-r--r-- | src/db/sysdb_views.c | 7 |
1 files changed, 7 insertions, 0 deletions
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; } |