From owner-freebsd-hackers Sun Jul 5 00:57:06 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA02761 for freebsd-hackers-outgoing; Sun, 5 Jul 1998 00:57:06 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from roma.coe.ufrj.br (jonny@roma.coe.ufrj.br [146.164.53.65]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA02756 for ; Sun, 5 Jul 1998 00:57:04 -0700 (PDT) (envelope-from jonny@jonny.eng.br) Received: (from jonny@localhost) by roma.coe.ufrj.br (8.8.8/8.8.8) id EAA03879; Sun, 5 Jul 1998 04:56:49 -0300 (EST) (envelope-from jonny) From: Joao Carlos Mendes Luis Message-Id: <199807050756.EAA03879@roma.coe.ufrj.br> Subject: Re: accton on a append-only file ? In-Reply-To: <199807041545.RAA13938@semyam.dinoco.de> from Stefan Eggers at "Jul 4, 98 05:45:36 pm" To: seggers@semyam.dinoco.de (Stefan Eggers) Date: Sun, 5 Jul 1998 04:56:49 -0300 (EST) Cc: jonny@jonny.eng.br, seggers@semyam.dinoco.de, hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL40 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG #define quoting(Stefan Eggers) // > 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. I've just sent it. It's kern/7169. // > 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. This worked for me at home. But since file writing at kernel level is somewhat tricky, I'd be a lot more happy if some FS expert verified it before commiting. If it's safe, please don't forget -stable, folks. :) Jonny -- Joao Carlos Mendes Luis M.Sc. Student jonny@jonny.eng.br Universidade Federal do Rio de Janeiro "There are two major products that come out of Berkeley: LSD and Unix. We don't believe this to be a coincidence." -- Jeremy S. Anderson To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message