summaryrefslogtreecommitdiffstats
path: root/source4/scripting/python/samba/upgrade.py
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2012-09-16 14:18:51 +0200
committerJelmer Vernooij <jelmer@samba.org>2012-09-16 15:58:04 +0200
commitc0d4f2462f75e0bc0545402b76984b4e6fcb13f1 (patch)
tree03ca71b2ee0775e0e5ab77ddace58fd1c5936c1e /source4/scripting/python/samba/upgrade.py
parent0ff2ea56d97cd8df7abeea8e819d7ec0bfd5b886 (diff)
downloadsamba-c0d4f2462f75e0bc0545402b76984b4e6fcb13f1.tar.gz
samba-c0d4f2462f75e0bc0545402b76984b4e6fcb13f1.tar.xz
samba-c0d4f2462f75e0bc0545402b76984b4e6fcb13f1.zip
s4-python: Formatting fixes, break lines.
Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org> Autobuild-Date(master): Sun Sep 16 15:58:04 CEST 2012 on sn-devel-104
Diffstat (limited to 'source4/scripting/python/samba/upgrade.py')
-rw-r--r--source4/scripting/python/samba/upgrade.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/source4/scripting/python/samba/upgrade.py b/source4/scripting/python/samba/upgrade.py
index 6b6a188fa8..05d0dd6d88 100644
--- a/source4/scripting/python/samba/upgrade.py
+++ b/source4/scripting/python/samba/upgrade.py
@@ -32,7 +32,6 @@ from samba.samba3 import param as s3param
from samba.dcerpc import lsa, samr, security
from samba.dcerpc.security import dom_sid
from samba.credentials import Credentials
-from samba.auth import system_session
from samba import dsdb
from samba.ndr import ndr_pack
from samba import unix2nttime
@@ -93,7 +92,9 @@ def import_sam_policy(samdb, policy, logger):
except ldb.LdbError, e:
logger.warn("Could not set account policy, (%s)", str(e))
-def add_posix_attrs(logger, samdb, sid, name, nisdomain, xid_type, home=None, shell=None, pgid=None):
+
+def add_posix_attrs(logger, samdb, sid, name, nisdomain, xid_type, home=None,
+ shell=None, pgid=None):
"""Add posix attributes for the user/group
:param samdb: Samba4 sam.ldb database
@@ -156,6 +157,7 @@ def add_ad_posix_idmap_entry(samdb, sid, xid, xid_type, logger):
'Could not modify AD idmap entry for sid=%s, id=%s, type=%s (%s)',
str(sid), str(xid), xid_type, str(e))
+
def add_idmap_entry(idmapdb, sid, xid, xid_type, logger):
"""Create idmap entry
@@ -545,8 +547,9 @@ def get_posix_attr_from_ldap_backend(logger, ldb_object, base_dn, user, attr):
logger.warning("LDAP entry for user %s contains more than one %s", user, attr)
return None
-def upgrade_from_samba3(samba3, logger, targetdir, session_info=None, useeadb=False, dns_backend=None,
- use_ntvfs=False):
+
+def upgrade_from_samba3(samba3, logger, targetdir, session_info=None,
+ useeadb=False, dns_backend=None, use_ntvfs=False):
"""Upgrade from samba3 database to samba4 AD database
:param samba3: samba3 object
@@ -904,8 +907,10 @@ Please fix this account before attempting to upgrade again
logger.info("Administrator password has been set to password of user '%s'", admin_user)
if result.server_role == "active directory domain controller":
- setsysvolacl(result.samdb, result.paths.netlogon, result.paths.sysvol, result.paths.root_uid, result.paths.wheel_gid,
- security.dom_sid(result.domainsid), result.names.dnsdomain, result.names.domaindn, result.lp, use_ntvfs)
+ setsysvolacl(result.samdb, result.paths.netlogon, result.paths.sysvol,
+ result.paths.root_uid, result.paths.wheel_gid,
+ security.dom_sid(result.domainsid), result.names.dnsdomain,
+ result.names.domaindn, result.lp, use_ntvfs)
# FIXME: import_registry(registry.Registry(), samba3.get_registry())
# FIXME: shares