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

(ITS#6324) slapd -d ? emits incorrect value for LDAP_DEBUG_ANY on x86_64

Full_Name: John Morrissey
Version: HEAD
OS: Linux x86_64
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (2001:4978:194:0:21f:5bff:fee9:da92)

slapd -d ? emits the incorrect numeric value for LDAP_DEBUG_ANY on x86_64:

$ slapd -d \?
Installed log subsystems:
        Any                            (18446744073709551615)
$ slapd -d 18446744073709551615
unrecognized log level "18446744073709551615"

Debug levels are always treated as type int, which is four bytes on Linux
x86_64. loglevel_print() in servers/slapd/bconfig.c seems to blame, since it's
using a long-typed format (%lu) instead of an unsigned int-typed one (%u).