From owner-freebsd-questions Sun Jul 18 23: 2:52 1999 Delivered-To: freebsd-questions@freebsd.org Received: from thoth.mch.sni.de (thoth.mch.sni.de [192.35.17.2]) by hub.freebsd.org (Postfix) with ESMTP id C7C9C14D2A for ; Sun, 18 Jul 1999 23:02:48 -0700 (PDT) (envelope-from andre.albsmeier@mchp.siemens.de) X-Envelope-Sender-Is: andre.albsmeier@mchp.siemens.de (at relayer thoth.mch.sni.de) Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by thoth.mch.sni.de (8.9.3/8.9.3) with ESMTP id IAA10889 for ; Mon, 19 Jul 1999 08:00:10 +0200 (MET DST) Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.42.7]) by mail1.siemens.de (8.9.3/8.9.3) with ESMTP id HAA19550 for ; Mon, 19 Jul 1999 07:59:59 +0200 (MET DST) Received: (from daemon@localhost) by curry.mchp.siemens.de (8.9.3/8.9.3) id IAA67833 for ; Mon, 19 Jul 1999 08:00:09 +0200 (CEST) Date: Mon, 19 Jul 1999 08:00:07 +0200 From: Andre Albsmeier To: "T. William Wells" Cc: Andre Albsmeier , freebsd-questions@FreeBSD.ORG Subject: Re: Why is this code in syslogd.c? Message-ID: <19990719080007.A7410@internal> References: <19990718194853.A29020@internal> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.5i In-Reply-To: ; from T. William Wells on Sun, Jul 18, 1999 at 02:35:39PM -0400 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, 18-Jul-1999 at 14:35:39 -0400, T. William Wells wrote: > > On Sun, 18-Jul-1999 at 13:18:01 -0400, T. William Wells wrote: > > > Kernel messages should come from the kernel. If users could > > > generate them, this could cause many problems. > > > > How can a user generate a kernel message? If I do a > > "logger -p kern.crit blah" this is logged as user.crit even if > > the code in question is commented out... > > If you check out the syslog() code itself, you'll note that it > does this translation; logger calls syslog(). But syslog() is an > ordinary C function; there is nothing to keep an application from > generating "kernel" messages if they don't use syslog() itself but > instead generate the messages themselves. OK, I found the place, thanks for the hint. But I still can't understand what's the reason for doing that. OK, a user could fake a kernel message but now he can do the same thing with all other facilities. He can fake mail or auth messages as he likes... Thanks, -Andre To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message