From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCHES] Syslog produces no log (just for me?) Date: Mon, 30 Mar 2015 23:20:37 +0200 Message-ID: <87r3s641y2.fsf@gnu.org> References: <87twx5qmpm.fsf@gmail.com> <87sicnx5m9.fsf@gnu.org> <87y4mfrlss.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ych6z-0005J0-FZ for guix-devel@gnu.org; Mon, 30 Mar 2015 17:20:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ych6u-0005m9-Gf for guix-devel@gnu.org; Mon, 30 Mar 2015 17:20:45 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45474) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ych6u-0005m5-9z for guix-devel@gnu.org; Mon, 30 Mar 2015 17:20:40 -0400 In-Reply-To: <87y4mfrlss.fsf@gmail.com> (Alex Kost's message of "Mon, 30 Mar 2015 10:23:15 +0300") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Alex Kost Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain Alex Kost skribis: > Nope, syslog.conf in store is fine. The problem can be definitely > solved for me by removing leading spaces. Actually never mind, as I'm > going to use my config for syslog-service, but anyway here is what > happens when I start syslogd with the conf-file of the same contents as > provided by 'syslog-service': > > # /run/current-system/profile/libexec/syslogd --debug --rcfile /tmp/syslog-with-leading-spaces.conf > init > cfline(*.aauth.noth.notice;authpriv.none /dev/console) > syslogd: unknown priority name "aauth.noth.notice" > (logmsg): syslog.err (43), flags 4, from localhost, msg syslogd: unknown priority name "aauth.noth.notice" > Logging to CONSOLE /dev/console > cfline(*.iail.none.none;authpriv.none /var/log/messages) > syslogd: unknown priority name "iail.none.none" Ooh, you found a genuine bug, as evidenced by the corrupt strings above. Confirmed with Valgrind: --8<---------------cut here---------------start------------->8--- $ valgrind ./src/syslogd --debug --rcfile /gnu/store/cz9n7s884mlr5y4x2bk8kq9hq44nnmaz-syslog.conf ==29582== Memcheck, a memory error detector ==29582== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==29582== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info ==29582== Command: ./src/syslogd --debug --rcfile /gnu/store/cz9n7s884mlr5y4x2bk8kq9hq44nnmaz-syslog.conf ==29582== init ==29582== Source and destination overlap in strcpy(0x55ebc00, 0x55ebc05) ==29582== at 0x4C29C02: strcpy (in /gnu/store/13dzn85z8yhh6i977lwsii4wd7zjzyka-valgrind-3.10.1/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==29582== by 0x405D1B: load_conffile.constprop.5 (syslogd.c:1974) ==29582== by 0x4060CF: init (syslogd.c:2109) ==29582== by 0x402BAC: main (syslogd.c:601) --8<---------------cut here---------------end--------------->8--- This patch placates Valgrind and seems to do the job: --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/src/syslogd.c b/src/syslogd.c index 7af10f3..1db4455 100644 --- a/src/syslogd.c +++ b/src/syslogd.c @@ -1971,7 +1971,7 @@ load_conffile (const char *filename, struct filed **nextp) if (*p == '\0' || *p == '#') continue; - strcpy (cline, p); + bcopy (p, cline, strlen (p)); /* Cut the trailing spaces. */ for (p = strchr (cline, '\0'); isspace (*--p);) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Could you confirm that it solves the problem for you? Just add it locally to the inetutils recipe. Thanks, Ludo=E2=80=99. --=-=-=--