Red Hat Bugzilla – Bug 982597
Some attributes in cn=config should not be multivalued
Last modified: 2015-12-22 15:59:44 EST
Description of problem: Some attributes in cn=config are multivalued when they clearly should not. Examples of such attributes are nsslapd-require-secure-binds, nsslapd-disk-monitoring and nsslapd-disk-monitoring-threshold. Version-Release number of selected component (if applicable): 389-ds-base-1.2.11.15-16.el6_4.x86_64 How reproducible: always Steps to Reproduce: 1. On fresh instance: [jrusnack@dstet 6.0]$ grep nsslapd-disk-monitoring /etc/dirsrv/slapd-dstet/dse.ldif [jrusnack@dstet 6.0]$ ldapsearch -D "cn=directory manager" -w Secret123 -b "cn=config " -s base -LLL nsslapd-disk-monitoring dn: cn=config nsslapd-disk-monitoring: off 2. Try replace, works OK: [jrusnack@dstet 6.0]$ ldapmodify -h localhost -p 389 -D "cn=directory manager" -w Secret123 <<EOF dn: cn=config changetype: modify replace: nsslapd-disk-monitoring nsslapd-disk-monitoring: on EOF modifying entry "cn=config" [jrusnack@dstet 6.0]$ ldapsearch -D "cn=directory manager" -w Secret123 -b "cn=config " -s base -LLL nsslapd-disk-monitoring dn: cn=config nsslapd-disk-monitoring: on [jrusnack@dstet 6.0]$ grep nsslapd-disk-monitoring /etc/dirsrv/slapd-dstet/dse.ldif nsslapd-disk-monitoring: off 3. Try adding value (succeeds, now there are two values): [jrusnack@dstet 6.0]$ ldapmodify -h localhost -p 389 -D "cn=directory manager" -w Secret123 <<EOF dn: cn=config changetype: modify add: nsslapd-disk-monitoring nsslapd-disk-monitoring: on EOF modifying entry "cn=config" [jrusnack@dstet 6.0]$ ldapsearch -D "cn=directory manager" -w Secret123 -b "cn=config " -LLL -s base nsslapd-disk-monitoring dn: cn=config nsslapd-disk-monitoring: on [jrusnack@dstet 6.0]$ grep nsslapd-disk-monitoring /etc/dirsrv/slapd-dstet/dse.ldif nsslapd-disk-monitoring: off nsslapd-disk-monitoring: on 4. Try adding value again: [jrusnack@dstet 6.0]$ ldapmodify -h localhost -p 389 -D "cn=directory manager" -w Secret123 <<EOF dn: cn=config changetype: modify add: nsslapd-disk-monitoring nsslapd-disk-monitoring: on EOF modifying entry "cn=config" ldap_modify: Type or value exists (20) Actual results: It is possible to set two values for some attributes in cn=config. Expected results: Boolean attributes like nsslapd-disk-monitoring and numerical attributes like nsslapd-disk-monitoring-threshold should be single-valued and any other value should be refused. Additional info: Complete list of affected attributes is not known - requires investigation.
Many attributes in cn=config are not even defined in the schema. The "cn=config" entry uses the "extensibleObject" objectclass to allow undefined attributes to be set. This means that there is no syntax enforcement or single-valued vs. multi-valued enforcement. The list of attributes like this is large. This is a very low priority to address. I'm pushing this out to RHEL 7.1 for the time being, but it will likely be something that we decide to push out even further.
Upstream ticket: https://fedorahosted.org/389/ticket/47437
The remaining configuration attributes in cn=config have been added to the core schema. This addresses duplicate attributes(where defined) and syntax enforcement. Fixed upstream (1.3.3)
*** Bug 1058656 has been marked as a duplicate of this bug. ***
[root@vm-idm-035 slapd-test3]# /usr/bin/ldapmodify -x -h localhost -p 1189 -D "cn=Directory Manager" -w Secret123 << EOF dn: cn=config changetype: modify add: nsslapd-disk-monitoring nsslapd-disk-monitoring: off EOF modifying entry "cn=config" ldap_modify: Type or value exists (20) [root@vm-idm-035 slapd-test3]# /usr/bin/ldapmodify -x -h localhost -p 1189 -D "cn=Directory Manager" -w Secret123 << EOF dn: cn=config changetype: modify replace: nsslapd-disk-monitoring nsslapd-disk-monitoring: off EOF modifying entry "cn=config" [root@vm-idm-035 slapd-test3]# ldapsearch -LLL -x -p 1189 -h localhost -D "cn=Directory Manager" -w Secret123 -b "cn=config" |grep -i nsslapd-disk-monitoring: nsslapd-disk-monitoring: off I checked the same for nsslapd-disk-monitoring-threshold attribute. It works fine. I was not allowed to add multiple values. Hence, marking the bug as Verified.
Build tested: [root@vm-idm-035 slapd-test3]# rpm -qa |egrep '389-ds-base' 389-ds-base-libs-1.3.3.1-9.el7.x86_64 389-ds-base-1.3.3.1-9.el7.x86_64
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2015-0416.html
*** Bug 1048116 has been marked as a duplicate of this bug. ***