fixup! WIP: find libsystemd with autoconfig
This commit is contained in:
@@ -75,6 +75,10 @@ kadmind_LDADD = $(top_builddir)/lib/kadm5/libkadm5srv.la \
|
||||
$(LIB_pidfile) \
|
||||
$(LIB_dlopen)
|
||||
|
||||
if HAVE_SYSTEMD
|
||||
kadmind_LDADD += $(SYSTEMD_LIBS)
|
||||
endif
|
||||
|
||||
kadmin_LDADD = \
|
||||
$(top_builddir)/lib/kadm5/libkadm5clnt.la \
|
||||
$(top_builddir)/lib/kadm5/libkadm5srv.la \
|
||||
|
||||
11
kadmin/rpc.c
11
kadmin/rpc.c
@@ -36,6 +36,9 @@
|
||||
#include <gssapi.h>
|
||||
#include <gssapi_krb5.h>
|
||||
#include <gssapi_spnego.h>
|
||||
#ifdef HAVE_SYSTEMD
|
||||
#include <systemd/sd-daemon.h>
|
||||
#endif
|
||||
|
||||
#define CHECK(x) \
|
||||
do { \
|
||||
@@ -799,6 +802,10 @@ process_stream(krb5_context contextp,
|
||||
*/
|
||||
|
||||
INSIST(ilen >= 4);
|
||||
|
||||
#ifdef HAVE_SYSTEMD
|
||||
sd_notify(0, "READY=1");
|
||||
#endif
|
||||
|
||||
while (1) {
|
||||
struct call_header chdr;
|
||||
@@ -1129,6 +1136,10 @@ process_stream(krb5_context contextp,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#ifdef HAVE_SYSTEMD
|
||||
sd_notify(0, "STOPPING=1");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
|
||||
#include "kadmin_locl.h"
|
||||
#include <krb5-private.h>
|
||||
#ifdef HAVE_SYSTEMD
|
||||
#include <systemd/sd-daemon.h>
|
||||
#endif
|
||||
|
||||
static kadm5_ret_t check_aliases(kadm5_server_context *,
|
||||
kadm5_principal_ent_rec *,
|
||||
@@ -1131,7 +1134,16 @@ handle_v5(krb5_context contextp,
|
||||
krb5_err(contextp, 1, ret, "kadm5_init_with_password_ctx");
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef HAVE_SYSTEMD
|
||||
sd_notify(0, "READY=1");
|
||||
#endif
|
||||
|
||||
v5_loop(contextp, ac, initial, kadm_handlep, fd, readonly);
|
||||
|
||||
#ifdef HAVE_SYSTEMD
|
||||
sd_notify(0, "STOPPING=1");
|
||||
#endif
|
||||
}
|
||||
|
||||
krb5_error_code
|
||||
@@ -1171,4 +1183,3 @@ kadmind_loop(krb5_context contextp,
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user