projects
/
mirror
/
userdir-ldap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
bc0a3b6
)
Detect duplicate keys during accoun creation
author
jgg
<>
Sat, 19 Aug 2000 05:01:54 +0000
(
05:01
+0000)
committer
jgg
<>
Sat, 19 Aug 2000 05:01:54 +0000
(
05:01
+0000)
ud-useradd
patch
|
blob
|
history
diff --git
a/ud-useradd
b/ud-useradd
index
74008e5
..
6c2e19d
100755
(executable)
--- a/
ud-useradd
+++ b/
ud-useradd
@@
-89,6
+89,11
@@
while len(Keys[0][1]) < 40:
if Res == "":
break;
+Attrs = l.search_s(BaseDn,ldap.SCOPE_ONELEVEL,"keyfingerprint=" + Keys[0][1]);
+if len(Attrs) != 0:
+ print "*** This key already belongs to",GetAttr(Attrs[0],"uid");
+ account = GetAttr(Attrs[0],"uid");
+
# Try to get a uniq account name
Update=0
while 1: