Skip to content

Commit 1c1f025

Browse files
authored
Merge pull request ClusterLabs#1537 from oalbrigt/nfsserver-fix-selinux-label-issue
nfsserver/nfsnotify: fix SELinux issue due to newer ls versions giving additional output.
2 parents fbcd9c2 + 81118db commit 1c1f025

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

heartbeat/nfsnotify.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ esac
305305
which restorecon > /dev/null 2>&1 && selinuxenabled
306306
SELINUX_ENABLED=$?
307307
if [ $SELINUX_ENABLED -eq 0 ]; then
308-
export SELINUX_LABEL="$(ls -ldZ $STATD_PATH | cut -f4 -d' ')"
308+
export SELINUX_LABEL="$(ls -dZ $STATD_PATH | grep -o '\S\+:\S\+:\S\+')"
309309
fi
310310

311311
case $__OCF_ACTION in

heartbeat/nfsserver

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ fi
192192
which restorecon > /dev/null 2>&1 && selinuxenabled
193193
SELINUX_ENABLED=$?
194194
if [ $SELINUX_ENABLED -eq 0 ]; then
195-
export SELINUX_LABEL="$(ls -ldZ $STATD_PATH | cut -f4 -d' ')"
195+
export SELINUX_LABEL="$(ls -dZ $STATD_PATH | grep -o '\S\+:\S\+:\S\+')"
196196
fi
197197

198198
##

0 commit comments

Comments
 (0)