1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-22 16:59:09 +03:00

gpo: Apply Group Policy Login Prompt Message

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-08 15:30:25 -06:00
committed by David Mulder
parent b76d55cc90
commit 1544929fee
4 changed files with 57 additions and 1 deletions

View File

@ -29,6 +29,8 @@ class gp_msgs_ext(gp_pol_ext):
for attribute, msg in settings[str(self)].items():
if attribute == 'motd':
mfile = os.path.join(cdir, 'motd')
elif attribute == 'issue':
mfile = os.path.join(cdir, 'issue')
else:
continue
with open(mfile, 'w') as w:
@ -52,6 +54,8 @@ class gp_msgs_ext(gp_pol_ext):
if e.keyname == section_name and e.data.strip():
if e.valuename == 'motd':
mfile = os.path.join(cdir, 'motd')
elif e.valuename == 'issue':
mfile = os.path.join(cdir, 'issue')
else:
continue
if os.path.exists(mfile):