コード例 #1
0
ファイル: upgradeprovisionneeddc.py プロジェクト: hef/samba
 def setUp(self):
     super(UpgradeProvisionWithLdbTestCase, self).setUp()
     paths = get_paths(param, None, smb_conf_path)
     self.creds = Credentials()
     self.lp = env_loadparm()
     self.creds.guess(self.lp)
     self.paths = paths
     self.ldbs = get_ldbs(paths, self.creds, system_session(), self.lp)
     self.names = find_provision_key_parameters(
         self.ldbs.sam, self.ldbs.secrets, self.ldbs.idmap, paths, smb_conf_path, self.lp
     )
     self.referencedb = create_dummy_secretsdb(os.path.join(self.tempdir, "ref.ldb"))
コード例 #2
0
ファイル: upgradeprovisionneeddc.py プロジェクト: hef/samba
 def test_find_key_param(self):
     paths = get_paths(param, None, smb_conf_path)
     creds = Credentials()
     lp = env_loadparm()
     creds.guess(lp)
     rootdn = "dc=samba,dc=example,dc=com"
     ldbs = get_ldbs(paths, creds, system_session(), lp)
     names = find_provision_key_parameters(ldbs.sam, ldbs.secrets, ldbs.idmap, paths, smb_conf_path, lp)
     self.assertEquals(names.realm, "SAMBA.EXAMPLE.COM")
     self.assertEquals(str(names.rootdn).lower(), rootdn.lower())
     self.assertNotEquals(names.policyid_dc, None)
     self.assertNotEquals(names.ntdsguid, "")
コード例 #3
0
 def setUp(self):
     super(UpgradeProvisionWithLdbTestCase, self).setUp()
     paths = get_paths(param, None, smb_conf_path)
     self.creds = Credentials()
     self.lp = env_loadparm()
     self.creds.guess(self.lp)
     self.paths = paths
     self.ldbs = get_ldbs(paths, self.creds, system_session(), self.lp)
     self.names = find_provision_key_parameters(self.ldbs.sam,
             self.ldbs.secrets, self.ldbs.idmap, paths, smb_conf_path,
             self.lp)
     self.referencedb = create_dummy_secretsdb(
         os.path.join(self.tempdir, "ref.ldb"))
コード例 #4
0
 def test_find_key_param(self):
     paths = get_paths(param, None, smb_conf_path)
     creds = Credentials()
     lp = env_loadparm()
     creds.guess(lp)
     rootdn = "dc=samba,dc=example,dc=com"
     ldbs = get_ldbs(paths, creds, system_session(), lp)
     names = find_provision_key_parameters(ldbs.sam, ldbs.secrets, ldbs.idmap,
                                             paths, smb_conf_path, lp)
     self.assertEquals(names.realm, "SAMBA.EXAMPLE.COM")
     self.assertEquals(str(names.rootdn).lower(), rootdn.lower())
     self.assertNotEquals(names.policyid_dc, None)
     self.assertNotEquals(names.ntdsguid, "")
コード例 #5
0
 def test_get_ldbs(self):
     paths = get_paths(param, None, smb_conf_path)
     creds = Credentials()
     lp = env_loadparm()
     creds.guess(lp)
     get_ldbs(paths, creds, system_session(), lp)
コード例 #6
0
 def test_get_ldbs(self):
     paths = get_paths(param, None, smb_conf_path)
     creds = Credentials()
     lp = env_loadparm()
     creds.guess(lp)
     get_ldbs(paths, creds, system_session(), lp)