From: Andrew Tridgell Date: Thu, 11 Feb 2010 12:38:23 +0000 (+1100) Subject: s4-script: make enablerecyclebin use system_session X-Git-Tag: samba-3.6.0pre1~5435 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=802f6b71dd0c43c44ecf91ec042e7f4a08a12dec;p=thirdparty%2Fsamba.git s4-script: make enablerecyclebin use system_session This allows it to work against our local ldb --- diff --git a/source4/scripting/bin/enablerecyclebin b/source4/scripting/bin/enablerecyclebin index d02e90b5334..0d39fe7758a 100755 --- a/source4/scripting/bin/enablerecyclebin +++ b/source4/scripting/bin/enablerecyclebin @@ -15,6 +15,7 @@ from samba import getopt as options, Ldb from ldb import SCOPE_SUBTREE, SCOPE_BASE, LdbError import sys import ldb +from samba.auth import system_session parser = optparse.OptionParser("enablerecyclebin ") sambaopts = options.SambaOptions(parser) @@ -35,7 +36,7 @@ url = args[0] lp_ctx = sambaopts.get_loadparm() creds = credopts.get_credentials(lp_ctx) -sam_ldb = Ldb(url, credentials=creds, lp=lp_ctx) +sam_ldb = Ldb(url, session_info=system_session(), credentials=creds, lp=lp_ctx) # get the rootDSE res = sam_ldb.search(base="", expression="", scope=SCOPE_BASE, attrs=["configurationNamingContext"])