aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrhatto <rhatto>2006-10-12 18:51:31 +0000
committerrhatto <rhatto>2006-10-12 18:51:31 +0000
commit591993a4d6f7838e4a778bc66ea30133ee351ff7 (patch)
treeb1331cca2b45500985a458e07c0d00c6c01f0e87
parentb13e8fdc3e9d75e03345575fa38f578ef5dbaadf (diff)
downloadfirma-591993a4d6f7838e4a778bc66ea30133ee351ff7.tar.gz
firma-591993a4d6f7838e4a778bc66ea30133ee351ff7.tar.bz2
fix on passphrase evaluation
-rwxr-xr-xfirma112
1 files changed, 56 insertions, 56 deletions
diff --git a/firma b/firma
index d45aecb..3baa262 100755
--- a/firma
+++ b/firma
@@ -1883,58 +1883,58 @@ function SourceFirmaConfig {
# returns: 0
#-------------------------------------------------------------
- [ "$1" == "help" ] && echo -e "\nList mandatory firma config parameters\n"
+ [ "$1" == "help" ] && echo -e "\nMandatory global firma config parameters\n"
- [ "$1" == "help" ] && echo "GPG_BINARY= path to the GnuPG binary" || \
+ [ "$1" == "help" ] && echo -e "\tGPG_BINARY= path to the GnuPG binary" || \
GPG_BINARY="`EvalConfigParameter $FIRMA_CONFIG_FILE GPG_BINARY`"
- [ "$1" == "help" ] && echo "MAIL_AGENT= path to the mail transport agent to be used (e.g., sendmail)" || \
+ [ "$1" == "help" ] && echo -e "\tMAIL_AGENT= path to the mail transport agent to be used (e.g., sendmail)" || \
MAIL_AGENT="`EvalConfigParameter $FIRMA_CONFIG_FILE MAIL_AGENT`"
- [ "$1" == "help" ] && echo "MAIL_AGENT_ARGS= command-line arguments to be passed to the command above" || \
+ [ "$1" == "help" ] && echo -e "\tMAIL_AGENT_ARGS= command-line arguments to be passed to the command above" || \
MAIL_AGENT_ARGS="`EvalConfigParameter $FIRMA_CONFIG_FILE MAIL_AGENT_ARGS`"
- [ "$1" == "help" ] && echo "LISTS_DIR= path to the mailing lists directory" || \
+ [ "$1" == "help" ] && echo -e "\tLISTS_DIR= path to the mailing lists directory" || \
LISTS_DIR="`EvalConfigParameter $FIRMA_CONFIG_FILE LISTS_DIR`"
- [ "$1" == "help" ] && echo -e "\nList optional firma config parameters\n"
+ [ "$1" == "help" ] && echo -e "\nOptional global firma config parameters\n"
- [ "$1" == "help" ] && echo "USER= user that runs firma (usually the same as your MTA user);
- defaults to "nobody"; you can also specify this parameter
- in each mailing list config file if you plan to have one
- user per mailing list" || \
+ [ "$1" == "help" ] && echo -e "\tUSER= user that runs firma (usually the same as your MTA user);
+\t defaults to "nobody"; you can also specify this parameter
+\t in each mailing list config file if you plan to have one
+\t user per mailing list" || \
USER="`EvalConfigParameter $FIRMA_CONFIG_FILE USER`"
- [ "$1" == "help" ] && echo "GROUP= group that runs firma (usually the same as your MTA group);
- defaults to "nobody"; you can also specify this parameter
- in each mailing list config file if you plan to have one
- group per mailing list" || \
+ [ "$1" == "help" ] && echo -e "\tGROUP= group that runs firma (usually the same as your MTA group);
+\t defaults to "nobody"; you can also specify this parameter
+\t in each mailing list config file if you plan to have one
+\t group per mailing list" || \
GROUP="`EvalConfigParameter $FIRMA_CONFIG_FILE GROUP`"
- [ "$1" == "help" ] && echo "LOG_TO_SYSLOG= set to "1" to log errors and warnings to syslog, else firma
- will print errors to STDERR" || \
+ [ "$1" == "help" ] && echo -e "LOG_TO_SYSLOG= set to "1" to log errors and warnings to syslog, else firma
+\t will print errors to STDERR" || \
LOG_TO_SYSLOG="`EvalConfigParameter $FIRMA_CONFIG_FILE LOG_TO_SYSLOG`"
- [ "$1" == "help" ] && echo "LOGGER_BINARY= if logging to syslog, set the path to logger's binary" || \
+ [ "$1" == "help" ] && echo -e "\tLOGGER_BINARY= if logging to syslog, set the path to logger's binary" || \
LOGGER_BINARY="`EvalConfigParameter $FIRMA_CONFIG_FILE LOGGER_BINARY`"
- [ "$1" == "help" ] && echo "SYSLOG_PRIORITY= if logging to syslog, set a priority for the error messages
- (defaults to "user.err")" || \
+ [ "$1" == "help" ] && echo -e "\tSYSLOG_PRIORITY= if logging to syslog, set a priority for the error messages
+\t (defaults to "user.err")" || \
SYSLOG_PRIORITY="`EvalConfigParameter $FIRMA_CONFIG_FILE SYSLOG_PRIORITY`"
- [ "$1" == "help" ] && echo "USE_GPG_HIDDEN_RECIPIENT_OPTION= set to '1' to use GnuPG's --hidden-recipient
- option, available from version 1.4.0 onwards
- (try 'man gpg' for more information)" || \
+ [ "$1" == "help" ] && echo -e "\tUSE_GPG_HIDDEN_RECIPIENT_OPTION= set to '1' to use GnuPG's --hidden-recipient
+\t option, available from version 1.4.0 onwards
+\t (try 'man gpg' for more information)" || \
USE_GPG_HIDDEN_RECIPIENT_OPTION="`EvalConfigParameter $FIRMA_CONFIG_FILE USE_GPG_HIDDEN_RECIPIENT_OPTION`"
- [ "$1" == "help" ] && echo "REMOVE_THESE_HEADERS_ON_ALL_LISTS= headers that should be stripped from list
- messages on all lists running under firma
- (space separated case-insensitive entries)
- (may include regexps (e.g., X-.*)" || \
+ [ "$1" == "help" ] && echo -e "\tREMOVE_THESE_HEADERS_ON_ALL_LISTS= headers that should be stripped from list
+\t messages on all lists running under firma
+\t (space separated case-insensitive entries)
+\t (may include regexps (e.g., X-.*)" || \
REMOVE_THESE_HEADERS_ON_ALL_LISTS="`EvalConfigParameter $FIRMA_CONFIG_FILE REMOVE_THESE_HEADERS_ON_ALL_LISTS`"
- [ "$1" == "help" ] && echo "KEYSERVER= default keyserver to import/export keys
- (defaults to keyserver.noreply.org)" || \
+ [ "$1" == "help" ] && echo -e "\tKEYSERVER= default keyserver to import/export keys
+\t (defaults to keyserver.noreply.org)" || \
KEYSERVER="`EvalConfigParameter $FIRMA_CONFIG_FILE KEYSERVER`"
}
@@ -1948,53 +1948,53 @@ function SourceListConfig {
# returns: 0
#-------------------------------------------------------------
- [ "$1" == "help" ] && echo -e "List mandatory list config parameters\n\n"
+ [ "$1" == "help" ] && echo -e "\nMandatory list config parameters\n"
- [ "$1" == "help" ] && echo "LIST_ADDRESS= list's email address" || \
+ [ "$1" == "help" ] && echo -e "\tLIST_ADDRESS= list's email address" || \
LIST_ADDRESS="`EvalConfigParameter $LIST_CONFIG_FILE LIST_ADDRESS`"
- [ "$1" == "help" ] && echo "LIST_ADMIN= list's administrators email addresses (space separated)" || \
+ [ "$1" == "help" ] && echo -e "\tLIST_ADMIN= list's administrators email addresses (space separated)" || \
LIST_ADMIN="`EvalConfigParameter $LIST_CONFIG_FILE LIST_ADMIN`"
- [ "$1" == "help" ] && echo "LIST_HOMEDIR= list's GnuPG homedir, where the list's keyrings are located" || \
+ [ "$1" == "help" ] && echo -e "\tLIST_HOMEDIR= list's GnuPG homedir, where the list's keyrings are located" || \
LIST_HOMEDIR="`EvalConfigParameter $LIST_CONFIG_FILE LIST_HOMEDIR`"
- [ "$1" == "help" ] && echo " PASSPHRASE= passphrase for the list's private keyring
+ [ "$1" == "help" ] && echo -e "\tPASSPHRASE= passphrase for the list's private keyring\n
+\tNOTE: The passphrase _has_ to be enclosed in single quotes and _cannot_
+\tcontain any additional single quote as part of itself. It has to be at least
+\t25 characters long, combining numbers, upper and lower case letters and at
+\tleast 5 special characters. Also, no character can be sequentially repeated
+\tmore than 4 times." || \
+ # LIST_PASSPHRASE="`EvalConfigParameter $LIST_CONFIG_FILE LIST_PASSPHRASE`"
+ LIST_PASSPHASE="`grep "^PASSPHRASE=" $LIST_CONFIG_FILE | grep -e "^PASSPHRASE=" $1 | sed -e "s/^PASSPHRASE='//" -e "s/'$//" | sort -r | head -n 1`"
-NOTE: The passphrase _has_ to be enclosed in single quotes and _cannot_
-contain any additional single quote as part of itself. It has to be at least
-25 characters long, combining numbers, upper and lower case letters and at
-least 5 special characters. Also, no character can be sequentially repeated
-more than 4 times." || \
- LIST_PASSPHRASE="`EvalConfigParameter $LIST_CONFIG_FILE LIST_PASSPHRASE`"
-
- [ "$1" == "help" ] && echo -e "List optional list config parameters\n\n"
+ [ "$1" == "help" ] && echo -e "\nOptional list config parameters\n"
- [ "$1" == "help" ] && echo "SUBJECT_PREFIX= prefix to be included in the subject of list messages" || \
+ [ "$1" == "help" ] && echo -e "\tSUBJECT_PREFIX= prefix to be included in the subject of list messages" || \
SUBJECT_PREFIX="`EvalConfigParameter $LIST_CONFIG_FILE SUBJECT_PREFIX`"
- [ "$1" == "help" ] && echo "REMOVE_THESE_HEADERS= headers that should be stripped from list messages
- (space separated case-insensitive entries)
- (may include regexps (e.g., X-.*)" || \
+ [ "$1" == "help" ] && echo -e "\tREMOVE_THESE_HEADERS= headers that should be stripped from list messages
+\t (space separated case-insensitive entries)
+\t (may include regexps (e.g., X-.*)" || \
REMOVE_THESE_HEADERS="`EvalConfigParameter $LIST_CONFIG_FILE REMOVE_THESE_HEADERS`"
- [ "$1" == "help" ] && echo "REPLIES_SHOULD_GO_TO_LIST= set to '1' to add a Reply-To header containing the list address" || \
+ [ "$1" == "help" ] && echo -e "\tREPLIES_SHOULD_GO_TO_LIST= set to '1' to add a Reply-To header containing the list address" || \
REPLIES_SHOULD_GO_TO_LIST="`EvalConfigParameter $LIST_CONFIG_FILE REPLIES_SHOULD_GO_TO_LIST`"
- [ "$1" == "help" ] && echo "SILENTLY_DISCARD_INVALID_MESSAGES= set to '1' to silently discard invalid
- messages (message not signed/encrypted,
- sender not subscribed to the list, etc.)
- instead of sending bounces back to sender" || \
+ [ "$1" == "help" ] && echo -e "\tSILENTLY_DISCARD_INVALID_MESSAGES= set to '1' to silently discard invalid
+\t messages (message not signed/encrypted,
+\t sender not subscribed to the list, etc.)
+\t instead of sending bounces back to sender" || \
SILENTLY_DISCARD_INVALID_MESSAGES="`EvalConfigParameter $LIST_CONFIG_FILE SILENTLY_DISCARD_INVALID_MESSAGES`"
- [ "$1" == "help" ] && echo "KEYSERVER= default keyserver to import/export keys
- (defaults to keyserver.noreply.org)" || \
+ [ "$1" == "help" ] && echo -e "\tKEYSERVER= default keyserver to import/export keys\n
+\t (defaults to keyserver.noreply.org)" || \
KEYSERVER="`EvalConfigParameter $LIST_CONFIG_FILE KEYSERVER`"
- [ "$1" == "help" ] && echo "REQUIRE_SIGNATURE= wheter messages sent to the list should be (yes) or dont
- need to be signed to be processed (no); defaults to yes;
- this doesnt affect the way email administration works,
- when signature is mandatory" || \
+ [ "$1" == "help" ] && echo -e "\tREQUIRE_SIGNATURE= wheter messages sent to the list should be (yes) or dont
+\t need to be signed to be processed (no); defaults to yes;
+\t this doesnt affect the way email administration works,
+\t when signature is mandatory" || \
REQUIRE_SIGNATURE="`EvalConfigParameter $LIST_CONFIG_FILE REQUIRE_SIGNATURE`"
}