From owner-freebsd-hackers Wed Jan 1 14:25:04 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id OAA27480 for hackers-outgoing; Wed, 1 Jan 1997 14:25:04 -0800 (PST) Received: from profane.iq.org (profane.iq.org [203.4.184.217]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id OAA27472 for ; Wed, 1 Jan 1997 14:25:00 -0800 (PST) Received: (from proff@localhost) by profane.iq.org (8.8.4/8.8.2) id JAA06593 for hackers@freebsd.org; Thu, 2 Jan 1997 09:24:38 +1100 (EST) From: Julian Assange Message-Id: <199701012224.JAA06593@profane.iq.org> Subject: struct file locking To: hackers@freebsd.org Date: Thu, 2 Jan 1997 09:24:38 +1100 (EST) X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I am expanding the inet/socket code to permit firewall entries based on uid/gid. I have an aesthetic issue and one locking issue. I need to pass socket credential information into ip_output. There are two ways of doing this. I can add a back-pointer to the socket structure from the struct ipoption mbuf, or I can add an extra parameter to ip_output. I am inclinded towards the first option, for source-level compatability reasons. In the socket structure I intend to create a back-pointer to originating struct file's->u_cred. What do I need to do to insure these last two structures are reliably locked and in memory? Cheers, Julian.