fixup! WIP: find libsystemd with autoconfig

This commit is contained in:
2025-03-29 16:25:48 +01:00
parent 3761a26a59
commit 161e2b8ed7
10 changed files with 55 additions and 3 deletions
+4
View File
@@ -21,6 +21,10 @@ kpasswdd_LDADD = \
$(LIB_pidfile) \
$(LIB_dlopen) \
$(DB3LIB) $(DB1LIB) $(LMDBLIB) $(NDBMLIB)
if HAVE_SYSTEMD
kpasswdd_LDADD += $(SYSTEMD_LIBS)
endif
LDADD = $(top_builddir)/lib/krb5/libkrb5.la \
$(LIB_hcrypto) \
+11
View File
@@ -38,6 +38,9 @@ RCSID("$Id$");
#ifdef HAVE_SYS_UN_H
#include <sys/un.h>
#endif
#ifdef HAVE_SYSTEMD
#include <systemd/sd-daemon.h>
#endif
#include <hdb.h>
#include <kadm5/private.h>
#include <kadm5/kadm5_err.h>
@@ -744,6 +747,10 @@ doit(krb5_keytab keytab, int port)
krb5_errx(context, 1, "No sockets!");
roken_detach_finish(NULL, daemon_child);
#ifdef HAVE_SYSTEMD
sd_notify(0, "READY=1");
#endif
while (exit_flag == 0) {
krb5_ssize_t retx;
@@ -776,6 +783,10 @@ doit(krb5_keytab keytab, int port)
buf, retx);
}
}
#ifdef HAVE_SYSTEMD
sd_notify(0, "STOPPING=1");
#endif
for (i = 0; i < n; ++i)
close(sockets[i]);