Gitweb:
http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=9ccbdd99693...
Commit: 9ccbdd996938e5e5cd9f247ffbd1aace87eb7641
Parent: 3ac6fa12877780c28b07c9d2402687f878ba374e
Author: Ryan McCabe <rmccabe(a)redhat.com>
AuthorDate: Mon May 20 15:16:02 2013 -0400
Committer: Ryan McCabe <rmccabe(a)redhat.com>
CommitterDate: Wed May 29 13:15:13 2013 -0400
Med: Don't preserve SELinux context when copying files to /var/lib/nfs/sm
Pass the flags -Rdpf instead of -af to cp when copying files to
/var/lib/nfs/sm so that the SELinux context is inherited from the
target directory and not preserved from the files being copied.
Resolves: rhbz#967456
Signed-off-by: Ryan McCabe <rmccabe(a)redhat.com>
---
rgmanager/src/resources/svclib_nfslock | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/rgmanager/src/resources/svclib_nfslock
b/rgmanager/src/resources/svclib_nfslock
index 2ec7bdd..fbfa94e 100644
--- a/rgmanager/src/resources/svclib_nfslock
+++ b/rgmanager/src/resources/svclib_nfslock
@@ -228,7 +228,7 @@ notify_list_store()
fi
owner=$(ls -dl /var/lib/nfs/statd/sm | awk '{print $3"."$4}')
- cp -af /var/lib/nfs/statd/sm/* $nl_dir/sm
+ cp -Rdpf /var/lib/nfs/statd/sm/* $nl_dir/sm
chown -R $owner $nl_dir
return 0
elif [ -d "/var/lib/nfs/sm" ]; then
@@ -238,7 +238,7 @@ notify_list_store()
fi
owner=$(ls -dl /var/lib/nfs/sm | awk '{print $3"."$4}')
- cp -af /var/lib/nfs/sm/* $nl_dir/sm
+ cp -Rdpf /var/lib/nfs/sm/* $nl_dir/sm
chown -R $owner $nl_dir
return 0
fi
@@ -265,12 +265,12 @@ notify_list_merge()
if [ -d "/var/lib/nfs/statd/sm" ]; then
owner=$(ls -dl /var/lib/nfs/statd/sm | awk '{print $3"."$4}')
- cp -af $nl_dir/sm/* /var/lib/nfs/statd/sm
+ cp -Rdpf $nl_dir/sm/* /var/lib/nfs/statd/sm
chown -R $owner $nl_dir
return 0
elif [ -d "/var/lib/nfs/sm" ]; then
owner=$(ls -dl /var/lib/nfs/sm | awk '{print $3"."$4}')
- cp -af $nl_dir/sm/* /var/lib/nfs/sm
+ cp -Rdpf $nl_dir/sm/* /var/lib/nfs/sm
chown -R $owner $nl_dir
return 0
fi