Skip to contentSkip to conversation

adding fixfiles support for the Lustre filesystem

PATCH New Elia Pinto 2 participants 2 messages Mar 26, 2010

lore
Share & tools
lore

Elia Pinto

author
#0 lore raw

PATCH 1/1 adding fixfiles support for the Lustre filesystem

The Lustre filesystem support extended xattr and
currenty it is necessary to extend fixfiles for
every xattr capable filesystem.

---
 policycoreutils/scripts/fixfiles |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
(quoted diff) +0 -0

b/policycoreutils/scripts/fixfiles
index ae519fc..0d5d3d6 100755

policycoreutils/scripts/fixfiles +0 -1
@@ -35,8 +35,8 @@ SYSLOGFLAG="-l"
 LOGGER=/usr/sbin/logger
 SETFILES=/sbin/setfiles
 RESTORECON=/sbin/restorecon
-FILESYSTEMSRW=`mount | grep -v "context=" | egrep -v '\((|.*,)bind(,.*|)\)'
| awk '/(ext[234]| ext4dev | gfs2 | xfs | jfs | btrfs ).*\(rw/{print $3}';`
-FILESYSTEMSRO=`mount | grep -v "context=" | egrep -v '\((|.*,)bind(,.*|)\)'
| awk '/(ext[234]| ext4dev | gfs2 | xfs | jfs | btrfs ).*\(ro/{print $3}';`
+FILESYSTEMSRW=`mount | grep -v "context=" | egrep -v '\((|.*,)bind(,.*|)\)'
| awk '/(ext[234]| ext4dev | gfs2 | xfs | jfs | btrfs | lustre

).*\(rw/{print $3}';`
+FILESYSTEMSRO=mount | grep -v "context=" | egrep -v '\((|.*,)bind(,.*|)\)' | awk '/(ext[234]| ext4dev | gfs2 | xfs | jfs | btrfs | lustre ).*\(ro/{print $3}';
FILESYSTEMS="$FILESYSTEMSRW $FILESYSTEMSRO" SELINUXTYPE="targeted"
if [ -e /etc/selinux/config ]; then
@@ -88,7 +88,7 @@ if [ -f ${PREFC} -a -x /usr/bin/diff ]; then

                fi; \
             done | \
        while read pattern ; do sh -c "find $pattern \

- ! \( -fstype ext2 -o -fstype ext3 -o -fstype ext4 -o
-fstype ext4dev -o -fstype gfs2 -o -fstype jfs -o -fstype xfs -o -fstype btrfs \) -prune -o \
+ ! \( -fstype ext2 -o -fstype ext3 -o -fstype ext4 -o
-fstype ext4dev -o -fstype gfs2 -o -fstype jfs -o -fstype xfs -o -fstype btrfs -o fstype lustre \) -prune -o \
\( -wholename /home -o -wholename /root -o -wholename

/tmp -wholename /dev \) -prune -o -print0"; \
                      done 2> /dev/null | \
         ${RESTORECON} $* -0 -f -

@@ -128,7 +128,7 @@ fi
if [ ! -z "$FILEPATH" ]; then
if [ -x /usr/bin/find ]; then
/usr/bin/find "$FILEPATH" \
- ! \( -fstype ext2 -o -fstype ext3 -o -fstype ext4 -o -fstype
ext4dev -o -fstype gfs2 -o -fstype jfs -o -fstype xfs -o -fstype btrfs \) -prune -o -print0 | \
+ ! \( -fstype ext2 -o -fstype ext3 -o -fstype ext4 -o -fstype
ext4dev -o -fstype gfs2 -o -fstype jfs -o -fstype xfs -o -fstype btrfs -o

-fstype lustre \) -prune  -o -print0 | \
            ${RESTORECON} ${FORCEFLAG} $* -0 -f - 2>&1 >> $LOGFILE
     else
        ${RESTORECON} ${FORCEFLAG} -R $* $FILEPATH 2>&1 >> $LOGFILE

--
1.6.6
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.tresys.com/pipermail/refpolicy/attachments/20100326/26a4a550/attachment.html

#1 lore raw

PATCH 1/1 adding fixfiles support for the Lustre filesystem

