From c2b8cbf19e2591c5d163038ef19aa8442c2348ca Mon Sep 17 00:00:00 2001 From: Koichiro Iwao Date: Fri, 12 Jul 2024 11:08:48 +0900 Subject: [PATCH] chkpriv: respect $sysconfdir for config files directory While here, ignore build artifacts of chkpriv tools. Follow-up to: #2974 --- .gitignore | 2 ++ tools/chkpriv/Makefile.am | 3 ++- tools/chkpriv/xrdp-chkpriv.in | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index dedde9c33c..2d390d047d 100644 --- a/.gitignore +++ b/.gitignore @@ -54,6 +54,8 @@ tests/libxrdp/test_libxrdp tests/memtest/memtest tests/xrdp/test_xrdp tools/devel/tcp_proxy/tcp_proxy +tools/chkpriv/xrdp-chkpriv +tools/chkpriv/xrdp-droppriv *.trs waitforx/waitforx xrdp/xrdp diff --git a/tools/chkpriv/Makefile.am b/tools/chkpriv/Makefile.am index c6b1d04b8a..70614b16d2 100644 --- a/tools/chkpriv/Makefile.am +++ b/tools/chkpriv/Makefile.am @@ -17,7 +17,8 @@ xrdp_droppriv_LDADD = \ $(top_builddir)/common/libcommon.la SUBST_VARS = sed \ - -e 's|@pkglibexecdir[@]|$(pkglibexecdir)|g' + -e 's|@pkglibexecdir[@]|$(pkglibexecdir)|g' \ + -e 's|@sysconfdir[@]|$(sysconfdir)|g' subst_verbose = $(subst_verbose_@AM_V@) subst_verbose_ = $(subst_verbose_@AM_DEFAULT_V@) diff --git a/tools/chkpriv/xrdp-chkpriv.in b/tools/chkpriv/xrdp-chkpriv.in index 3193e0d3af..2f9acd8de9 100755 --- a/tools/chkpriv/xrdp-chkpriv.in +++ b/tools/chkpriv/xrdp-chkpriv.in @@ -20,7 +20,7 @@ # mode # Change these if they do not match your installation -CONF_DIR=/etc/xrdp +CONF_DIR=@sysconfdir@/xrdp XRDP_INI="$CONF_DIR"/xrdp.ini SESMAN_INI="$CONF_DIR"/sesman.ini RSAKEYS_INI="$CONF_DIR"/rsakeys.ini