From owner-freebsd-current@FreeBSD.ORG Fri Aug 1 17:03:41 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4ECE237B401 for ; Fri, 1 Aug 2003 17:03:41 -0700 (PDT) Received: from mail.dada.it (mail4.dada.it [195.110.100.4]) by mx1.FreeBSD.org (Postfix) with SMTP id 6C9B043FDD for ; Fri, 1 Aug 2003 17:03:37 -0700 (PDT) (envelope-from riccardo@torrini.org) Received: (qmail 6110 invoked from network); 2 Aug 2003 00:03:28 -0000 Received: from unknown (HELO trudy.torrini.home) (195.110.114.101) by mail.dada.it with SMTP; 2 Aug 2003 00:03:28 -0000 Received: from trudy.torrini.home (localhost.torrini.home [127.0.0.1]) by trudy.torrini.home (8.12.9/8.12.9) with ESMTP id h7203X5M084717 for ; Sat, 2 Aug 2003 02:03:34 +0200 (CEST) (envelope-from riccardo@trudy.torrini.home) Received: (from riccardo@localhost) by trudy.torrini.home (8.12.9/8.12.9/Submit) id h7203W1S084716 for freebsd-current@FreeBSD.ORG; Sat, 2 Aug 2003 02:03:32 +0200 (CEST) Date: Sat, 2 Aug 2003 02:03:32 +0200 From: Riccardo Torrini To: freebsd-current@FreeBSD.ORG Message-ID: <20030802000332.GD73426@trudy.torrini.home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: newsyslog problems with -C X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Aug 2003 00:03:41 -0000 I have created a private newsyslog.conf with this contents: -----8<----- /var/tmp/foo foo:mail 600 7 * @T00 ZBCN /var/tmp/bar bar:mail 600 7 * @T00 ZBCN -----8<----- Without creating by hand /var/tmp/{foo,bar} this command fail leaving the temporary mkstemp /var/tmp/{foo,bar}.zXXXXXX (with XXXXXX variable): # cd /var/tmp # newsyslog -vvvvv -F -C -f /usr/local/etc/rotatemailbackup.conf --> [creating entry for /var/tmp/foo] --> [creating entry for /var/tmp/bar] /var/tmp/foo <7Z>: does not exist -> will create. newsyslog: can't fchmod temp file '/var/tmp/foo.z8FjDcW': Bad file descriptor # newsyslog -vvvvv -F -CC -f /silos/usr/local/etc/rotatemailbackup.conf --> [creating entry for /var/tmp/foo] --> [creating entry for /var/tmp/bar] /var/tmp/foo <7Z>: does not exist -> will create. newsyslog: can't fchmod temp file '/var/tmp/foo.zyXVe1U': Bad file descriptor But it works if I manually 'touch' both {foo,bar} # touch foo bar # newsyslog -vvvvv -F -C -f /silos/usr/local/etc/rotatemailbackup.conf --> [creating entry for /var/tmp/foo] --> [creating entry for /var/tmp/bar] /var/tmp/foo <7Z>: --> trimming log.... --> [freeing entry for /var/tmp/foo] /var/tmp/bar <7Z>: --> trimming log.... --> [freeing entry for /var/tmp/bar] # newsyslog -vvvvv -F -CC -f /silos/usr/local/etc/rotatemailbackup.conf --> [creating entry for /var/tmp/foo] --> [creating entry for /var/tmp/bar] /var/tmp/foo <7Z>: --> trimming log.... --> [freeing entry for /var/tmp/foo] /var/tmp/bar <7Z>: --> trimming log.... --> [freeing entry for /var/tmp/bar] It also fails if I remove the mandatory "C" flag from config file. So, how the -C and C parameters are supposed to works? NB: this happens on both 4.8 and recent -CURRENT and only when user:group are specified... -- Riccardo. ( http://www.GUFI.org/~vic/ )