Do SSL when connecting to the ldap server.
[mirror/userdir-ldap.git] / ud-host
diff --git a/ud-host b/ud-host
index ebcaa05..97af1ef 100755 (executable)
--- a/ud-host
+++ b/ud-host
@@ -32,7 +32,7 @@
 #    -l    list all hosts and their status
 #    -f    list all SSH fingerprints
 
-import string, time, os, pwd, sys, getopt, ldap, crypt, readline, copy;
+import time, os, pwd, sys, getopt, ldap, crypt, readline, copy;
 from tempfile import mktemp
 from os import O_CREAT, O_EXCL, O_WRONLY
 from userdir_ldap import *;
@@ -170,7 +170,7 @@ def MultiChangeAttr(Attrs,Attr):
    Attrs[1][Attr].sort();
    print "Old values: ",Attrs[1][Attr];
 
-   Mode = string.upper(raw_input("[D]elete or [A]dd? "));
+   Mode = raw_input("[D]elete or [A]dd? ").upper()
    if (Mode != 'D' and Mode != 'A'):
       return;
 
@@ -241,9 +241,9 @@ for (switch, val) in options:
       FingerPrints = 1
 
 if (BindUser != ""):
-   l = passwdAccessLDAP(LDAPServer, BaseDn, BindUser)
+   l = passwdAccessLDAP(BaseDn, BindUser)
 else:
-   l = ldap.open(LDAPServer);
+   l = connectLDAP()
    l.simple_bind_s("","")
 
 if ListMode == 1: