diff options
author | Remi Collet <fedora@famillecollet.com> | 2016-08-31 21:16:57 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2016-08-31 21:16:57 +0200 |
commit | 1d535f79136fc855a77af17675dbf48977764ec6 (patch) | |
tree | db4413ec81fa7f0bc14cd44311f708a2de38697d /phpMyAdmin.spec | |
parent | 1cc6e564683be0b0f969410e1b3cb05baffc8c7a (diff) |
phpMyAdmin: 32 chars blowfisk secret
Diffstat (limited to 'phpMyAdmin.spec')
-rw-r--r-- | phpMyAdmin.spec | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/phpMyAdmin.spec b/phpMyAdmin.spec index 1d39667..24f7515 100644 --- a/phpMyAdmin.spec +++ b/phpMyAdmin.spec @@ -41,6 +41,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: unzip +Requires(post): coreutils sed Requires: webserver %if %{with_nginx} Requires: nginx-filesystem @@ -198,9 +199,10 @@ if [ -d %{_datadir}/%{name}/doc/html ]; then fi %post -# generate a secret key for this install -sed -i -e "/'blowfish_secret'/s/MUSTBECHANGEDONINSTALL/$RANDOM$RANDOM$RANDOM$RANDOM/" \ - %{_sysconfdir}/%{name}/config.inc.php +# generate a 32 chars secret key for this install +SECRET=$(printf "%04x%04x%04x%04x%04x%04x%04x%04x" $RANDOM $RANDOM $RANDOM $RANDOM $RANDOM $RANDOM $RANDOM $RANDOM) +sed -e "/'blowfish_secret'/s/MUSTBECHANGEDONINSTALL/$SECRET/" \ + -i %{_sysconfdir}/%{name}/config.inc.php %files |