summaryrefslogtreecommitdiffstats
path: root/keygen/Makefile.am
diff options
context:
space:
mode:
authorPavel Roskin <plroskin@gmail.com>2016-02-19 23:38:49 -0800
committerPavel Roskin <plroskin@gmail.com>2016-02-23 22:33:28 -0800
commitb63575cebc2b4c4c6b0188cc376cf623b3fc0d8e (patch)
tree0a79817d1e92474f84c90a1bf993df1998ccd8c3 /keygen/Makefile.am
parent22e6f3e2f75f0e33650c057a11f865a9fd18f15f (diff)
downloadxrdp-proprietary-b63575cebc2b4c4c6b0188cc376cf623b3fc0d8e.tar.gz
xrdp-proprietary-b63575cebc2b4c4c6b0188cc376cf623b3fc0d8e.zip
Create and install rsakeys.ini
Use install-data-hook to ensure restrictive permissions on rsakeys.ini. Don't create rsakeys.ini in init scripts. This makes xrdp functional upon "make install" without relying on the init scripts. Packagers should not package rsakeys.ini, it should be created when the package is installed.
Diffstat (limited to 'keygen/Makefile.am')
-rw-r--r--keygen/Makefile.am9
1 files changed, 9 insertions, 0 deletions
diff --git a/keygen/Makefile.am b/keygen/Makefile.am
index 353f74df..25e20d50 100644
--- a/keygen/Makefile.am
+++ b/keygen/Makefile.am
@@ -13,3 +13,12 @@ xrdp_keygen_SOURCES = keygen.c
xrdp_keygen_LDADD = \
$(top_builddir)/common/libcommon.la
+
+xrdpsysconfdir = $(sysconfdir)/xrdp
+
+install-data-hook:
+ umask 077 && \
+ ./xrdp-keygen xrdp $(DESTDIR)$(xrdpsysconfdir)/rsakeys.ini
+
+uninstall-hook:
+ rm -f $(DESTDIR)$(xrdpsysconfdir)/rsakeys.ini