From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 12 23:43:49 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 899B91065670 for ; Wed, 12 Nov 2008 23:43:49 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id 4B9068FC12 for ; Wed, 12 Nov 2008 23:43:48 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.3/8.14.3) with ESMTP id mACNhkJa062103 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 12 Nov 2008 17:43:46 -0600 (CST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.3/8.14.3/Submit) id mACNhjg3062088; Wed, 12 Nov 2008 17:43:45 -0600 (CST) (envelope-from dan) Date: Wed, 12 Nov 2008 17:43:45 -0600 From: Dan Nelson To: Charles Darwin Message-ID: <20081112234345.GL85407@dan.emsphone.com> References: <99926641-6491-4F76-B2D2-73B1C6D52033@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <99926641-6491-4F76-B2D2-73B1C6D52033@gmail.com> X-OS: FreeBSD 7.1-PRERELEASE User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-hackers@freebsd.org Subject: Re: Is chflags' "nodump + sunlnk" = "uchg" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2008 23:43:49 -0000 In the last episode (Nov 12), Charles Darwin said: > Hi all, > > Title is the question actually: Is chflags' "nodump + sunlnk" = "uchg" No; why would it be? From /usr/include/sys/stat.h: #define UF_NODUMP 0x00000001 /* do not dump file */ #define SF_NOUNLINK 0x00100000 /* file may not be removed or renamed */ #define UF_IMMUTABLE 0x00000002 /* file may not be changed */ nodump+sunlnk would be 0x00100001, while uchg is 0x00000002 . # touch a b # chflags nodump,sunlnk a # chflags uchg b # ls -lo a b -rw-r--r-- 1 root wheel sunlnk,nodump 0 Nov 12 17:42 a -rw-r--r-- 1 root wheel uchg 0 Nov 12 17:42 b # -- Dan Nelson dnelson@allantgroup.com