lists.arthurdejong.org
RSS feed

pid formatted incorrectly in debug message (wrong printf format?)

[Date Prev][Date Next] [Thread Prev][Thread Next]

pid formatted incorrectly in debug message (wrong printf format?)




Greetings.

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

    DEBUG: connection from pid=18446744073709551615 uid=0 gid=0

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

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

in nslcd.c (I'm looking at both the repo).

That pid number is -1 as a long unsigned. Thus the problem here appears to be that getpeercred is failing to obtain the PID and either not reporting it or not detecting it. (if so, that's also a problem).

This isn't merely cosmetic for me, since I'm running nslcd in debug mode to try to identify a process which is trying to communicate with nslcd.

I'm seeing this on FreeBSD 11.2, which is running v0.9.9.

Best wishes,

Norman


--
Norman Gray  :  https://nxg.me.uk
--
To unsubscribe send an email to
nss-pam-ldapd-users-unsubscribe@lists.arthurdejong.org or see
https://lists.arthurdejong.org/nss-pam-ldapd-users/