Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 07 Sep 2018 17:11:00 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 231234] net/nss-pam-ldapd: pid formatted incorrectly in debug message (wrong printf format?)
Message-ID:  <bug-231234-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D231234

            Bug ID: 231234
           Summary: net/nss-pam-ldapd: pid formatted incorrectly in debug
                    message (wrong printf format?)
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: zi@FreeBSD.org
          Reporter: gray@nxg.name
             Flags: maintainer-feedback?(zi@FreeBSD.org)
          Assignee: zi@FreeBSD.org

When running nslcd in debug mode (`nslcd -d`), I see lines such as

    DEBUG: connection from pid=3D18446744073709551615 uid=3D0 gid=3D0

This is an implausible pid number.  This originates from a line

    log_log(LOG_DEBUG, "connection from pid=3D%lu uid=3D%lu gid=3D%lu",
          (unsigned long int)pid, (unsigned long int)uid, (unsigned long
int)gid);

in nslcd.c (I'm looking at the download of 0.9.10 from
https://arthurdejong.org/nss-pam-ldapd/downloads, but I don't imagine the
FreeBSD patched version is too different).

This does look OK to me at first sight -- pid is pid_t, which is __pid_t, w=
hich
/usr/include/sys/_types.h says is __int32t -- and the explicit cast to
(unsigned long int) _should_ be OK and match the %lu; but I always get such
promotions wrong first time, and the output above does look suspiciously as=
 if
an integer conversion has been bungled somewhere, either in the original or=
 in
the port.

This isn't purely cosmetic, since I'm using this debug mode to try to locate
which PID is making a connection to nslcd.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-231234-7788>