Removed reference to FCNTL since it is not required anymore and the
[mirror/userdir-ldap.git] / ud-host
diff --git a/ud-host b/ud-host
index 956c046..319227b 100755 (executable)
--- a/ud-host
+++ b/ud-host
@@ -213,6 +213,7 @@ User = pwd.getpwuid(os.getuid())[0];
 BindUser = User;
 ListMode = 0
 FingerPrints = 0
+Host = None
 # Process options
 (options, arguments) = getopt.getopt(sys.argv[1:], "nh:a:rlf")
 for (switch, val) in options:
@@ -254,7 +255,10 @@ if ListMode == 1:
             Overview(hAttrs)
    sys.exit(0)
 elif FingerPrints == 1:
-   Attrs = l.search_s(HBaseDn,ldap.SCOPE_ONELEVEL,"host=*")
+   if Host is not None:
+      Attrs = l.search_s(HBaseDn,ldap.SCOPE_ONELEVEL,"host=" + Host)
+   else:
+      Attrs = l.search_s(HBaseDn,ldap.SCOPE_ONELEVEL,"host=*")
    hosts = []
    for hAttrs in Attrs:
       hosts.append(hAttrs[1]['host'][0])