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

more fixups from provision changes

Andrew, can you please check this? The idmap.setup_name_mapping tests
look totally out of place here. I'm also not sure I captured your
intention with the other changes
This commit is contained in:
Andrew Tridgell
2009-08-17 17:34:22 +10:00
parent b62ce48f00
commit 905db32885
2 changed files with 24 additions and 24 deletions

View File

@ -19,7 +19,7 @@
from samba.auth import system_session
from samba.credentials import Credentials
import os
from samba.provision import setup_samdb, guess_names, setup_templatesdb, make_smbconf, find_setup_dir
from samba.provision import setup_samdb, guess_names, setup_templatesdb, make_smbconf, find_setup_dir, add_foreign
from samba.samdb import SamDB
from samba.tests import TestCaseInTempDir
from samba.dcerpc import security
@ -92,5 +92,17 @@ class SamDBTests(SamDBTestCase):
"""Tests for the SamDB implementation."""
def test_add_foreign(self):
self.samdb.add_foreign(self.domaindn, "S-1-5-7", "Somedescription")
add_foreign(self.samdb, self.domaindn, "S-1-5-7", "Anonymous")
add_foreign(self.samdb, self.domaindn, "S-1-1-0", "World")
add_foreign(self.samdb, self.domaindn, "S-1-5-2", "Network")
add_foreign(self.samdb, self.domaindn, "S-1-5-18", "System")
add_foreign(self.samdb, self.domaindn, "S-1-5-11", "Authenticated Users")
# I don't think these should be here ...
# idmap.setup_name_mapping("S-1-5-7", idmap.TYPE_UID, nobody_uid)
# idmap.setup_name_mapping("S-1-5-32-544", idmap.TYPE_GID, wheel_gid)
#
# idmap.setup_name_mapping(sid + "-500", idmap.TYPE_UID, root_uid)
# idmap.setup_name_mapping(sid + "-513", idmap.TYPE_GID, users_gid)