From owner-freebsd-fs Mon Feb 25 22:14:49 2002 Delivered-To: freebsd-fs@freebsd.org Received: from dns.pacang.com (adsl-63-193-245-242.dsl.snfc21.pacbell.net [63.193.245.242]) by hub.freebsd.org (Postfix) with ESMTP id C4C5337B402 for ; Mon, 25 Feb 2002 22:14:45 -0800 (PST) Received: (from bservies@localhost) by dns.pacang.com (8.9.3/8.9.2) id WAA15040; Mon, 25 Feb 2002 22:14:43 -0800 Date: Mon, 25 Feb 2002 22:14:43 -0800 From: Byron Servies To: Alfred Perlstein Cc: freebsd-fs@freebsd.org Subject: Re: Retrieving a list of ACLs for a file Message-ID: <20020225221443.K13918@pacang.com> References: <20020225215526.J13918@pacang.com> <20020226060525.GF80761@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020226060525.GF80761@elvis.mu.org>; from bright@mu.org on Mon, Feb 25, 2002 at 10:05:25PM -0800 Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On February 25, 2002 at 22:05, Alfred Perlstein wrote: > * Byron Servies [020225 21:55] wrote: > > Hi there! > > > > I am working on adding ACL support to the freebsd port of Legato > > NetWorker. Everything appears to be straight forward, with the > > exception of retrieving a complete list of the ACLs on a file. > > > > >From the acl_get manual page, it appears that there is no way > > to retrieve a complete list, but that each ACL type must be > > retrieved individually. My concern is that if new ACL types > > are added, the backup will still succeed though the new ACLs > > would not actually be backed up. > > > > Does anyone have any suggestions on a good way to retrieve > > a complete list, or do I just have to hard code it? > > acl_get_entry(3) > > specifically: > > If the value of entry_id is ACL_FIRST_ENTRY, then the function will > return in entry_p a descriptor for the first ACL entry within acl. If a > call is made to acl_get_entry() with entry_id set to ACL_NEXT_ENTRY when > there has not been either an initial successful call to acl_get_entry(), > or a previous successfull call to acl_create_entry(), acl_delete_entry(), > acl_dup(), acl_from_text(), acl_get_fd(), acl_get_file(), acl_set_fd(), > acl_set_file(), or acl_valid(), then the result is unspecified. This will allow you to itterate over the entries in an acl after it has been retrieved from a file (e.g with acl_get_file). But each file may have multiple acls, apparently requiring multiple acl_get_file calls with specific acl type specifiers. Thanks, though. Byron To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message