Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Feb 2002 22:14:43 -0800
From:      Byron Servies <bservies@pacang.com>
To:        Alfred Perlstein <bright@mu.org>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: Retrieving a list of ACLs for a file
Message-ID:  <20020225221443.K13918@pacang.com>
In-Reply-To: <20020226060525.GF80761@elvis.mu.org>; from bright@mu.org on Mon, Feb 25, 2002 at 10:05:25PM -0800
References:  <20020225215526.J13918@pacang.com> <20020226060525.GF80761@elvis.mu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On February 25, 2002 at 22:05, Alfred Perlstein wrote:
> * Byron Servies <bservies@pacang.com> [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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020225221443.K13918>