From owner-freebsd-hackers Sat Jul 4 08:48:58 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA10984 for freebsd-hackers-outgoing; Sat, 4 Jul 1998 08:48:58 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from tim.xenologics.com (tim.xenologics.com [194.77.5.24]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA10979 for ; Sat, 4 Jul 1998 08:48:55 -0700 (PDT) (envelope-from seggers@semyam.dinoco.de) Received: (from uucp@localhost) by tim.xenologics.com (8.8.5/8.8.8) with UUCP id RAA29432; Sat, 4 Jul 1998 17:47:58 +0200 (MET DST) Received: from localhost (localhost [127.0.0.1]) by semyam.dinoco.de (8.8.8/8.8.8) with ESMTP id RAA13938; Sat, 4 Jul 1998 17:45:37 +0200 (CEST) (envelope-from seggers@semyam.dinoco.de) Message-Id: <199807041545.RAA13938@semyam.dinoco.de> cc: Joao Carlos Mendes Luis , seggers@semyam.dinoco.de To: hackers@FreeBSD.ORG Subject: Re: accton on a append-only file ? In-reply-to: Your message of "Fri, 03 Jul 1998 20:13:34 -0300." <199807032313.UAA06560@roma.coe.ufrj.br> Date: Sat, 04 Jul 1998 17:45:36 +0200 From: Stefan Eggers Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I've created the /var/account/acct file with sappend,sunlink flags, > but accton return EPERM. If I run accton before setting those flags, > This seems to be a bug, but I still have much to learn from VFS To me, too. It is because kern_acct.c in 2.2-stable opens the file for writing, not for appending. There is the problem: /* * If accounting is to be started to a file, open that file for * writing and make sure it's a 'normal'. */ if (uap->path != NULL) { NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_USERSPACE, uap->path, p); error = vn_open(&nd, FWRITE, 0); if (error) return (error); Unless there is already a PR for this (check the PR database on the FreeBSD web pages) I'd suggest sending in a new one. > before searching for the culprit myself. Does it deserve a send-pr, > even without patches ? I think it's as easy as adding FAPPEND to the mode. The only problem is making sure that it has no unexpected side effects. If you like quote this email in the PR to point at a possible way to fix it. Stefan. -- Stefan Eggers Lu4 yao2 zhi1 ma3 li4, Max-Slevogt-Str. 1 ri4 jiu3 jian4 ren2 xin1. 51109 Koeln Federal Republic of Germany To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message