From owner-freebsd-hackers Tue Feb 9 15:23:36 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA24696 for freebsd-hackers-outgoing; Tue, 9 Feb 1999 15:23:36 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA24691 for ; Tue, 9 Feb 1999 15:23:35 -0800 (PST) (envelope-from julian@whistle.com) Received: (from daemon@localhost) by alpo.whistle.com (8.8.5/8.8.5) id PAA13799; Tue, 9 Feb 1999 15:16:09 -0800 (PST) Received: from current1.whistle.com(207.76.205.22) via SMTP by alpo.whistle.com, id smtpdN13774; Tue Feb 9 23:16:04 1999 Date: Tue, 9 Feb 1999 15:15:50 -0800 (PST) From: Julian Elischer To: Matthew Dillon cc: Mark Hannon , freebsd-hackers@FreeBSD.ORG Subject: Re: Change to inherit nodump flag? In-Reply-To: <199902092241.OAA61365@apollo.backplane.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I don't think this is a good idea a better idea is to make th eapplication not descend into trees that have the nodump bit set on the directory. you can't "inherrit" all the way up a directory tree when it's moved into a directory with the nodump flag set. (I have the same problem with the SUIDDIR option in around the same piece of code..) julian > Yes, somewhere around line 2091 of ufs_vnops.c ( ufs_create() ). > Also around line 1296 of ufs_vnops.c ( ufs_mkdir() ). Just after > the gid inheritance. > > ... > ip = VTOI(tvp); > ip->i_gid = pdir->i_gid; > <-------------------- here > ... > > The 'i_flags' field ( not to be confused with 'i_flag' ) would have > to inherit the directory's nodump flag. > > Personally, I think this is the correct way of doing it - nodump > would be inherited just as directory gid is inherited. > > Another solution would be to hack the 'dump' program to be able to > remember 'nodump' recursively. I don't think that is as good a > solution as adjusting i_flags on create. > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message