projects
/
mirror
/
userdir-ldap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
get rid of most uses of sha module
[mirror/userdir-ldap.git]
/
ud-info
diff --git
a/ud-info
b/ud-info
index
8842e05
..
2ed498a
100755
(executable)
--- a/
ud-info
+++ b/
ud-info
@@
-20,7
+20,7
@@
# Copyright (c) 1999-2001 Jason Gunthorpe <jgg@debian.org>
# Copyright (c) 2004-2005,7,8 Joey Schulze <joey@infodrom.org>
# Copyright (c) 2001-2006 Ryan Murray <rmurray@debian.org>
# Copyright (c) 1999-2001 Jason Gunthorpe <jgg@debian.org>
# Copyright (c) 2004-2005,7,8 Joey Schulze <joey@infodrom.org>
# Copyright (c) 2001-2006 Ryan Murray <rmurray@debian.org>
-# Copyright (c) 2008 Peter Palfrader <peter@palfrader.org>
+# Copyright (c) 2008
,2009
Peter Palfrader <peter@palfrader.org>
# Copyright (c) 2008 Martin Zobel-Helas <zobel@debian.org>
# Copyright (c) 2008 Marc 'HE' Brockschmidt <he@debian.org>
# Copyright (c) 2008 Mark Hymers <mhy@debian.org>
# Copyright (c) 2008 Martin Zobel-Helas <zobel@debian.org>
# Copyright (c) 2008 Marc 'HE' Brockschmidt <he@debian.org>
# Copyright (c) 2008 Mark Hymers <mhy@debian.org>
@@
-76,7
+76,7
@@
AttrInfo = {"cn": ["First Name", 101],
"mailRBL": ["Mail RBLs",22],
"mailRHSBL": ["Mail RHSBLs",23],
"mailWhitelist": ["Mail Whitelist",24],
"mailRBL": ["Mail RBLs",22],
"mailRHSBL": ["Mail RHSBLs",23],
"mailWhitelist": ["Mail Whitelist",24],
- "mail
SpamOptOut": ["Mail Spam Filtering
",25],
+ "mail
ContentInspectionAction": ["mail C-I Action
",25],
"VoIP": ["VoIP Address",26],
"comment": ["Comment",116],
"userPassword": ["Crypted Password",117],
"VoIP": ["VoIP Address",26],
"comment": ["Comment",116],
"userPassword": ["Crypted Password",117],
@@
-111,7
+111,7
@@
AttrPrompt = {"cn": ["Common name or first name"],
"mailRBL": ["SMTP time RBL lists"],
"mailRHSBL": ["SMTP time RHSBL lists"],
"mailWhitelist": ["SMTP time whitelist from other checks"],
"mailRBL": ["SMTP time RBL lists"],
"mailRHSBL": ["SMTP time RHSBL lists"],
"mailWhitelist": ["SMTP time whitelist from other checks"],
- "mail
SpamOptOut": ["Mail Spam Filtering
"],
+ "mail
ContentInspectionAction": ["Content Inspection Action (reject, blackhole, markup)
"],
"member": ["LDAP Group Member for slapd ACLs"],
"latitude": ["XEarth latitude in ISO 6709 format - see /usr/share/zoneinfo/zone.tab or etak.com"],
"longitude": ["XEarth latitude in ISO 6709 format - see /usr/share/zoneinfo/zone.tab or etak.com"],
"member": ["LDAP Group Member for slapd ACLs"],
"latitude": ["XEarth latitude in ISO 6709 format - see /usr/share/zoneinfo/zone.tab or etak.com"],
"longitude": ["XEarth latitude in ISO 6709 format - see /usr/share/zoneinfo/zone.tab or etak.com"],
@@
-252,7
+252,7
@@
def ChangeAttr(Attrs,Attr):
Attrs[1][Attr] = [""];
return;
Attrs[1][Attr] = [""];
return;
- if (Attr == "mail
SpamOptOut" or Attr == "mail
Greylisting" or Attr == "mailCallout"):
+ if (Attr == "mailGreylisting" or Attr == "mailCallout"):
if (NewValue.lower() != "true" and NewValue.lower() != "false"):
if (NewValue == "1"): NewValue = "true"
else:
if (NewValue.lower() != "true" and NewValue.lower() != "false"):
if (NewValue == "1"): NewValue = "true"
else:
@@
-351,14
+351,15
@@
else:
# Connect to the ldap server
l = connectLDAP()
# Connect to the ldap server
l = connectLDAP()
+UserDn = "uid=" + User + "," + BaseDn
if (BindUser != ""):
Password = getpass.getpass(BindUser + "'s password: ")
if (BindUser != ""):
Password = getpass.getpass(BindUser + "'s password: ")
- UserDn = "uid=" + BindUser + "," + BaseDn
+
Bind
UserDn = "uid=" + BindUser + "," + BaseDn
else:
Password = ""
else:
Password = ""
- UserDn = ""
+
Bind
UserDn = ""
try:
try:
- l.simple_bind_s(UserDn,Password)
+ l.simple_bind_s(
Bind
UserDn,Password)
except ldap.LDAPError,e:
print >> sys.stderr, "LDAP error:", e.args[0]['desc']
print >> sys.stderr, " ", e.args[0]['info']
except ldap.LDAPError,e:
print >> sys.stderr, "LDAP error:", e.args[0]['desc']
print >> sys.stderr, " ", e.args[0]['info']