Bacula-users

Re: [Bacula-users] Backup xattrs (SELinux)?

2008-09-07 12:07:07
Subject: Re: [Bacula-users] Backup xattrs (SELinux)?
From: Kern Sibbald <kern AT sibbald DOT com>
To: Frank Sweetser <fes AT users.sourceforge DOT net>
Date: Sun, 7 Sep 2008 18:05:34 +0200
Hello Frank,

I would like to understand what the difference between:

1. Normal ACLs that are referenced through libacl.
2. Extended attribute referenced by the API you show below.
3. Selinux security contexts which are referenced through the 
  getfilecon and setfilecon API.

In particular, does Bacula need to backup normal ACLs, Extended ACLs and 
Selinux security contexts if all three APIs are available on a system (such 
as my CentOS 5.2 system)??  Or does backing up/restoring extended ACLs 
automatically include the others????

Best regards,

Kern


On Wednesday 04 January 2006 22:07:01 Frank Sweetser wrote:
> On Wed, Jan 04, 2006 at 09:57:46PM +0100, Kern Sibbald wrote:
> > Not quite.
> >
> > I run SELinux here on my server so I have a reasonable idea (rather
> > primitave though) of how it works.  Are you telling me that libacl
> > returns only a subset of the possible extended attributes?   If that is
> > the case, it seems to me that we should modify the Bacula ACL code to
> > save/restore *all* the extended attributes.  However, maybe that is not
> > so easy.
>
> If possible, yes, I'd certainly agree =)
>
> > Do you have any idea what the low level system calls are that get/set
> > extended attributes?  (i.e. what does getfattr and setfattr use?).
>
> It uses the *xattr family of functions
>
>        #include <sys/types.h>
>        #include <attr/xattr.h>
>
>        ssize_t getxattr (const char *path, const char *name, ...
>        ssize_t lgetxattr (const char *path, const char *name, ...
>        ssize_t fgetxattr (int filedes, const char *name, ...
>
>        ssize_t listxattr (const char *path, ...
>        ssize_t llistxattr (const char *path, ...
>        ssize_t flistxattr (int filedes, ...
>
>        int setxattr (const char *path, const char *name, ...
>        int lsetxattr (const char *path, const char *name, ...
>        int fsetxattr (int filedes, const char *name, ...



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>