git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ce8107
)
s4-samdb: support relative paths in SamDB() connect
author
Andrew Tridgell
<tridge@samba.org>
Fri, 5 Aug 2011 03:09:35 +0000
(13:09 +1000)
committer
Andrew Bartlett
<abartlet@samba.org>
Tue, 9 Aug 2011 09:56:23 +0000
(11:56 +0200)
don't add the private path unless the database doesn't exist with the
supplied path
source4/scripting/python/samba/samdb.py
patch
|
blob
|
history
diff --git
a/source4/scripting/python/samba/samdb.py
b/source4/scripting/python/samba/samdb.py
index 46a7fea32e3b10b98ffc525483717adf9498b875..70f73da6f4e16da0d0a92839d381272a0a8a5e7a 100644
(file)
--- a/
source4/scripting/python/samba/samdb.py
+++ b/
source4/scripting/python/samba/samdb.py
@@
-27,6
+27,7
@@
import samba
import ldb
import time
import base64
+import os
from samba import dsdb
from samba.ndr import ndr_unpack, ndr_pack
from samba.dcerpc import drsblobs, misc
@@
-62,7
+63,7
@@
class SamDB(samba.Ldb):
dsdb._dsdb_set_am_rodc(self, am_rodc)
def connect(self, url=None, flags=0, options=None):
- if self.lp is not None:
+ if self.lp is not None
and not os.path.exists(url)
:
url = self.lp.private_path(url)
self.url = url