projects
/
mirror
/
userdir-ldap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added a proper copyright notice
[mirror/userdir-ldap.git]
/
ud-ldapshow
diff --git
a/ud-ldapshow
b/ud-ldapshow
index
6447283
..
0c54cb4
100755
(executable)
--- a/
ud-ldapshow
+++ b/
ud-ldapshow
@@
-9,15
+9,15
@@
from userdir_ldap import *;
def ShowDups(Attrs,Len):
for x in Attrs:
def ShowDups(Attrs,Len):
for x in Attrs:
- if x[1].has_key("key
fingerp
rint") == 0:
+ if x[1].has_key("key
FingerP
rint") == 0:
continue;
Count = 0;
continue;
Count = 0;
- for I in x[1]["key
fingerp
rint"]:
+ for I in x[1]["key
FingerP
rint"]:
if len(I) == Len:
Count = Count + 1;
if Count > 1:
if len(I) == Len:
Count = Count + 1;
if Count > 1:
- for I in x[1]["key
fingerp
rint"]:
+ for I in x[1]["key
FingerP
rint"]:
if len(I) == Len:
print "%s: %s" % (EmailAddress(x),I);
if len(I) == Len:
print "%s: %s" % (EmailAddress(x),I);
@@
-35,48
+35,48
@@
l = ldap.open(LDAPServer);
l.simple_bind_s("","");
if arguments[0] == "nokey":
l.simple_bind_s("","");
if arguments[0] == "nokey":
- Attrs = l.search_s(BaseDn,ldap.SCOPE_ONELEVEL,"(!(key
fingerp
rint=*))",\
- ["uid","cn","sn","email
f
orward","comment"]);
+ Attrs = l.search_s(BaseDn,ldap.SCOPE_ONELEVEL,"(!(key
FingerP
rint=*))",\
+ ["uid","cn","sn","email
F
orward","comment"]);
Attrs.sort();
for x in Attrs:
print "Key Missing:",EmailAddress(x);
Attrs.sort();
for x in Attrs:
print "Key Missing:",EmailAddress(x);
- if GetAttr(x,"email
f
orward") != "":
- print " ->",GetAttr(x,"email
f
orward");
+ if GetAttr(x,"email
F
orward") != "":
+ print " ->",GetAttr(x,"email
F
orward");
if GetAttr(x,"comment") != "":
print " :",GetAttr(x,"comment");
if arguments[0] == "noforward":
if GetAttr(x,"comment") != "":
print " :",GetAttr(x,"comment");
if arguments[0] == "noforward":
- Attrs = l.search_s(BaseDn,ldap.SCOPE_ONELEVEL,"(!(email
f
orward=*))",\
- ["uid","cn","sn","email
f
orward","comment"]);
+ Attrs = l.search_s(BaseDn,ldap.SCOPE_ONELEVEL,"(!(email
F
orward=*))",\
+ ["uid","cn","sn","email
F
orward","comment"]);
Attrs.sort();
for x in Attrs:
print "No Forward:",EmailAddress(x);
if arguments[0] == "badpriv":
Attrs.sort();
for x in Attrs:
print "No Forward:",EmailAddress(x);
if arguments[0] == "badpriv":
- Attrs = l.search_s(BaseDn,ldap.SCOPE_ONELEVEL,"(&(!(key
fingerprint=*))(privates
ub=*))",\
- ["uid","cn","sn","private
s
ub"]);
+ Attrs = l.search_s(BaseDn,ldap.SCOPE_ONELEVEL,"(&(!(key
FingerPrint=*))(privateS
ub=*))",\
+ ["uid","cn","sn","private
S
ub"]);
Attrs.sort();
for x in Attrs:
Attrs.sort();
for x in Attrs:
- print EmailAddress(x)+": "+GetAttr(x,"private
s
ub");
+ print EmailAddress(x)+": "+GetAttr(x,"private
S
ub");
if arguments[0] == "nopriv":
if arguments[0] == "nopriv":
- Attrs = l.search_s(BaseDn,ldap.SCOPE_ONELEVEL,"(&(key
fingerprint=*)(!(privates
ub=*)))",\
- ["uid","cn","sn","private
s
ub"]);
+ Attrs = l.search_s(BaseDn,ldap.SCOPE_ONELEVEL,"(&(key
FingerPrint=*)(!(privateS
ub=*)))",\
+ ["uid","cn","sn","private
S
ub"]);
Attrs.sort();
for x in Attrs:
Attrs.sort();
for x in Attrs:
- print " ",EmailAddress(x)+": "+GetAttr(x,"private
s
ub");
+ print " ",EmailAddress(x)+": "+GetAttr(x,"private
S
ub");
if arguments[0] == "keymap":
Attrs = l.search_s(BaseDn,ldap.SCOPE_ONELEVEL,"uid=*",\
if arguments[0] == "keymap":
Attrs = l.search_s(BaseDn,ldap.SCOPE_ONELEVEL,"uid=*",\
- ["uid","cn","sn","key
fingerp
rint"]);
+ ["uid","cn","sn","key
FingerP
rint"]);
Attrs.sort();
for x in Attrs:
Attrs.sort();
for x in Attrs:
- if x[1].has_key("key
fingerp
rint"):
- for I in x[1]["key
fingerp
rint"]:
+ if x[1].has_key("key
FingerP
rint"):
+ for I in x[1]["key
FingerP
rint"]:
print "%s: %s" % (EmailAddress(x),I);
if arguments[0] == "devcount":
print "%s: %s" % (EmailAddress(x),I);
if arguments[0] == "devcount":
- Attrs = l.search_s(BaseDn,ldap.SCOPE_ONELEVEL,"(&(key
fingerprint=*)(gidn
umber=800))",\
+ Attrs = l.search_s(BaseDn,ldap.SCOPE_ONELEVEL,"(&(key
FingerPrint=*)(gidN
umber=800))",\
["uid"]);
Count = 0;
for x in Attrs:
["uid"]);
Count = 0;
for x in Attrs:
@@
-85,7
+85,7
@@
if arguments[0] == "devcount":
if arguments[0] == "echelon":
Attrs = l.search_s(BaseDn,ldap.SCOPE_ONELEVEL,\
if arguments[0] == "echelon":
Attrs = l.search_s(BaseDn,ldap.SCOPE_ONELEVEL,\
- "(&(|(activity-pgp=*)(activity-from=*))(&(key
fingerprint=*)(gidn
umber=800)))",\
+ "(&(|(activity-pgp=*)(activity-from=*))(&(key
FingerPrint=*)(gidN
umber=800)))",\
["activity-pgp","activity-from"]);
Count = 0;
PGPCount = 0;
["activity-pgp","activity-from"]);
Count = 0;
PGPCount = 0;
@@
-97,21
+97,21
@@
if arguments[0] == "echelon":
if arguments[0] == "missing":
Attrs = l.search_s(BaseDn,ldap.SCOPE_ONELEVEL,\
if arguments[0] == "missing":
Attrs = l.search_s(BaseDn,ldap.SCOPE_ONELEVEL,\
- "(&(!(|(activity-pgp=*)(activity-from=*)))(&(key
fingerprint=*)(gidn
umber=800)))",\
+ "(&(!(|(activity-pgp=*)(activity-from=*)))(&(key
FingerPrint=*)(gidN
umber=800)))",\
["uid","cn","sn","mn"]);
Attrs.sort();
for x in Attrs:
print EmailAddress(x);
if arguments[0] == "keystat":
["uid","cn","sn","mn"]);
Attrs.sort();
for x in Attrs:
print EmailAddress(x);
if arguments[0] == "keystat":
- Attrs = l.search_s(BaseDn,ldap.SCOPE_ONELEVEL,"key
fingerp
rint=*",\
- ["key
fingerp
rint"]);
+ Attrs = l.search_s(BaseDn,ldap.SCOPE_ONELEVEL,"key
FingerP
rint=*",\
+ ["key
FingerP
rint"]);
KeyCount = 0;
GPGCount = 0;
for x in Attrs:
KeyCount = 0;
GPGCount = 0;
for x in Attrs:
- if x[1].has_key("key
fingerp
rint"):
+ if x[1].has_key("key
FingerP
rint"):
KeyCount = KeyCount + 1;
KeyCount = KeyCount + 1;
- for I in x[1]["key
fingerp
rint"]:
+ for I in x[1]["key
FingerP
rint"]:
if len(I) == 40:
GPGCount = GPGCount + 1;
break;
if len(I) == 40:
GPGCount = GPGCount + 1;
break;
@@
-119,7
+119,7
@@
if arguments[0] == "keystat":
if arguments[0] == "multikeys":
Attrs = l.search_s(BaseDn,ldap.SCOPE_ONELEVEL,"uid=*",\
if arguments[0] == "multikeys":
Attrs = l.search_s(BaseDn,ldap.SCOPE_ONELEVEL,"uid=*",\
- ["uid","cn","sn","key
fingerp
rint"]);
+ ["uid","cn","sn","key
FingerP
rint"]);
Attrs.sort();
Attrs.sort();