]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9343 Let backend_attribute read operational attributes
authorOndřej Kuzník <ondra@mistotebe.net>
Thu, 3 Mar 2022 10:56:13 +0000 (10:56 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Mon, 7 Mar 2022 14:54:39 +0000 (14:54 +0000)
back-mdb checks requested attribute is present in the entry which
can obstruct the fallback to backend_operational.

servers/slapd/backend.c

index 42f9039ba3aa78b4c99d71577c402107e36e88db..24a82f399e54e737d11313534f8119dfbac9589f 100644 (file)
@@ -1732,7 +1732,9 @@ fe_acl_attribute(
 
        } else {
                op->o_private = NULL;
-               rc = be_entry_get_rw( op, edn, NULL, entry_at, 0, &e );
+               rc = be_entry_get_rw( op, edn, NULL,
+                               is_at_operational( entry_at->ad_type ) ? NULL : entry_at,
+                               0, &e );
                e_priv = op->o_private;
                op->o_private = o_priv;
        } 
@@ -1893,7 +1895,9 @@ backend_access(
 
        } else {
                op->o_private = NULL;
-               rc = be_entry_get_rw( op, edn, NULL, entry_at, 0, &e );
+               rc = be_entry_get_rw( op, edn, NULL,
+                               is_at_operational( entry_at->ad_type ) ? NULL : entry_at,
+                               0, &e );
                e_priv = op->o_private;
                op->o_private = o_priv;
        }