mirror of
https://github.com/samba-team/samba.git
synced 2025-08-04 08:22:08 +03:00
GPO: Test rsop output for Messages policy
Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
committed by
David Mulder
parent
1544929fee
commit
2ef88466f4
@ -487,6 +487,7 @@ class GPOTests(tests.TestCase):
|
|||||||
gp_extensions.append(gp_scripts_ext)
|
gp_extensions.append(gp_scripts_ext)
|
||||||
gp_extensions.append(gp_sudoers_ext)
|
gp_extensions.append(gp_sudoers_ext)
|
||||||
gp_extensions.append(gp_smb_conf_ext)
|
gp_extensions.append(gp_smb_conf_ext)
|
||||||
|
gp_extensions.append(gp_msgs_ext)
|
||||||
|
|
||||||
# Create registry stage data
|
# Create registry stage data
|
||||||
reg_pol = os.path.join(local_path, policies, '%s/MACHINE/REGISTRY.POL')
|
reg_pol = os.path.join(local_path, policies, '%s/MACHINE/REGISTRY.POL')
|
||||||
@ -506,8 +507,13 @@ class GPOTests(tests.TestCase):
|
|||||||
e3.type = 4
|
e3.type = 4
|
||||||
e3.data = 1
|
e3.data = 1
|
||||||
e3.valuename = 'apply group policies'
|
e3.valuename = 'apply group policies'
|
||||||
reg_stage.num_entries = 3
|
e4 = preg.entry()
|
||||||
reg_stage.entries = [e, e2, e3]
|
e4.keyname = b'Software\\Policies\\Samba\\Unix Settings\\Messages'
|
||||||
|
e4.valuename = b'issue'
|
||||||
|
e4.type = 1
|
||||||
|
e4.data = b'Welcome to \\s \\r \\l'
|
||||||
|
reg_stage.num_entries = 4
|
||||||
|
reg_stage.entries = [e, e2, e3, e4]
|
||||||
|
|
||||||
# Create krb stage date
|
# Create krb stage date
|
||||||
gpofile = os.path.join(local_path, policies, '%s/MACHINE/MICROSOFT/' \
|
gpofile = os.path.join(local_path, policies, '%s/MACHINE/MICROSOFT/' \
|
||||||
@ -556,6 +562,12 @@ class GPOTests(tests.TestCase):
|
|||||||
'apply group policies was not applied')
|
'apply group policies was not applied')
|
||||||
self.assertEquals(ret['smb.conf'][e3.valuename], e3.data,
|
self.assertEquals(ret['smb.conf'][e3.valuename], e3.data,
|
||||||
'apply group policies was not set')
|
'apply group policies was not set')
|
||||||
|
# Check the Messages Extension
|
||||||
|
elif type(ext) == gp_msgs_ext:
|
||||||
|
self.assertIn('/etc/issue', ret,
|
||||||
|
'Login Prompt Message not applied')
|
||||||
|
self.assertEquals(ret['/etc/issue'], e4.data,
|
||||||
|
'Login Prompt Message not set')
|
||||||
unstage_file(gpofile % g.name)
|
unstage_file(gpofile % g.name)
|
||||||
unstage_file(reg_pol % g.name)
|
unstage_file(reg_pol % g.name)
|
||||||
|
|
||||||
|
1
selftest/knownfail.d/gpo
Normal file
1
selftest/knownfail.d/gpo
Normal file
@ -0,0 +1 @@
|
|||||||
|
samba.tests.gpo.samba.tests.gpo.GPOTests.test_rsop
|
Reference in New Issue
Block a user