diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-02-11 23:38:23 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-02-12 01:08:11 +1100 |
commit | 802f6b71dd0c43c44ecf91ec042e7f4a08a12dec (patch) | |
tree | 11433cec0189cd03e283abe1387c15c391fdaf6a | |
parent | 9ba0d105ccd5599987c17e2474ecfe8ac3547f1b (diff) | |
download | samba-802f6b71dd0c43c44ecf91ec042e7f4a08a12dec.tar.gz samba-802f6b71dd0c43c44ecf91ec042e7f4a08a12dec.tar.bz2 samba-802f6b71dd0c43c44ecf91ec042e7f4a08a12dec.zip |
s4-script: make enablerecyclebin use system_session
This allows it to work against our local ldb
-rwxr-xr-x | source4/scripting/bin/enablerecyclebin | 3 |
1 files changed, 2 insertions, 1 deletions
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 <URL>") 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"]) |