From 0a82ca4af4f5e0f10efa5ceb7b00164687bdb2d1 Mon Sep 17 00:00:00 2001 From: Dragan Dosen Date: Fri, 23 Apr 2010 19:56:42 +0200 Subject: [PATCH] Dodatna prilagodba paketa, izbacene neke od funkcionalnosti. Vise se ne koristi debconf, $min_pass_length se podesava samo u slucaju kada change_pass konfiguracija uopce ne postoji. --- README.CARNet | 8 +++-- debian/changelog | 6 ++-- debian/control | 2 +- debian/postinst | 85 +----------------------------------------------------- debian/postrm | 5 ---- debian/rules | 1 - debian/templates | 12 -------- 7 files changed, 11 insertions(+), 108 deletions(-) delete mode 100644 debian/postrm delete mode 100644 debian/templates diff --git a/README.CARNet b/README.CARNet index 91974d7..124ed6e 100644 --- a/README.CARNet +++ b/README.CARNet @@ -32,9 +32,11 @@ odnosno /usr/share/squirrelmail/plugins/change_pass/config.php -Paket automatski podesava minimalnu duzinu zaporke na 8 znakova - -duzina zaporke nije odredjena PAM konfiguracijom, vec je zadana -u konfiguracijskoj datoteci za change_pass dodatak (varijabla +Paket automatski podesava minimalnu duzinu zaporke na 8 znakova u +slucaju kada navedene konfiguracijske datoteke ne postoje. + +Minimalna duzina zaporke nije odredjena PAM konfiguracijom, vec je +zadana u konfiguracijskoj datoteci change_pass dodatka (varijabla $min_pass_length). Dokumentacija se nalazi unutar direktorija: diff --git a/debian/changelog b/debian/changelog index 2a7af64..b0f0ba0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,10 @@ squirrelmail-change-pass-cn (3.0.2) stable; urgency=low * Dio paketa koji sadrzi sam change_pass dodatak odvojen je u zasebni paket - squirrelmail-change-pass. - * Automatsko podesavanje minimalne duzine zaporke (8 znakova) - u konfiguraciji change_pass dodatka. (rijeseno: #9565) + * U slucaju kada ne postoji konfiguracija za change_pass dodatak + vrsi se automatsko generiranje nove konfiguracije, te + podesavanje minimalne duzine zaporke (8 znakova). + (rijeseno: #9565) * Izmjene unutar datoteka: debian/postinst, debian/prerm i debian/control. * Azurirana datoteka README.CARNet. diff --git a/debian/control b/debian/control index bee529c..f1d3d5a 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Standards-Version: 3.8.0 Package: squirrelmail-change-pass-cn Architecture: all -Depends: squirrelmail-cn (>= 2:1.4.15-2lenny1), squirrelmail-change-pass (>= 3.0-1), xinetd-cn (>= 1:2.3.14-3lenny1), poppassd (>= 1.8.5-3.2), carnet-tools-cn (>= 2.8.1), ${misc:Depends} +Depends: squirrelmail-cn (>= 2:1.4.15-2lenny1), squirrelmail-change-pass (>= 3.0-1), xinetd-cn (>= 1:2.3.14-3lenny1), poppassd (>= 1.8.5-3.2), carnet-tools-cn (>= 2.8.1) Description: SquirrelMail plugin: Change Password Change passwords using a poppass daemon. . diff --git a/debian/postinst b/debian/postinst index b35cddc..8319893 100644 --- a/debian/postinst +++ b/debian/postinst @@ -5,10 +5,6 @@ set -e [ "$1" = "configure" ] || exit 0 [ $DEBIAN_SCRIPT_DEBUG ] && set -vx - -# Load debconf -. /usr/share/debconf/confmodule - # Include CARNet functions . /usr/share/carnet-tools/functions.sh @@ -20,37 +16,6 @@ SQCPCONF="$SQCONFDIR/config_change_pass.php" CPCONF="/usr/share/squirrelmail/plugins/change_pass/config.php" need_restart=0 min_pass_changed=0 -temp_files= - -set_min_pass_length () { - - local sed_re conf_file - conf_re="$1" - conf_file="$2" - temp_files="$temp_files $conf_file.dpkg-tmp" - - sed "$conf_re" "$conf_file" > "$conf_file.dpkg-tmp" - - if ! cmp -s "$conf_file" "$conf_file.dpkg-tmp" 2>&1 >/dev/null; then - cp_mv "$conf_file.dpkg-tmp" "$conf_file" - min_pass_changed=1 - else - rm -f "$conf_file.dpkg-tmp" - fi -} - -cleanup () { - - if [ -n "$temp_files" ]; then - for temp_item in $temp_files; do - if [ -e "$temp_item" ]; then - rm -f $temp_item - fi - done - fi -} - -trap cleanup 0 1 2 15 # Configure poppassd to refuse connection from all hosts @@ -118,78 +83,30 @@ if [ ! -f "$SQCPCONF" ]; then cp_echo "CN: Generating new file $SQCPCONF" cat > "$SQCPCONF" <