cluster: RHEL510 - Med: Don't preserve SELinux context when copying files to /var/lib/nfs/sm
Ryan McCabe
rmccabe at fedoraproject.org
Tue May 21 03:46:58 UTC 2013
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=0c3782fd3fa61e9ceea938cc4f61e8572c6916c8
Commit: 0c3782fd3fa61e9ceea938cc4f61e8572c6916c8
Parent: d45a4fe2fa265a19a4130161caa4ce92367f9072
Author: Ryan McCabe <rmccabe at redhat.com>
AuthorDate: Mon May 20 15:16:02 2013 -0400
Committer: Ryan McCabe <rmccabe at redhat.com>
CommitterDate: Mon May 20 23:46:49 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#907898
Signed-off-by: Ryan McCabe <rmccabe at 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
More information about the cluster-commits
mailing list