From e8358eaea9ccf05c5c5ac0bf5c970663c611e333 Mon Sep 17 00:00:00 2001 From: Thorsten Scherf Date: Jun 15 2017 08:40:18 +0000 Subject: Changed ownership of ldiffile to DS_USER Resolves: https://pagure.io/freeipa/issue/7010 Reviewed-By: Martin Basti --- diff --git a/ipaserver/install/ipa_restore.py b/ipaserver/install/ipa_restore.py index d85c487..637d3f3 100644 --- a/ipaserver/install/ipa_restore.py +++ b/ipaserver/install/ipa_restore.py @@ -545,6 +545,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(