#401062 Patch for Heimdal to Start/Stop kadmin with /etc/init.d

#401062#5
Date:
2006-11-30 16:31:13 UTC
From:
To:
I have wanted the init script from heimdal-kdc to start kadmind, but it
doesn't already do so. Attached is a patch that enables such functionality
akin to how it is already being done with configuration items controlled
via /etc/defaults/heimdal-kdc.

Cross-reference:
https://bugs.launchpad.net/distros/ubuntu/+source/heimdal/+bug/73534

This patch is for heimdal-0.7.2.dfsg.1-6:

diff -ru heimdal-0.7.2.dfsg.1.orig/debian/changelog
heimdal-0.7.2.dfsg.1/debian/changelog
--- heimdal-0.7.2.dfsg.1.orig/debian/changelog 2006-11-27
14:59:09.627483000 -0600
+++ heimdal-0.7.2.dfsg.1/debian/changelog 2006-11-27 15:08:49.062282750 -0600
@@ -1,3 +1,13 @@
+heimdal (0.7.2.dfsg.1-6.1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * debian/extras/default:
+ Provided an option to toggle whether kadmind is started.
+ * debian/heimdal-kdc.init:
+ Provided a mechanism for starting kadmind if desired.
+
+ -- Matt Proud <khanreaper@nerp.net> Mon, 27 Nov 2006 15:05:19 -0600
+
 heimdal (0.7.2.dfsg.1-6) unstable; urgency=low

   * Update maintainer E-Mail address.
diff -ru heimdal-0.7.2.dfsg.1.orig/debian/extras/default
heimdal-0.7.2.dfsg.1/debian/extras/default
--- heimdal-0.7.2.dfsg.1.orig/debian/extras/default 2006-11-27
15:01:56.444495750 -0600
+++ heimdal-0.7.2.dfsg.1/debian/extras/default 2006-11-27
15:01:09.985592250 -0600
@@ -6,6 +6,10 @@
 KPASSWDD_ENABLED=yes
 KPASSWDD_PARAMS=""

+# Is kadmind started?
+KADMIND_ENABLED=no
+KADMIND_PARAMS=""
+
 # kprop master?
 MASTER_ENABLED=no

diff -ru heimdal-0.7.2.dfsg.1.orig/debian/heimdal-kdc.init
heimdal-0.7.2.dfsg.1/debian/heimdal-kdc.init
--- heimdal-0.7.2.dfsg.1.orig/debian/heimdal-kdc.init 2006-11-27
14:59:09.611482000 -0600
+++ heimdal-0.7.2.dfsg.1/debian/heimdal-kdc.init 2006-11-27
15:04:48.687260250 -0600
@@ -18,11 +18,15 @@
 KPASSWDD_DAEMON=/usr/lib/heimdal-servers/kpasswdd
 KPASSWDD_NAME=kpasswdd
 KPASSWDD_DESC="Heimdal password server"
+KADMIND_DAEMON=/usr/lib/heimdal-servers/kadmind
+KADMIND_NAME=kadmind
+KADMIND_DESC="Heimdal administration server"

 . /etc/default/heimdal-kdc

 test -f $KDC_DAEMON || exit 0
 test -f $KPASSWDD_DAEMON || exit 0
+test -f $KADMIND_DAEMON || exit 0

 set -e

@@ -44,6 +48,14 @@
    --exec $KPASSWDD_DAEMON -- $KPASSWDD_PARAMS
   echo "$KPASSWDD_NAME."
  fi
+ if [ "$KADMIND_ENABLED" = "yes" ];
+ then
+ echo -n "Starting $KADMIND_DESC: "
+ start-stop-daemon --start --quiet --background \
+ --make-pidfile --pidfile /var/run/$KADMIND_NAME.pid \
+ --exec $KADMIND_DAEMON -- $KADMIND_PARAMS
+ echo "$KADMIND_NAME."
+ fi
  if [ "$MASTER_ENABLED" = "yes" ];
  then
   echo -n "Starting incremental propagation master: "
@@ -76,6 +88,13 @@
    --exec $KDC_DAEMON -- $KDC_PARAMS
   echo "$KDC_NAME."
  fi
+ if [ -f /var/run/$KADMIND_NAME.pid ]
+ then
+ echo -n "Stopping $KADMIND_DESC: "
+ start-stop-daemon --stop --oknodo --quiet --pidfile
/var/run/$KADMIND_NAME.pid \
+ --exec $KADMIND_DAEMON -- $KADMIND_PARAMS
+ echo "$KADMIND_NAME."
+ fi
  if [ -f /var/run/ipropd-master.pid ]
  then
   echo -n "Stopping incremental propagation master: "

#401062#10
Date:
2006-12-08 04:00:47 UTC
From:
To:
    Matt> I have wanted the init script from heimdal-kdc to start
    Matt> kadmind, but it doesn't already do so. Attached is a patch
    Matt> that enables such functionality akin to how it is already
    Matt> being done with configuration items controlled via
    Matt> /etc/defaults/heimdal-kdc.

kadmind is currently setup and configured inside /etc/inetd.conf

Is this still a valid way of starting kadmind?

If not, then this needs to be removed.

Otherwise, the comments should probably be updated to indicate that
kadmind must be disabled in inetd.conf first before enabling
KADMIND_ENABLED.

Thanks.

#401062#15
Date:
2010-06-17 04:45:46 UTC
From:
To:
Unfortunately, I don't see why you would want to Start/Stop kadmin
with init.d instead of inetd.conf,
and I didn't get any response.

I am going to mark this as wontfix. If anybody wants to give me a
reason to reconsider, then please do so.