[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#6162) hexadecimal log levels are not recognized in configuration



Full_Name: Jonathan Clarke
Version: RE24 and HEAD
OS: irrelevant
URL: ftp://ftp.openldap.org/incoming/jonathan-clarke-bconfig-20090608.patch
Submission from: (NULL) (80.65.230.146)


The slapd-config(5) and slapd.conf(5) man pages state:

    olcLogLevel: <integer> [...]
        The desired log level can be input as a single integer that combines
        the (ORed) desired levels, both in decimal or in hexadecimal notation
[...]
        as a list of integers (that are ORed internally), or as a list of the
names
        that are shown between brackets,

This is not the case. Integers and names (strings) are accepted, but hex
notation is refused, with, from slapd.conf:

/opt/openldap-RE24/etc/openldap/slapd.conf: line 10: <loglevel> unable to parse
level "0x40"

And using ldapmodify on cn=config:

ldap_modify: Other (e.g., implementation specific) error (80)
	additional info: <olcLogLevel> unable to parse level

Hexadecimal values are, however, accepted as arguments to the -d argument to
slapd on the command line. The above patch fixes bconfig.c to accept hex
values.

On a side note, according to man strtol(3), this also means that loglevels can
be typed in octal, for the more masochist among us :)