summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-05-22 01:47:36 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-05-22 01:47:36 +0200
commit84a3290c8f0adf1248e61ab9f6c88bcfd4650375 (patch)
treefd36f953a2c33004c14e61447d70574e8bf0ba29
parent7e3367704799a2279f125104c762886a1c257535 (diff)
downloadsamba-84a3290c8f0adf1248e61ab9f6c88bcfd4650375.tar.gz
samba-84a3290c8f0adf1248e61ab9f6c88bcfd4650375.tar.bz2
samba-84a3290c8f0adf1248e61ab9f6c88bcfd4650375.zip
Fix python imports.
(This used to be commit 453206665677821b254c18cc67192e007b892f04)
-rwxr-xr-xsource4/selftest/samba4_tests.sh2
-rwxr-xr-xsource4/setup/enableaccount2
-rwxr-xr-xsource4/setup/newuser2
-rw-r--r--source4/setup/setpassword7
4 files changed, 10 insertions, 3 deletions
diff --git a/source4/selftest/samba4_tests.sh b/source4/selftest/samba4_tests.sh
index 5a9cdafe3b..2f65561ceb 100755
--- a/source4/selftest/samba4_tests.sh
+++ b/source4/selftest/samba4_tests.sh
@@ -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"
diff --git a/source4/setup/enableaccount b/source4/setup/enableaccount
index ad81042998..c2321606a6 100755
--- a/source4/setup/enableaccount
+++ b/source4/setup/enableaccount
@@ -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]")
diff --git a/source4/setup/newuser b/source4/setup/newuser
index 26bac76f02..991afa36d8 100755
--- a/source4/setup/newuser
+++ b/source4/setup/newuser
@@ -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>]")
diff --git a/source4/setup/setpassword b/source4/setup/setpassword
index 977a6a5ee8..65770e1f4d 100644
--- a/source4/setup/setpassword
+++ b/source4/setup/setpassword
@@ -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]")