Quoted 64 lines · Elia Pinto

The Lustre filesystem support extended xattr and
currenty it is necessary to extend fixfiles for
every xattr capable filesystem.

---
 policycoreutils/scripts/fixfiles |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
policycoreutils/scripts/fixfiles +0 -1
index ae519fc..0d5d3d6 100755
@@ -35,8 +35,8 @@ SYSLOGFLAG="-l"
 LOGGER=/usr/sbin/logger
 SETFILES=/sbin/setfiles
 RESTORECON=/sbin/restorecon
-FILESYSTEMSRW=`mount | grep -v "context=" | egrep -v 

'\((|.*,)bind(,.*|)\)' | awk '/(ext[234]| ext4dev | gfs2 | xfs | jfs | btrfs ).*\(rw/{print $3}';`
-FILESYSTEMSRO=mount | grep -v "context=" | egrep -v '\((|.*,)bind(,.*|)\)' | awk '/(ext[234]| ext4dev | gfs2 | xfs | jfs | btrfs ).*\(ro/{print $3}';
+FILESYSTEMSRW=mount | grep -v "context=" | egrep -v '\((|.*,)bind(,.*|)\)' | awk '/(ext[234]| ext4dev | gfs2 | xfs | jfs | btrfs | lustre ).*\(rw/{print $3}';
+FILESYSTEMSRO=mount | grep -v "context=" | egrep -v '\((|.*,)bind(,.*|)\)' | awk '/(ext[234]| ext4dev | gfs2 | xfs | jfs | btrfs | lustre ).*\(ro/{print $3}';
FILESYSTEMS="$FILESYSTEMSRW $FILESYSTEMSRO" SELINUXTYPE="targeted"
if [ -e /etc/selinux/config ]; then

policycoreutils/scripts/fixfiles +0 -1
@@ -88,7 +88,7 @@ if [ -f ${PREFC} -a -x /usr/bin/diff ]; then
                fi; \
             done | \
        while read pattern ; do sh -c "find $pattern \
-                     ! \( -fstype ext2 -o -fstype ext3 -o -fstype 

ext4 -o -fstype ext4dev -o -fstype gfs2 -o -fstype jfs -o -fstype xfs

policycoreutils/scripts/fixfiles +1 -1
-o -fstype btrfs \) -prune  -o \
+                     ! \( -fstype ext2 -o -fstype ext3 -o -fstype 

ext4 -o -fstype ext4dev -o -fstype gfs2 -o -fstype jfs -o -fstype xfs

policycoreutils/scripts/fixfiles +1 -8
-o -fstype btrfs -o fstype lustre \) -prune  -o \
                      \( -wholename /home -o -wholename /root -o 
-wholename /tmp -wholename /dev \) -prune -o -print0"; \
                      done 2> /dev/null | \
         ${RESTORECON} $* -0 -f -
@@ -128,7 +128,7 @@ fi
 if [ ! -z "$FILEPATH" ]; then
     if [ -x /usr/bin/find ]; then
        /usr/bin/find "$FILEPATH" \
-           ! \( -fstype ext2 -o -fstype ext3 -o -fstype ext4 -o 
-fstype ext4dev -o -fstype gfs2 -o -fstype jfs -o -fstype xfs -o 
-fstype btrfs \) -prune  -o -print0 | \
+           ! \( -fstype ext2 -o -fstype ext3 -o -fstype ext4 -o 
-fstype ext4dev -o -fstype gfs2 -o -fstype jfs -o -fstype xfs -o 
-fstype btrfs -o -fstype lustre \) -prune  -o -print0 | \
            ${RESTORECON} ${FORCEFLAG} $* -0 -f - 2>&1 >> $LOGFILE
     else
        ${RESTORECON} ${FORCEFLAG} -R $* $FILEPATH 2>&1 >> $LOGFILE
--

1.6.6

Quoted 5 lines

_______________________________________________
refpolicy mailing list
refpolicy at oss.tresys.com
http://oss.tresys.com/mailman/listinfo/refpolicy

The latest fixfiles patches remove the need to list file systems that
support labels. If they ever get upstreamed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.tresys.com/pipermail/refpolicy/attachments/20100326/72f58fad/attachment.html