Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Sep 2000 08:47:28 +1100 (EST)
From:      Stanley Hopcroft <Stanley.Hopcroft@IPAustralia.Gov.AU>
To:        questions@FreeBSD.ORG
Subject:   4.1-RELEASE + Library functions: syslog("connect from [%s]", inet_ntoa (c_addr.sin_addr)); is Garbage
Message-ID:  <Pine.BSF.4.21.0009200828280.307-100000@stan>

next in thread | raw e-mail | index | archive | help
Dear Ladies and Gentlemen,

I am writing to ask about a problem with the syslog function in FreeBSD
4.1-RELEASE.

The function call

syslog ((FACILITY | LOG_NOTICE), "connect from [%s]", inet_ntoa
(c_addr.sin_addr)); 

logs a message like

Sep 14 21:26:13 stan sms_serv[7147]: connect from [56.252.191.191]

for a connection from the localhost.

The same code however works properly on FreeBSD 3.4-RELEASE.

On the problem host, I have replaced the call above with

sprintf(buf, "connect from [%s]", inet_ntoa (c_addr.sin_addr));
syslog((FACILITY | LOG_NOTICE),buf);

and found it to work Ok.

Needless to say I would rather have syslog work in the manner
documented.

"
void
syslog(int priority, const char *message, ...)


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0009200828280.307-100000>