commit:     17b9a8844e59ffee9a7a21da49c77f8bd846ddb1
Author:     Julian Ospald <hasufell <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 26 20:17:23 2015 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Tue Oct 27 13:10:03 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17b9a884

www-servers/tomcat: generate a more secure password

 www-servers/tomcat/tomcat-8.0.28-r1.ebuild | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/www-servers/tomcat/tomcat-8.0.28-r1.ebuild 
b/www-servers/tomcat/tomcat-8.0.28-r1.ebuild
index a06fb32..0d40f89 100644
--- a/www-servers/tomcat/tomcat-8.0.28-r1.ebuild
+++ b/www-servers/tomcat/tomcat-8.0.28-r1.ebuild
@@ -31,6 +31,7 @@ RDEPEND="${COMMON_DEP}
        !<dev-java/tomcat-native-1.1.24
        >=virtual/jre-1.7"
 DEPEND="${COMMON_DEP}
+       app-admin/pwgen
        >=virtual/jdk-1.7
        test? (
                >=dev-java/ant-junit-1.9:0
@@ -110,7 +111,7 @@ src_install() {
        fperms 0750 "${dest}"/logs
 
        # replace the default pw with a random one, see #92281
-       local randpw=$(echo ${RANDOM}|md5sum|cut -c 1-15)
+       local randpw="$(pwgen -s -B 15 1)"
        sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die
 
        # prepend gentoo.classpath to common.loader, see #453212

Reply via email to