aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2018-05-02 17:31:54 +0800
committerArmin Kuster <akuster808@gmail.com>2018-06-14 19:35:29 -0700
commitb70793830593f1eaf1441574d8b49eca2413e46d (patch)
tree1610419ad601dd86e08eb467fdf6efb09665f70f /meta-oe
parenteac0775b18bc1f421edb65e6ed4d78e66588a858 (diff)
downloadmeta-openembedded-b70793830593f1eaf1441574d8b49eca2413e46d.tar.gz
meta-openembedded-b70793830593f1eaf1441574d8b49eca2413e46d.tar.bz2
meta-openembedded-b70793830593f1eaf1441574d8b49eca2413e46d.zip
krb5: support environment setting on systemd
Let krb5 support environment setting on systemd startup. Here is one requirement of environment setting from upstream krb5 ... https://web.mit.edu/kerberos/krb5-1.16/doc/admin/conf_files/kdc_conf.html |Normally, the kdc.conf file is found in the KDC state directory, LOCALSTATEDIR/krb5kdc. You can override the default location by setting the environment variable KRB5_KDC_PROFILE. ... The fix of (krb5-admin-server.service/krb5-kdc.service) refers ubuntu 1604 Variable RUN_KADMIND is sysvinit, move it out from default/krb5-admin-server Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> (cherry picked from commit 7eb04ba6772272a30c4a184702d039d145ec7799) Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-connectivity/krb5/krb5/etc/default/krb5-admin-server4
-rw-r--r--meta-oe/recipes-connectivity/krb5/krb5/krb5-admin-server.service1
-rw-r--r--meta-oe/recipes-connectivity/krb5/krb5/krb5-kdc.service1
-rw-r--r--meta-oe/recipes-connectivity/krb5/krb5_1.16.bb5
4 files changed, 8 insertions, 3 deletions
diff --git a/meta-oe/recipes-connectivity/krb5/krb5/etc/default/krb5-admin-server b/meta-oe/recipes-connectivity/krb5/krb5/etc/default/krb5-admin-server
index 283592913..e097353c2 100644
--- a/meta-oe/recipes-connectivity/krb5/krb5/etc/default/krb5-admin-server
+++ b/meta-oe/recipes-connectivity/krb5/krb5/etc/default/krb5-admin-server
@@ -1,6 +1,4 @@
# Automatically generated. If you change anything in this file other than the
-# values of RUN_KADMIND or DAEMON_ARGS, first run dpkg-reconfigure
+# values of DAEMON_ARGS, first run dpkg-reconfigure
# krb5-admin-server and disable managing the kadmin configuration with
# debconf. Otherwise, changes will be overwritten.
-
-RUN_KADMIND=true
diff --git a/meta-oe/recipes-connectivity/krb5/krb5/krb5-admin-server.service b/meta-oe/recipes-connectivity/krb5/krb5/krb5-admin-server.service
index 1b4271643..21939a1f0 100644
--- a/meta-oe/recipes-connectivity/krb5/krb5/krb5-admin-server.service
+++ b/meta-oe/recipes-connectivity/krb5/krb5/krb5-admin-server.service
@@ -7,6 +7,7 @@ ConditionPathExists=/etc/krb5.conf
Type=forking
ExecStartPre=/bin/sh -c "test ! -f /var/log/kadmind.log || test ! -x /sbin/restorecon || /sbin/restorecon -F /var/log/kadmind.log"
ExecStart=/usr/sbin/kadmind
+EnvironmentFile=-/etc/default/krb5-admin-server
SuccessExitStatus=1 2 SIGKILL
TimeoutStopSec=30
diff --git a/meta-oe/recipes-connectivity/krb5/krb5/krb5-kdc.service b/meta-oe/recipes-connectivity/krb5/krb5/krb5-kdc.service
index d5e5a9579..bf37c45ba 100644
--- a/meta-oe/recipes-connectivity/krb5/krb5/krb5-kdc.service
+++ b/meta-oe/recipes-connectivity/krb5/krb5/krb5-kdc.service
@@ -6,6 +6,7 @@ ConditionPathExists=/etc/krb5.conf
[Service]
Type=forking
ExecStart=/usr/sbin/krb5kdc
+EnvironmentFile=-/etc/default/krb5-kdc
SuccessExitStatus=1 2 SIGKILL
TimeoutStopSec=30
diff --git a/meta-oe/recipes-connectivity/krb5/krb5_1.16.bb b/meta-oe/recipes-connectivity/krb5/krb5_1.16.bb
index ce2134513..f95240f54 100644
--- a/meta-oe/recipes-connectivity/krb5/krb5_1.16.bb
+++ b/meta-oe/recipes-connectivity/krb5/krb5_1.16.bb
@@ -78,12 +78,17 @@ do_install_append() {
mkdir -p ${D}/${sysconfdir}/default/volatiles
echo "d root root 0755 ${localstatedir}/run/krb5kdc none" \
> ${D}${sysconfdir}/default/volatiles/87_krb5
+
+ echo "RUN_KADMIND=true" >> ${D}/${sysconfdir}/default/krb5-admin-server
fi
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
install -d ${D}${sysconfdir}/tmpfiles.d
echo "d /run/krb5kdc - - - -" \
> ${D}${sysconfdir}/tmpfiles.d/krb5.conf
+ mkdir -p ${D}/${sysconfdir}/default
+ install -m 0644 ${WORKDIR}/etc/default/* ${D}/${sysconfdir}/default
+
install -d ${D}${systemd_system_unitdir}
install -m 0644 ${WORKDIR}/krb5-admin-server.service ${D}${systemd_system_unitdir}
install -m 0644 ${WORKDIR}/krb5-kdc.service ${D}${systemd_system_unitdir}