https://fedorahosted.org/freeipa/ticket/6111
I was able to reproduce this locally with vagrant, but I haven't been able to reproduce this in LAB, I don't know where differences are (cloud vs desktop fedora?)
Patch attached.
From 80e95343c0ff3c8ee1bb8628507a31499e5a96f5 Mon Sep 17 00:00:00 2001 From: Martin Basti <[email protected]> Date: Thu, 21 Jul 2016 18:49:57 +0200 Subject: [PATCH] Use copy when replacing files to keep SELinux context When installer replaces any file with newer, it must use 'copy' instead of 'mv' to keep SELinux context valid. https://fedorahosted.org/freeipa/ticket/6111 --- ipapython/ipautil.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ipapython/ipautil.py b/ipapython/ipautil.py index 763a99c117e22a4ac49d8d34b38230f3da7c8435..9964fba4f694b57242b3bd3065a418917d977533 100644 --- a/ipapython/ipautil.py +++ b/ipapython/ipautil.py @@ -528,10 +528,14 @@ def dir_exists(filename): except Exception: return False + def install_file(fname, dest): + # SELinux: use copy to keep the right context if file_exists(dest): os.rename(dest, dest + ".orig") - shutil.move(fname, dest) + shutil.copy(fname, dest) + os.remove(fname) + def backup_file(fname): if file_exists(fname): -- 2.5.5
-- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
