Changed ownership of ldiffile to DS_USER

Resolves:
https://pagure.io/freeipa/issue/7010

Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Thorsten Scherf 2017-06-01 22:02:57 +02:00 committed by Martin Basti
parent 342f72140f
commit e8358eaea9

View File

@ -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(