From 24047da530be555972ecda99832ffb7b41f0f93c Mon Sep 17 00:00:00 2001 From: luis Date: Sun, 29 Jul 2007 08:31:10 +0000 Subject: - Trying to create a list with the same name of an existing list would cause the existing list to be removed. Fixed. - User:group would always be set to nobody:nobody. Fixed. - Not all global variables were being unset after execution. Fixed. - Minor bugs fixed on the list creation routine. --- CHANGELOG | 25 +++++++++++++++++++++++-- README | 18 +++++++++--------- firma | 48 +++++++++++++++++++++++------------------------- 3 files changed, 55 insertions(+), 36 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index fbff484..ecfc250 100755 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,27 @@ Firma CHANGELOG --------------- +29/07/2007 - 0.3-cvs (rev 1.168) - luis + + - firma would always exit successfully (exit code = 0). Fixed. + + - Message signature checking was being completely skipped. Fixed. + + - Passphrase check for sequentially repeated characters wasn't + working. Fixed. + + - Trying to create a list with the same name (same homedir path, + actually) of an existing list would cause this list to be + removed. Fixed. + + - firma's user and group would always be set to nobody:nobody, + disregarding what was entered at firma.conf. Fixed. + + - Not all global variables were being unset at the end of firma's + execution. Fixed. + + - Better list creation routine. Minor bugs fixed. + 31/01/2007 - 0.3-cvs (rev 1.152) - luis - Removed firma dependecy on bc, cat and tac. @@ -581,7 +602,7 @@ Lots of stuff for today :) 07/05/2005 - 0.3-cvs (rev 1.13) - rhatto - - Firma now uses sendmail or any smtp wrapper directly: + - firma now uses sendmail or any smtp wrapper directly: - Specify your smtp wrapper through MAIL var, e.g.: MAIL=/usr/sbin/sendmail MAIL=/usr/bin/ssmtp @@ -662,7 +683,7 @@ Lots of stuff for today :) about it is now sent separately for the sender and the list administrators. - Other minor fixes and improvements. - - fix LISTNAME and LISTADMIN case sensitiveness + - Fix LISTNAME and LISTADMIN case sensitiveness. 18/04/2005 - v0.2.1 - luis diff --git a/README b/README index a136347..09b2091 100755 --- a/README +++ b/README @@ -160,15 +160,15 @@ Setup As optional parameters, you can also set - 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 - - 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 + FIRMA_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 + + FIRMA_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 LOG_TO_SYSLOG= set to '1' to log errors and warnings to syslog, else firma will print errors to STDERR diff --git a/firma b/firma index e2f2e1c..630c40e 100755 --- a/firma +++ b/firma @@ -920,7 +920,8 @@ function NewList { echo "Deleting folder $LIST_HOMEDIR..." rm -rf $LIST_HOMEDIR echo "List creation aborted." - exit 1 + return_code=1 + break elif CheckValidEmail $LIST_ADDRESS; then break else @@ -936,7 +937,8 @@ function NewList { echo "Deleting folder $LIST_HOMEDIR..." rm -rf $LIST_HOMEDIR echo "List creation aborted." - exit 1 + return_code=1 + break else for admin in $LIST_ADMIN; do if ! CheckValidEmail $admin; then @@ -945,6 +947,7 @@ function NewList { done if [[ -n "$invalid" ]]; then echo " Invalid email address: $invalid." + invalid="" else break fi @@ -989,7 +992,8 @@ function NewList { echo "Deleting folder $LIST_HOMEDIR..." rm -rf $LIST_HOMEDIR echo "List creation aborted." - exit 1 + return_code=1 + break elif [[ "$answer" == "1" || "$answer" == "1024" ]]; then KEY_SIZE="1024" break @@ -1026,7 +1030,8 @@ function NewList { echo "Deleting folder $LIST_HOMEDIR..." rm -rf $LIST_HOMEDIR echo "List creation aborted." - exit 1 + return_code=1 + break elif [[ -z "$(echo $digits_only | sed -e 's/[0-9]//g')" || -n "$last_char" ]]; then break else @@ -1123,9 +1128,6 @@ EOF echo "Your list was created. Now check its configuration at $LIST_CONFIG_FILE." echo "To see a list of optional config parameters, type firma --help config." fi - else - echo "Cannot create list $LIST_HOMEDIR: Installation aborted" - return_code=1 fi else echo "Could not create list homedir $LIST_HOMEDIR." @@ -1134,9 +1136,7 @@ EOF fi # list creation should be atomic - if [[ "$return_code" == "1" ]]; then - rm -rf $LIST_HOMEDIR - else + if [[ "$return_code" == "0" ]]; then echo "List creation complete." fi @@ -2020,17 +2020,17 @@ function SourceFirmaConfig { [[ "$1" == "help" ]] && echo -e "\nOptional global firma config parameters\n" - [[ "$1" == "help" ]] && echo -e "\tUSER= user that runs firma (usually the same as your MTA user); + [[ "$1" == "help" ]] && echo -e "\tFIRMA_USER= 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." || \ - FIRMA_USER="$(EvalConfigParameter $FIRMA_CONFIG_FILE USER)" + FIRMA_USER="$(EvalConfigParameter $FIRMA_CONFIG_FILE FIRMA_USER)" - [[ "$1" == "help" ]] && echo -e "\tGROUP= group that runs firma (usually the same as your MTA group); + [[ "$1" == "help" ]] && echo -e "\tFIRMA_GROUP= 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." || \ - FIRMA_GROUP="$(EvalConfigParameter $FIRMA_CONFIG_FILE GROUP)" + FIRMA_GROUP="$(EvalConfigParameter $FIRMA_CONFIG_FILE FIRMA_GROUP)" [[ "$1" == "help" ]] && echo -e "\tLOG_TO_SYSLOG= set to "1" to log errors and warnings to syslog, else firma \t will print errors to STDERR." || \ @@ -2086,18 +2086,18 @@ function SourceListConfig { [[ "$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 -e "\tUSER= user that runs firma (usually the same as your MTA user); + [[ "$1" == "help" ]] && echo -e "\tFIRMA_USER= 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." || \ - firma_user="$(EvalConfigParameter $LIST_CONFIG_FILE USER)" + firma_user="$(EvalConfigParameter $LIST_CONFIG_FILE FIRMA_USER)" [[ -n "$firma_user" ]] && FIRMA_USER="$firma_user" - [[ "$1" == "help" ]] && echo -e "\tGROUP= group that runs firma (usually the same as your MTA group); + [[ "$1" == "help" ]] && echo -e "\tFIRMA_GROUP= 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." || \ - firma_group="$(EvalConfigParameter $LIST_CONFIG_FILE GROUP)" + firma_group="$(EvalConfigParameter $LIST_CONFIG_FILE FIRMA_GROUP)" [[ -n "$firma_group" ]] && FIRMA_GROUP="$firma_group" [[ "$1" == "help" ]] && echo -e "\tPASSPHRASE= passphrase for the list's private keyring\n @@ -2286,8 +2286,8 @@ function ReplayProtectionCheck { #------------------------------------------------------------- # path to firma.conf and firma version -FIRMA_CONFIG_FILE="/usr/local/etc/firma.conf" -REPLAY_DEFAULT_FILE="/var/log/firma/replay.db" +FIRMA_CONFIG_FILE="/home/luis/tmp/firma/testing_release/firma.conf" +REPLAY_DEFAULT_FILE="/home/luis/tmp/firma/testing_release/replay" VERSION="0.3" # set environmental variables and options @@ -2312,10 +2312,6 @@ GLOBAL_VARS=" DECRYPTED_MESSAGE MESSAGE_HEADERS MESSAGE_BODY MESSAGE - FUNCTION FUNCTIONS - GLOBAL_VARS VAR - USER - GROUP BASENAME FIRMA_USER FIRMA_GROUP @@ -2327,7 +2323,9 @@ GLOBAL_VARS=" REPLAY_FILE REPLAY_DEFAULT_FILE REPLAY_PROTECTION - REPLAY_COUNT" + REPLAY_COUNT + FUNCTION FUNCTIONS + GLOBAL_VARS" FUNCTIONS=" Usage -- cgit v1.2.3