From 802f6b71dd0c43c44ecf91ec042e7f4a08a12dec Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 11 Feb 2010 23:38:23 +1100 Subject: s4-script: make enablerecyclebin use system_session This allows it to work against our local ldb --- source4/scripting/bin/enablerecyclebin | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/scripting') diff --git a/source4/scripting/bin/enablerecyclebin b/source4/scripting/bin/enablerecyclebin index d02e90b533..0d39fe7758 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"]) -- cgit