summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/samba/idmap.py7
-rw-r--r--source4/scripting/python/samba/join.py7
-rw-r--r--source4/scripting/python/samba/netcmd/dns.py3
3 files changed, 4 insertions, 13 deletions
diff --git a/source4/scripting/python/samba/idmap.py b/source4/scripting/python/samba/idmap.py
index 9d957341de..9d61ec8e5e 100644
--- a/source4/scripting/python/samba/idmap.py
+++ b/source4/scripting/python/samba/idmap.py
@@ -35,13 +35,13 @@ class IDmapDB(samba.Ldb):
def __init__(self, url=None, lp=None, modules_dir=None, session_info=None,
credentials=None, flags=0, options=None):
- """Opens the IDMap Database
+ """Opens the IDMap Database.
+
For parameter meanings see the super class (samba.Ldb)
"""
-
self.lp = lp
if url is None:
- url = lp.private_path("idmap.ldb")
+ url = lp.private_path("idmap.ldb")
super(IDmapDB, self).__init__(url=url, lp=lp, modules_dir=modules_dir,
session_info=session_info, credentials=credentials, flags=flags,
@@ -51,7 +51,6 @@ class IDmapDB(samba.Ldb):
super(IDmapDB, self).connect(url=self.lp.private_path(url), flags=flags,
options=options)
-
def increment_xid(self):
"""Increment xidNumber, if not present it create and assign it to the lowerBound
diff --git a/source4/scripting/python/samba/join.py b/source4/scripting/python/samba/join.py
index b01ac0cc7a..7ce53442a4 100644
--- a/source4/scripting/python/samba/join.py
+++ b/source4/scripting/python/samba/join.py
@@ -23,7 +23,7 @@
from samba.auth import system_session
from samba.samdb import SamDB
from samba import gensec, Ldb, drs_utils
-import ldb, samba, sys, os, uuid
+import ldb, samba, sys, uuid
from samba.ndr import ndr_pack
from samba.dcerpc import security, drsuapi, misc, nbt, lsa, drsblobs
from samba.credentials import Credentials, DONT_USE_KERBEROS
@@ -125,7 +125,6 @@ class dc_join(object):
ctx.managedby = None
ctx.subdomain = False
-
def del_noerror(ctx, dn, recursive=False):
if recursive:
try:
@@ -375,7 +374,6 @@ class dc_join(object):
raise RuntimeError("DsAddEntry failed")
return ctr.objects
-
def join_add_ntdsdsa(ctx):
'''add the ntdsdsa object'''
# FIXME: the partition (NC) assignment has to be made dynamic
@@ -412,7 +410,6 @@ class dc_join(object):
res = ctx.samdb.search(base=ctx.ntds_dn, scope=ldb.SCOPE_BASE, attrs=["objectGUID"])
ctx.ntds_guid = misc.GUID(ctx.samdb.schema_format_value("objectGUID", res[0]["objectGUID"][0]))
-
def join_add_objects(ctx):
'''add the various objects needed for the join'''
if ctx.acct_dn:
@@ -497,7 +494,6 @@ class dc_join(object):
"userAccountControl")
ctx.samdb.modify(m)
-
def join_add_objects2(ctx):
'''add the various objects needed for the join, for subdomains post replication'''
@@ -617,7 +613,6 @@ class dc_join(object):
dns_backend="BIND9_FLATFILE")
print("Provision OK for domain %s" % ctx.names.dnsdomain)
-
def join_replicate(ctx):
'''replicate the SAM'''
diff --git a/source4/scripting/python/samba/netcmd/dns.py b/source4/scripting/python/samba/netcmd/dns.py
index ddeefe6f8f..3c1bb98160 100644
--- a/source4/scripting/python/samba/netcmd/dns.py
+++ b/source4/scripting/python/samba/netcmd/dns.py
@@ -18,9 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-import os
import samba.getopt as options
-import ldb
from struct import pack
from socket import inet_ntoa
@@ -31,7 +29,6 @@ from samba.netcmd import (
SuperCommand,
)
from samba.dcerpc import dnsp, dnsserver
-from samba.ndr import ndr_print
def dns_connect(server, lp, creds):