This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 982597 - Some attributes in cn=config should not be multivalued
Some attributes in cn=config should not be multivalued
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base (Show other bugs)
7.0
Unspecified Unspecified
low Severity unspecified
: rc
: 7.1
Assigned To: Rich Megginson
Viktor Ashirov
:
: 1048116 1058656 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-09 07:39 EDT by Ján Rusnačko
Modified: 2015-12-22 15:59 EST (History)
5 users (show)

See Also:
Fixed In Version: 389-ds-base-1.3.3.1-1.el7
Doc Type: Bug Fix
Doc Text:
Cause: Adding multiple configuration attributes for a single configuration setting Consequence: Only the last attribute value processed for that attribute is used. This can have unexpected results. Fix: Add the configuration attributes to the server's core schema definitions. Result: The schema definitions are enforced, and single valued attributes will be guaranteed.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-03-05 04:30:55 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ján Rusnačko 2013-07-09 07:39:23 EDT
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.
Comment 2 Nathan Kinder 2013-07-09 10:33:04 EDT
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.
Comment 3 Rich Megginson 2013-07-22 11:46:45 EDT
Upstream ticket:
https://fedorahosted.org/389/ticket/47437
Comment 4 mreynolds 2014-02-10 11:27:00 EST
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)
Comment 5 mreynolds 2014-06-23 12:53:47 EDT
*** Bug 1058656 has been marked as a duplicate of this bug. ***
Comment 9 Sankar Ramalingam 2014-12-03 07:41:32 EST
[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.
Comment 10 Sankar Ramalingam 2014-12-03 07:50:46 EST
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
Comment 12 errata-xmlrpc 2015-03-05 04:30:55 EST
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
Comment 13 mreynolds 2015-12-22 15:59:44 EST
*** Bug 1048116 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.