URL: https://github.com/freeipa/freeipa/pull/842 Author: tscherf Title: #842: Changed ownership of ldiffile to DS_USER Action: opened
PR body: """ Changes the ownership of the modified ldiffile created by ipa-restore to dirsrv. """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/842/head:pr842 git checkout pr842
From a570d66b7ed64e5232df2534781268db6325c080 Mon Sep 17 00:00:00 2001 From: Thorsten Scherf <tsch...@redhat.com> Date: Thu, 1 Jun 2017 22:02:57 +0200 Subject: [PATCH] Changed ownership of ldiffile to DS_USER --- ipaserver/install/ipa_restore.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ipaserver/install/ipa_restore.py b/ipaserver/install/ipa_restore.py index d85c4874d8..637d3f3f4a 100644 --- a/ipaserver/install/ipa_restore.py +++ b/ipaserver/install/ipa_restore.py @@ -545,6 +545,10 @@ def ldif2db(self, instance, backend, online=True): 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(
_______________________________________________ FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org