1 # Unix SMB/CIFS implementation. Tests for smb manipulation
2 # Copyright (C) David Mulder <dmulder@suse.com> 2018
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 from samba
import tests
19 from samba
.gp
.gpclass
import GPOStorage
20 from samba
.param
import LoadParm
21 from samba
.gp
.gp_sec_ext
import gp_access_ext
23 class GPOTests(tests
.TestCase
):
26 self
.server
= os
.environ
["SERVER"]
27 self
.dc_account
= self
.server
.upper() + '$'
29 self
.lp
.load_default()
30 self
.creds
= self
.insta_creds(template
=self
.get_credentials())
32 def test_sec_ext_load_on_member(self
):
33 cache_dir
= self
.lp
.get('cache directory')
34 store
= GPOStorage(os
.path
.join(cache_dir
, 'gpo.tdb'))
36 gp_access_ext(self
.lp
, self
.creds
,
37 self
.creds
.get_username(), store
)
39 self
.fail('Initializing gp_access_ext should not require ad-dc')