1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

gpo: Scripts extension use 'gp_' prefix, not 'tmp'

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
David Mulder 2020-07-02 10:04:36 -06:00 committed by David Mulder
parent cd4efb95da
commit edf4b6eb12

View File

@ -52,8 +52,8 @@ class gp_scripts_ext(gp_pol_ext):
b64encode(e.data.encode()).decode())
old_val = self.gp_db.retrieve(str(self), attribute)
if not old_val:
with NamedTemporaryFile(mode="w+", delete=False,
dir=cron_dir) as f:
with NamedTemporaryFile(prefix='gp_', mode="w+",
delete=False, dir=cron_dir) as f:
f.write('#!/bin/sh\n%s' % e.data)
os.chmod(f.name, 0o700)
self.gp_db.store(str(self), attribute, f.name)