When user specifies nfs mount info like: path / core_collector makedumpfile -d 31 dracut_args --mount "host:/path /var/crash nfs defaults" kdump service neither guarantees the correctness, nor relabels it.
Signed-off-by: Pingfan Liu piliu@redhat.com --- kdumpctl | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/kdumpctl b/kdumpctl index d4e0050..0dd1909 100755 --- a/kdumpctl +++ b/kdumpctl @@ -1013,6 +1013,10 @@ path_to_be_relabeled() fi fi
+ # users are expected to ensure its correctness of specifying mount info. So kdumpctl skips it. + if [[ $(get_dracut_args_fstype "$(grep "^dracut_args .*--mount" /etc/kdump.conf)") = nfs* ]]; then + return; + fi _path=$(get_save_path) # if $_path is masked by other mount, we will not relabel it. _rmnt=$(df $_mnt/$_path 2>/dev/null | tail -1 | awk '{ print $NF }')
Hi Pingfan,
The subject looks unclear. It can be better something like: "Skip selinux relabel for dracut_args --mount dump target"
On 11/29/17 at 10:17am, Pingfan Liu wrote:
When user specifies nfs mount info like: path / core_collector makedumpfile -d 31 dracut_args --mount "host:/path /var/crash nfs defaults" kdump service neither guarantees the correctness, nor relabels it.
This is true, but it also worth to say more about what happened in the bug report, eg. user visible failure and the reason so it can be more easy to understand why.
Signed-off-by: Pingfan Liu piliu@redhat.com
kdumpctl | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/kdumpctl b/kdumpctl index d4e0050..0dd1909 100755 --- a/kdumpctl +++ b/kdumpctl @@ -1013,6 +1013,10 @@ path_to_be_relabeled() fi fi
- # users are expected to ensure its correctness of specifying mount info. So kdumpctl skips it.
- if [[ $(get_dracut_args_fstype "$(grep "^dracut_args .*--mount" /etc/kdump.conf)") = nfs* ]]; then
return;
- fi
It should not be limited to nfs, any targets passed in dracut_args should be skipped. Just use the function is_mount_in_dracut_args()
_path=$(get_save_path) # if $_path is masked by other mount, we will not relabel it. _rmnt=$(df $_mnt/$_path 2>/dev/null | tail -1 | awk '{ print $NF }') -- 2.7.4 _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org
Thanks Dave