mirror of
https://github.com/samba-team/samba.git
synced 2025-03-27 22:50:26 +03:00
Remove unnecessary imports.
This commit is contained in:
parent
8557d14f65
commit
478446f96d
@ -42,7 +42,6 @@ else:
|
||||
|
||||
|
||||
import ldb
|
||||
import credentials
|
||||
import glue
|
||||
|
||||
class Ldb(ldb.Ldb):
|
||||
|
@ -20,7 +20,7 @@
|
||||
"""Support for parsing Samba-related command-line options."""
|
||||
|
||||
import optparse
|
||||
from credentials import Credentials, AUTO_USE_KERBEROS, DONT_USE_KERBEROS, MUST_USE_KERBEROS
|
||||
from credentials import Credentials, DONT_USE_KERBEROS, MUST_USE_KERBEROS
|
||||
from hostconfig import Hostconfig
|
||||
|
||||
__docformat__ = "restructuredText"
|
||||
|
@ -23,8 +23,6 @@
|
||||
__docformat__ = "restructuredText"
|
||||
|
||||
import samba
|
||||
import glue
|
||||
import ldb
|
||||
|
||||
class IDmapDB(samba.Ldb):
|
||||
"""The IDmap database."""
|
||||
|
@ -38,13 +38,12 @@ import registry
|
||||
import samba
|
||||
from auth import system_session
|
||||
from samba import version, Ldb, substitute_var, valid_netbios_name, check_all_substituted, \
|
||||
DS_BEHAVIOR_WIN2000, DS_BEHAVIOR_WIN2003_INTERIM, DS_BEHAVIOR_WIN2003, DS_BEHAVIOR_WIN2008
|
||||
DS_BEHAVIOR_WIN2008
|
||||
from samba.samdb import SamDB
|
||||
from samba.idmap import IDmapDB
|
||||
from samba.dcerpc import security
|
||||
import urllib
|
||||
from ldb import SCOPE_SUBTREE, SCOPE_ONELEVEL, SCOPE_BASE, LdbError, \
|
||||
timestring, CHANGETYPE_MODIFY, CHANGETYPE_NONE
|
||||
from ldb import SCOPE_SUBTREE, LdbError, timestring
|
||||
from ms_schema import read_ms_schema
|
||||
|
||||
__docformat__ = "restructuredText"
|
||||
|
@ -502,7 +502,7 @@ TDBSAM_USER_PREFIX = "USER_"
|
||||
class LdapSam(object):
|
||||
"""Samba 3 LDAP passdb backend reader."""
|
||||
def __init__(self, url):
|
||||
self.ldap_url = ldap_url
|
||||
self.ldap_url = url
|
||||
|
||||
|
||||
class TdbSam(TdbDatabase):
|
||||
@ -692,7 +692,7 @@ class ParamFile(object):
|
||||
(k, v) = l.split("=", 1)
|
||||
self._sections[section][self._sanitize_name(k)] = v
|
||||
else:
|
||||
raise Error("Unable to parser line %d: %r" % (i+1,l))
|
||||
raise Exception("Unable to parser line %d: %r" % (i+1,l))
|
||||
|
||||
def get(self, param, section=None):
|
||||
"""Return the value of a parameter.
|
||||
|
@ -9,17 +9,16 @@
|
||||
|
||||
__docformat__ = "restructuredText"
|
||||
|
||||
from provision import findnss, provision, FILL_DRS
|
||||
from provision import provision, FILL_DRS
|
||||
import grp
|
||||
import ldb
|
||||
import time
|
||||
import pwd
|
||||
import uuid
|
||||
import registry
|
||||
from samba import Ldb
|
||||
from samba.samdb import SamDB
|
||||
from samba.param import LoadParm
|
||||
|
||||
def import_sam_policy(samldb, samba3_policy, domaindn):
|
||||
def import_sam_policy(samldb, policy, dn):
|
||||
"""Import a Samba 3 policy database."""
|
||||
samldb.modify_ldif("""
|
||||
dn: %s
|
||||
@ -394,7 +393,7 @@ def upgrade_smbconf(oldconf,mark):
|
||||
kept in the new configuration as "samba3:<name>"
|
||||
"""
|
||||
data = oldconf.data()
|
||||
newconf = param_init()
|
||||
newconf = LoadParm()
|
||||
|
||||
for s in data:
|
||||
for p in data[s]:
|
||||
|
Loading…
x
Reference in New Issue
Block a user