diff options
author | Michael Hanselmann <hansmi@gentoo.org> | 2005-06-08 19:23:06 +0000 |
---|---|---|
committer | Michael Hanselmann <hansmi@gentoo.org> | 2005-06-08 19:23:06 +0000 |
commit | 44f16b0973ce6a2c1cc1f6250ebc91bec77de50a (patch) | |
tree | a7e789799dc9088f6cd6a1c9dcc5ea28b93f80f4 /mail-mta/qmail | |
parent | Removed some old versions of rpc2 and adapted SRC_URI. (diff) | |
download | historical-44f16b0973ce6a2c1cc1f6250ebc91bec77de50a.tar.gz historical-44f16b0973ce6a2c1cc1f6250ebc91bec77de50a.tar.bz2 historical-44f16b0973ce6a2c1cc1f6250ebc91bec77de50a.zip |
Modified qmail-genrsacert.sh so it can generate multiple keys.
Package-Manager: portage-2.0.51.22-r1
Diffstat (limited to 'mail-mta/qmail')
-rw-r--r-- | mail-mta/qmail/ChangeLog | 6 | ||||
-rw-r--r-- | mail-mta/qmail/Manifest | 4 | ||||
-rw-r--r-- | mail-mta/qmail/files/qmail-genrsacert.sh | 35 |
3 files changed, 27 insertions, 18 deletions
diff --git a/mail-mta/qmail/ChangeLog b/mail-mta/qmail/ChangeLog index 6b2c613c17f5..e058d9226746 100644 --- a/mail-mta/qmail/ChangeLog +++ b/mail-mta/qmail/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for mail-mta/qmail # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/mail-mta/qmail/ChangeLog,v 1.41 2005/06/05 15:24:05 hansmi Exp $ +# $Header: /var/cvsroot/gentoo-x86/mail-mta/qmail/ChangeLog,v 1.42 2005/06/08 19:23:06 hansmi Exp $ + + 08 Jun 2005; Michael Hanselmann <hansmi@gentoo.org> + files/qmail-genrsacert.sh: + Modified so it can generate multiple keys. See bug 77380. 05 Jun 2005; Michael Hanselmann <hansmi@gentoo.org> qmail-1.03-r15.ebuild: Fixed bug 92742. diff --git a/mail-mta/qmail/Manifest b/mail-mta/qmail/Manifest index 72229028e1ab..70ce1f01dc36 100644 --- a/mail-mta/qmail/Manifest +++ b/mail-mta/qmail/Manifest @@ -1,5 +1,5 @@ MD5 e60e7e9ed6a2c7d3a2ebcee6a6af429e metadata.xml 277 -MD5 c31c219465f8441f903a5fd8c5820147 ChangeLog 29000 +MD5 57caf7da6f04a808eed96d49f2cc1bf2 ChangeLog 29144 MD5 3a59517e6fec441ff7f7a8c62398d768 qmail-1.03-r16.ebuild 21224 MD5 21fc9651e8bb292a5fbaa4fd0bdf5ac1 qmail-1.03-r15.ebuild 18081 MD5 7db09ceb9337348431fb9f8418e5892e files/dot_qmail-log 276 @@ -26,7 +26,7 @@ MD5 d779786aab66f97f6e7e4785ca89a636 files/tcp.pop3.sample 335 MD5 b7e7c96254dabacdec5bf5904957c7b2 files/tcp.qmqp.sample 399 MD5 fd098ab9ede9c74f209bf16e168ab185 files/conf-common 2328 MD5 9867559d416bd731eed63709f5eef841 files/run-qmailpop3dlog 321 -MD5 6833866c14d955fee43d202f2c62151a files/qmail-genrsacert.sh 1165 +MD5 5ab141836d53db27575900110088a19a files/qmail-genrsacert.sh 1247 MD5 5d982dc0db68c72cde9ce03f0da37ce4 files/run-qmailpop3d 909 MD5 2d3271eba444e0c0ad2bd39626ba9156 files/tcp.qmtp.sample 821 MD5 60de9dacc5289d44d64603d76e5ebc99 files/run-qmailsendlog 320 diff --git a/mail-mta/qmail/files/qmail-genrsacert.sh b/mail-mta/qmail/files/qmail-genrsacert.sh index fd9515a8184f..16d11e7578ba 100644 --- a/mail-mta/qmail/files/qmail-genrsacert.sh +++ b/mail-mta/qmail/files/qmail-genrsacert.sh @@ -1,5 +1,5 @@ #!/bin/bash -# $Header: /var/cvsroot/gentoo-x86/mail-mta/qmail/files/qmail-genrsacert.sh,v 1.2 2004/07/18 03:29:51 dragonheart Exp $ +# $Header: /var/cvsroot/gentoo-x86/mail-mta/qmail/files/qmail-genrsacert.sh,v 1.3 2005/06/08 19:23:06 hansmi Exp $ # Robin H. Johnson <robbat2@gentoo.org> - October 17, 2003 # This file generates the static temporary RSA keys needed for qmail to encrypt messages # It should be run from a crontab, once a day is ok on low load machines, but @@ -8,17 +8,10 @@ # each connection, which can be VERY slow. if [ -z "${ROOT}" -o "${ROOT}" = "/" ]; then -confdir=/var/qmail/control + confdir=/var/qmail/control else -confdir=${ROOT}/var/qmail/control + confdir=${ROOT}/var/qmail/control fi -pemfile="${confdir}/rsa512.pem" -tmpfile="${confdir}/rsa512.pem.tmp" - -# this is the number of bits in the key -# it should be a power of 2 ideally -# and it must be more than 64! -bits="512" # the key should be 0600 # which is readable by qmaild only! @@ -26,8 +19,20 @@ umaskvalue="0077" uid="qmaild" gid="qmail" -umask ${umaskvalue} ; -# we need to make sure that all of the operations succeed -/usr/bin/openssl genrsa -out ${tmpfile} ${bits} 2>/dev/null && \ -/bin/chown ${uid}:${gid} ${tmpfile} && \ -/bin/mv -f ${tmpfile} ${pemfile} +umask ${umaskvalue} + +# This is a list with bits of the generated keys. They should +# be a power of 2 ideally and must be more than 64. +# Sample: 128 256 512 1024 +keys="512" + +for bits in ${keys} +do + pemfile="${confdir}/rsa${bits}.pem" + tmpfile="${confdir}/rsa${bits}.pem.tmp" + + # we need to make sure that all of the operations succeed + /usr/bin/openssl genrsa -out ${tmpfile} ${bits} 2>/dev/null && \ + /bin/chown ${uid}:${gid} ${tmpfile} && \ + /bin/mv -f ${tmpfile} ${pemfile} || exit 1 +done |