Fix python imports.
authorJelmer Vernooij <jelmer@samba.org>
Wed, 21 May 2008 23:47:36 +0000 (01:47 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 21 May 2008 23:47:36 +0000 (01:47 +0200)
(This used to be commit 453206665677821b254c18cc67192e007b892f04)

source4/selftest/samba4_tests.sh
source4/setup/enableaccount
source4/setup/newuser
source4/setup/setpassword

index 5a9cdafe3b71fad24c65bf6a36b5c2c875652413..2f65561cebe3e4b544052a4050f8212cacc5e399 100755 (executable)
@@ -355,3 +355,5 @@ plantest "blackbox.upgrade" none $PYTHON setup/upgrade $CONFIGURATION --targetdi
 rm -rf $PREFIX/provision
 mkdir $PREFIX/provision
 plantest "blackbox.provision.py" none PYTHON="$PYTHON" $samba4srcdir/setup/tests/blackbox_provision.sh "$PREFIX/provision" "$CONFIGURATION" 
+plantest "blackbox.setpassword.py" none PYTHON="$PYTHON" $samba4srcdir/setup/tests/blackbox_setpassword.sh "$PREFIX/provision" "$CONFIGURATION" 
+plantest "blackbox.newuser.py" none PYTHON="$PYTHON" $samba4srcdir/setup/tests/blackbox_newuser.sh "$PREFIX/provision" "$CONFIGURATION" 
index ad81042998ba9df490d6312c375398ca9d7c1d2b..c2321606a62ed385bc52bd1f31bf550711167958 100755 (executable)
@@ -14,7 +14,7 @@ import optparse
 import pwd
 import ldb
 
-from auth import system_session
+from samba.auth import system_session
 from samba.samdb import SamDB
 
 parser = optparse.OptionParser("setpassword [username] [options]")
index 26bac76f02f4913ced1e1c5e359da30c6852b9c2..991afa36d8e712470176a7e5ea7f733aa7cabec9 100755 (executable)
@@ -15,7 +15,7 @@ import samba.getopt as options
 import optparse
 import pwd
 from getpass import getpass
-from auth import system_session
+from samba.auth import system_session
 from samba.samdb import SamDB
 
 parser = optparse.OptionParser("newuser [options] <username> [<password>]")
index 977a6a5ee89011c0f540378d3193812ddcbe0188..65770e1f4d8b913d6b6253da3f9660e858a8f549 100644 (file)
@@ -6,12 +6,17 @@
 #      Released under the GNU GPL version 3 or later
 #
 
+import os, sys
+
+# Find right directory when running from source tree
+sys.path.insert(0, "bin/python")
+
 import samba.getopt as options
 import optparse
 import pwd
 import sys
 from getpass import getpass
-from auth import system_session
+from samba.auth import system_session
 from samba.samdb import SamDB
 
 parser = optparse.OptionParser("setpassword [username] [options]")