summaryrefslogtreecommitdiffstats
path: root/Configurations/unix-Makefile.tmpl
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-08-01 23:18:25 +0200
committerRichard Levitte <levitte@openssl.org>2016-08-02 00:55:46 +0200
commitcb926df2fa42bd1e396a600ff6212ee4f4e04118 (patch)
tree73a61d90d3def542a58a7972ecf08e4da19f3c17 /Configurations/unix-Makefile.tmpl
parent66c2eb8b802c78dc9050779601e356a2f20cefe8 (diff)
Don't overwrite existing installed openssl.cnf
Instead, install the new one as openssl.cnf.dist (openssl.cnf-dist on VMS), and only install it as openssl.cnf if that file doesn't already exist. Also, don't install with exec privileges on VMS. Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'Configurations/unix-Makefile.tmpl')
-rw-r--r--Configurations/unix-Makefile.tmpl9
1 files changed, 7 insertions, 2 deletions
diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl
index 9feb4b1bbc..3b6914c930 100644
--- a/Configurations/unix-Makefile.tmpl
+++ b/Configurations/unix-Makefile.tmpl
@@ -346,10 +346,15 @@ install_ssldirs:
mv -f $(DESTDIR)$(OPENSSLDIR)/misc/$$fn.new \
$(DESTDIR)$(OPENSSLDIR)/misc/$$fn; \
done
- @echo "install $(SRCDIR)/apps/openssl.cnf -> $(DESTDIR)$(OPENSSLDIR)/openssl.cnf"
+ @echo "install $(SRCDIR)/apps/openssl.cnf -> $(DESTDIR)$(OPENSSLDIR)/openssl.cnf.dist"
@cp $(SRCDIR)/apps/openssl.cnf $(DESTDIR)$(OPENSSLDIR)/openssl.cnf.new
@chmod 644 $(DESTDIR)$(OPENSSLDIR)/openssl.cnf.new
- @mv -f $(DESTDIR)$(OPENSSLDIR)/openssl.cnf.new $(DESTDIR)$(OPENSSLDIR)/openssl.cnf
+ @mv -f $(DESTDIR)$(OPENSSLDIR)/openssl.cnf.new $(DESTDIR)$(OPENSSLDIR)/openssl.cnf.dist
+ @if ! [ -f "$(DESTDIR)$(OPENSSLDIR)/openssl.cnf" ]; then \
+ echo "install $(SRCDIR)/apps/openssl.cnf -> $(DESTDIR)$(OPENSSLDIR)/openssl.cnf"; \
+ cp $(SRCDIR)/apps/openssl.cnf $(DESTDIR)$(OPENSSLDIR)/openssl.cnf; \
+ chmod 644 $(DESTDIR)$(OPENSSLDIR)/openssl.cnf; \
+ fi
install_dev:
@[ -n "$(INSTALLTOP)" ] || (echo INSTALLTOP should not be empty; exit 1)