Bug#440032: postinst (almost) overwrites existing ssl cert/key

2007-08-30 Thread John Hedges
On Thu, Aug 30, 2007 at 08:23:18AM +0200, martin f krafft wrote: > also sprach Jaldhar H. Vyas <[EMAIL PROTECTED]> [2007.08.30.0732 +0200]: > > if [ ${#SSL_CERT[*]} -eq 1 -a ${#SSL_KEY[*]} -eq 1 ]; then > > That's a bashism * 2: [*] as well as -a > > I suggest something like this instead: > > ##

Bug#440032: postinst (almost) overwrites existing ssl cert/key

2007-08-29 Thread martin f krafft
also sprach Jaldhar H. Vyas <[EMAIL PROTECTED]> [2007.08.30.0732 +0200]: > if [ ${#SSL_CERT[*]} -eq 1 -a ${#SSL_KEY[*]} -eq 1 ]; then That's a bashism * 2: [*] as well as -a I suggest something like this instead: ## SSL Certs # Certs and key file SSL_CERT="$(sed -ne 's,^[[:space:]]*ssl_cert_file

Bug#440032: postinst (almost) overwrites existing ssl cert/key

2007-08-29 Thread Jaldhar H. Vyas
On Thu, 30 Aug 2007, Jaldhar H. Vyas wrote: I propose the following change to the postinst to fix the problems you and Martin have reported. Does it look ok? If so I will upload a fixed package tomorrow. ## SSL Certs # Certs and key file SSL_CERT=$( (egrep -s "^[^#]*ssl_cert_file" dovecot.c

Bug#440032: postinst (almost) overwrites existing ssl cert/key

2007-08-29 Thread Jaldhar H. Vyas
On Wed, 29 Aug 2007, John Hedges wrote: This causes more serious problems for me as my keys are group readable. The certificates aren't regenerated, but are chmodded and chowned enough to break a working system. I suggest not grepping the config for the ssl files at all: simply ensure the defau

Bug#440032: postinst (almost) overwrites existing ssl cert/key

2007-08-29 Thread John Hedges
This causes more serious problems for me as my keys are group readable. The certificates aren't regenerated, but are chmodded and chowned enough to break a working system. I suggest not grepping the config for the ssl files at all: simply ensure the default /etc/ssl/{certs,private}/dovecot.pem exi

Bug#440032: postinst (almost) overwrites existing ssl cert/key

2007-08-29 Thread martin f krafft
Package: dovecot-common Version: 1.0.rc15-2etch1 Severity: minor I thought at first this would be grave, but it fortunately isn't. I have two separate cert files both based off the same key for dovecot imap and pop: protocol imap { ssl_listen = * ssl_cert_file = /etc/ssl/certs/imap.ma