mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-27 07:57:27 +00:00
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>
This commit is contained in:
@@ -1,6 +1,4 @@
|
|||||||
# Automatically generated. If you change anything in this file other than the
|
# 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
|
# krb5-admin-server and disable managing the kadmin configuration with
|
||||||
# debconf. Otherwise, changes will be overwritten.
|
# debconf. Otherwise, changes will be overwritten.
|
||||||
|
|
||||||
RUN_KADMIND=true
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ ConditionPathExists=/etc/krb5.conf
|
|||||||
Type=forking
|
Type=forking
|
||||||
ExecStartPre=/bin/sh -c "test ! -f /var/log/kadmind.log || test ! -x /sbin/restorecon || /sbin/restorecon -F /var/log/kadmind.log"
|
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
|
ExecStart=/usr/sbin/kadmind
|
||||||
|
EnvironmentFile=-/etc/default/krb5-admin-server
|
||||||
SuccessExitStatus=1 2 SIGKILL
|
SuccessExitStatus=1 2 SIGKILL
|
||||||
TimeoutStopSec=30
|
TimeoutStopSec=30
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ ConditionPathExists=/etc/krb5.conf
|
|||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
Type=forking
|
||||||
ExecStart=/usr/sbin/krb5kdc
|
ExecStart=/usr/sbin/krb5kdc
|
||||||
|
EnvironmentFile=-/etc/default/krb5-kdc
|
||||||
SuccessExitStatus=1 2 SIGKILL
|
SuccessExitStatus=1 2 SIGKILL
|
||||||
TimeoutStopSec=30
|
TimeoutStopSec=30
|
||||||
|
|
||||||
|
|||||||
@@ -78,12 +78,17 @@ do_install_append() {
|
|||||||
mkdir -p ${D}/${sysconfdir}/default/volatiles
|
mkdir -p ${D}/${sysconfdir}/default/volatiles
|
||||||
echo "d root root 0755 ${localstatedir}/run/krb5kdc none" \
|
echo "d root root 0755 ${localstatedir}/run/krb5kdc none" \
|
||||||
> ${D}${sysconfdir}/default/volatiles/87_krb5
|
> ${D}${sysconfdir}/default/volatiles/87_krb5
|
||||||
|
|
||||||
|
echo "RUN_KADMIND=true" >> ${D}/${sysconfdir}/default/krb5-admin-server
|
||||||
fi
|
fi
|
||||||
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
|
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
|
||||||
install -d ${D}${sysconfdir}/tmpfiles.d
|
install -d ${D}${sysconfdir}/tmpfiles.d
|
||||||
echo "d /run/krb5kdc - - - -" \
|
echo "d /run/krb5kdc - - - -" \
|
||||||
> ${D}${sysconfdir}/tmpfiles.d/krb5.conf
|
> ${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 -d ${D}${systemd_system_unitdir}
|
||||||
install -m 0644 ${WORKDIR}/krb5-admin-server.service ${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}
|
install -m 0644 ${WORKDIR}/krb5-kdc.service ${D}${systemd_system_unitdir}
|
||||||
|
|||||||
Reference in New Issue
Block a user