projects
/
mirror
/
userdir-ldap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add dnsTTL host attribute to override the zone default TTL for A and AAAA records...
[mirror/userdir-ldap.git]
/
ud-gpgimport
diff --git
a/ud-gpgimport
b/ud-gpgimport
index
797aa5d
..
31fb347
100755
(executable)
--- a/
ud-gpgimport
+++ b/
ud-gpgimport
@@
-62,17
+62,15
@@
for (switch, val) in options:
LoadOverride(val);
elif (switch == '-a'):
NoAct = 0;
LoadOverride(val);
elif (switch == '-a'):
NoAct = 0;
-if len(arguments) == 0:
- print "Give some keyrings to probe";
- sys.exit(0);
+
# Main program starts here
# Connect to the ldap server
if NoAct == 0:
# Main program starts here
# Connect to the ldap server
if NoAct == 0:
- l = passwdAccessLDAP(
LDAPServer,
BaseDn, AdminUser)
+ l = passwdAccessLDAP(BaseDn, AdminUser)
else:
else:
- l =
ldap.open(LDAPServer);
+ l =
connectLDAP()
l.simple_bind_s("","");
# Download the existing key list and put it into a map
l.simple_bind_s("","");
# Download the existing key list and put it into a map
@@
-105,14
+103,16
@@
Attrs = None;
print;
# Popen GPG with the correct magic special options
print;
# Popen GPG with the correct magic special options
-Args = [GPGPath] + GPGBasicOptions;
+ClearKeyrings()
+if len(arguments) == 0:
+ print "Using default keyrings: %s"%ConfModule.add_keyrings;
+ SetKeyrings(ConfModule.add_keyrings.split(":"))
for x in arguments:
for x in arguments:
- Args.append("--keyring");
if x.find("/") == -1:
if x.find("/") == -1:
- Args.append("./"+x);
- else:
- Args.append(x);
-Args =
Ar
gs + GPGSearchOptions + [" 2> /dev/null"]
+ x= "./"+x
+ SetKeyrings( [x] )
+
+Args =
[GPGPath] + GPGBasicOptions + GPGKeyRin
gs + GPGSearchOptions + [" 2> /dev/null"]
Keys = os.popen(" ".join(Args),"r");
# Loop over the GPG key file
Keys = os.popen(" ".join(Args),"r");
# Loop over the GPG key file