From owner-freebsd-questions Tue Sep 19 14:47:41 2000 Delivered-To: freebsd-questions@freebsd.org Received: from pericles.IPAustralia.gov.au (pericles.IPAustralia.gov.au [202.14.186.30]) by hub.freebsd.org (Postfix) with ESMTP id 9281137B422 for ; Tue, 19 Sep 2000 14:47:34 -0700 (PDT) Received: (from smap@localhost) by pericles.IPAustralia.gov.au (8.9.3/8.9.3) id IAA03763 for ; Wed, 20 Sep 2000 08:47:32 +1100 (EST) (envelope-from anwsmh@IPAustralia.Gov.AU) Received: from wf-142.aipo.gov.au(192.168.1.142) by pericles.IPAustralia.gov.au via smap (V2.0) id xma003757; Wed, 20 Sep 00 08:47:30 +1100 Received: from localhost (anwsmh@localhost) by stan (8.9.3/8.9.3) with ESMTP id IAA00352 for ; Wed, 20 Sep 2000 08:47:29 +1100 (EST) (envelope-from anwsmh@IPAustralia.Gov.AU) X-Authentication-Warning: stan: anwsmh owned process doing -bs Date: Wed, 20 Sep 2000 08:47:28 +1100 (EST) From: Stanley Hopcroft X-Sender: anwsmh@stan To: questions@FreeBSD.ORG Subject: 4.1-RELEASE + Library functions: syslog("connect from [%s]", inet_ntoa (c_addr.sin_addr)); is Garbage Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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