diff -ur origi/webcalendar-0.9.45/debian/changelog webcalendar-0.9.45/debian/changelog --- origi/webcalendar-0.9.45/debian/changelog 2005-04-04 00:46:06.405458528 -0400 +++ webcalendar-0.9.45/debian/changelog 2005-04-04 00:54:30.071889592 -0400 @@ -1,3 +1,15 @@ +webcalendar (0.9.45-4) unstable; urgency=high + + * Escape values in postinst. Closes: #296935 + * Change database password to Debconf type 'password'. Closes: #298475. + * Remove settings.php on purge. Closes: #298476. + - Also move settings.php.tpl from /etc/ to /usr/share/webcalendar/install. + * Purge debconf data when the package is purged. Closes: #302625. + - Also clear the password from Debconf immediately after writing + it to a file. + + -- Justin Pryzby <[EMAIL PROTECTED]> Sun, 3 Apr 2005 23:49:50 -0400 + webcalendar (0.9.45-3) unstable; urgency=low * removed mysql-server or postgres requirements (closes: #291590) diff -ur origi/webcalendar-0.9.45/debian/install webcalendar-0.9.45/debian/install --- origi/webcalendar-0.9.45/debian/install 2005-04-04 00:46:06.403458832 -0400 +++ webcalendar-0.9.45/debian/install 2005-04-04 00:53:31.295824912 -0400 @@ -5,7 +5,7 @@ includes/print_styles.css etc/webcalendar includes/site_extras.php etc/webcalendar includes/styles.php etc/webcalendar -settings.php.tpl etc/webcalendar +settings.php.tpl usr/share/webcalendar/install *.php usr/share/webcalendar *.gif usr/share/webcalendar *.sql var/lib/webcalendar/sql diff -ur origi/webcalendar-0.9.45/debian/webcalendar.postinst webcalendar-0.9.45/debian/webcalendar.postinst --- origi/webcalendar-0.9.45/debian/webcalendar.postinst 2005-04-04 00:46:06.407458224 -0400 +++ webcalendar-0.9.45/debian/webcalendar.postinst 2005-04-04 00:53:51.342777312 -0400 @@ -31,7 +31,7 @@ configure () { CONF_FILE="/etc/webcalendar/settings.php" - CF_TEMPLATE="/etc/webcalendar/settings.php.tpl" + CF_TEMPLATE="/usr/share/webcalendar/install/settings.php.tpl" db_get webcalendar/status/debconf_managed if [ "$RET" = "false" ]; then @@ -42,6 +42,7 @@ db_get webcalendar/conf/db_host; DB_HOST=$RET; db_get webcalendar/conf/db_login; DB_LOGIN=$RET; db_get webcalendar/conf/db_password; DB_PASSWORD=$RET; + db_set webcalendar/conf/db_password ''; db_get webcalendar/conf/db_database; DB_DATABASE=$RET; db_get webcalendar/conf/db_persistent; DB_PERSISTENT=$RET; db_get webcalendar/conf/use_http_auth; USE_HTTP_AUTH=$RET; @@ -61,24 +62,32 @@ SINGLE_USER_MODE="N" fi + DB_TYPE=$(echo "$DB_TYPE" |sed -e "s/[\'\"]/\\\\1/g"); + DB_HOST=$(echo "$DB_HOST" |sed -e "s/[\'\"]/\\\\1/g"); + DB_LOGIN=$(echo "$DB_LOGIN" |sed -e "s/[\'\"]/\\\\1/g"); + DB_PASSWORD=$(echo "$DB_PASSWORD" |sed -e "s/[\'\"]/\\\\1/g"); + DB_DATABASE=$(echo "$DB_DATABASE" |sed -e "s/[\'\"]/\\\\1/g"); + DB_PERSISTENT=$(echo "$DB_PERSISTENT" |sed -e "s/[\'\"]/\\\\1/g"); + USE_HTTP_AUTH=$(echo "$USE_HTTP_AUTH" |sed -e "s/[\'\"]/\\\\1/g"); + SINGLE_USER_MODE=$(echo "$SINGLE_USER_MODE" |sed -e "s/[\'\"]/\\\\1/g"); + SINGLE_USER_LOGIN=$(echo "$SINGLE_USER_LOGIN" |sed -e "s/[\'\"]/\\\\1/g"); + cat $CF_TEMPLATE | perl -e " \ my %CF_REPLACE = ( \ - 'DB_TYPE' => $DB_TYPE, \ - 'DB_HOST' => $DB_HOST, \ - 'DB_TYPE' => $DB_TYPE, \ - 'DB_HOST' => $DB_HOST, \ - 'DB_LOGIN' => $DB_LOGIN, \ - 'DB_PASSWORD' => $DB_PASSWORD, \ - 'DB_DATABASE' => $DB_DATABASE, \ - 'DB_PERSISTENT' => $DB_PERSISTENT, \ - 'USE_HTTP_AUTH' => $USE_HTTP_AUTH, \ - 'SINGLE_USER_MODE' => $SINGLE_USER_MODE, \ - 'SINGLE_USER_LOGIN' => $SINGLE_USER_LOGIN \ + 'DB_TYPE' => '$DB_TYPE', \ + 'DB_HOST' => '$DB_HOST', \ + 'DB_LOGIN' => '$DB_LOGIN', \ + 'DB_PASSWORD' => '$DB_PASSWORD', \ + 'DB_DATABASE' => '$DB_DATABASE', \ + 'DB_PERSISTENT' => '$DB_PERSISTENT', \ + 'USE_HTTP_AUTH' => '$USE_HTTP_AUTH', \ + 'SINGLE_USER_MODE' => '$SINGLE_USER_MODE', \ + 'SINGLE_USER_LOGIN' => '$SINGLE_USER_LOGIN' \ ); \ while (my \$line = <STDIN>) { \ foreach my \$search (keys %CF_REPLACE) { \ my \$replace = \$CF_REPLACE{\$search}; \ - \$line =~ s/DEBCONF::\$search/\$replace/g; \ + \$line =~ s/DEBCONF::\$search/\$replace/; \ } \ print \$line; } \ diff -ur origi/webcalendar-0.9.45/debian/webcalendar.templates webcalendar-0.9.45/debian/webcalendar.templates --- origi/webcalendar-0.9.45/debian/webcalendar.templates 2005-04-04 00:46:06.407458224 -0400 +++ webcalendar-0.9.45/debian/webcalendar.templates 2005-04-03 23:56:13.000000000 -0400 @@ -17,7 +17,7 @@ This is the username used to connect to your SQL server. Template: webcalendar/conf/db_password -Type: string +Type: password Description: Enter the webcalendar SQL password. This is the password used to connect to your SQL server. If your server doesn't require a password, leave this blank. --- /dev/null 2005-01-13 01:17:26.198038592 -0500 +++ webcalendar-0.9.45/debian/webcalendar.postrm 2005-04-04 00:13:39.000000000 -0400 @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +if [ "$1" = purge ]; then + rm -f /etc/webcalendar/settings.php + . /usr/share/debconf/confmodule + db_purge; +fi;
-- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]