From 3fec17dd4535866de61ae3c12cbc590062d08d5d Mon Sep 17 00:00:00 2001 From: anand Date: Tue, 19 May 2015 14:31:23 +0530 Subject: Build: glusterd socket file cleanup to set SElinux context properly. Issue : glusterd runs as rpm_script_t when it's executed from the rpm scriptlet, socket file created in this context is set as rpm_script_t type, glusterd unable to access socket file when it runs in glusterd_t context (glusted not cleaning socket file while stoping due to some cleanup issues, so cleanup required in rpm install). Fix: In rpm post upgrade,remove the glusterd.socket file which is created by glusterd in rpm context. so that glusterd recreates socket file when it runs in glusterd_t context. Change-Id: I57041e2e0f9d3e74e12198507a9bd47d09f4a132 BUG: 1223185 Signed-off-by: anand Reviewed-on: http://review.gluster.org/10815 Reviewed-by: Niels de Vos Tested-by: NetBSD Build System Tested-by: Gluster Build System --- glusterfs.spec.in | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'glusterfs.spec.in') diff --git a/glusterfs.spec.in b/glusterfs.spec.in index fec097a881f..f988d4702bd 100644 --- a/glusterfs.spec.in +++ b/glusterfs.spec.in @@ -862,11 +862,20 @@ if [ $? -eq 0 ]; then killall --wait glusterd &> /dev/null glusterd --xlator-option *.upgrade=on -N + + #Cleaning leftover glusterd socket file which is created by glusterd in + #rpm_script_t context. + rm -rf /var/run/glusterd.socket + # glusterd _was_ running, we killed it, it exited after *.upgrade=on, # so start it again %_init_start glusterd else glusterd --xlator-option *.upgrade=on -N + + #Cleaning leftover glusterd socket file which is created by glusterd in + #rpm_script_t context. + rm -rf /var/run/glusterd.socket fi ##----------------------------------------------------------------------------- @@ -1193,6 +1202,9 @@ fi * Wed May 20 2015 Kaleb S. KEITHLEY - move libgf{db,changelog}.pc from -api-devel to -devel (#1223385) +* Wed May 20 2015 Anand Nekkunti +- glusterd.socket file cleanup during post run upgrade (#1210404) + * Tue May 05 2015 Niels de Vos - Introduce glusterfs-client-xlators to reduce dependencies (#1195947) -- cgit