From 58f3af38f8a0853b4a74c86e5f6252684f814a26 Mon Sep 17 00:00:00 2001 From: Thorsten Scherf Date: Jan 12 2018 19:47:03 +0000 Subject: Changed ownership of ldiffile to DS_USER Resolves: https://pagure.io/freeipa/issue/7010 Reviewed-By: Martin Basti Reviewed-By: Stanislav Laznicka --- diff --git a/ipaserver/install/ipa_restore.py b/ipaserver/install/ipa_restore.py index 923b1d6..a3824df 100644 --- a/ipaserver/install/ipa_restore.py +++ b/ipaserver/install/ipa_restore.py @@ -540,6 +540,10 @@ class Restore(admintool.AdminTool): ldif_parser = RemoveRUVParser(in_file, ldif_writer, self.log) ldif_parser.parse() + # Make sure the modified ldiffile is owned by DS_USER + pent = pwd.getpwnam(constants.DS_USER) + os.chown(ldiffile, pent.pw_uid, pent.pw_gid) + if online: conn = self.get_connection() ent = conn.make_entry(