summaryrefslogtreecommitdiffstats
path: root/lib/util/samba_util.h
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2014-03-25 12:53:04 +0200
committerJeremy Allison <jra@samba.org>2014-04-23 02:29:08 +0200
commitaa8c8a7b5b062b36a74a505aa48ba7dc5141aa55 (patch)
tree4225d4ca30fdd7b74b66fbd5314f3dd605e43aba /lib/util/samba_util.h
parent13784b74d84e1351e27702fd3bbfb04eeb9a40f8 (diff)
downloadsamba-aa8c8a7b5b062b36a74a505aa48ba7dc5141aa55.tar.gz
samba-aa8c8a7b5b062b36a74a505aa48ba7dc5141aa55.tar.xz
samba-aa8c8a7b5b062b36a74a505aa48ba7dc5141aa55.zip
add systemd integration
Add --with-systemd / --without-systemd options to check whether libsystemd-daemon library is available and use it to report service startup status to systemd for smbd/winbindd/nmbd and AD DC. The problem it solves is correct reporting of the Samba services at the point when they are ready to serve clients, important for high availability software integration. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10517 Signed-off-by: Alexander Bokovoy <ab@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'lib/util/samba_util.h')
-rw-r--r--lib/util/samba_util.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/util/samba_util.h b/lib/util/samba_util.h
index dcb92eed461..e3fe6a60792 100644
--- a/lib/util/samba_util.h
+++ b/lib/util/samba_util.h
@@ -842,6 +842,18 @@ _PUBLIC_ void close_low_fds(bool stdin_too, bool stdout_too, bool stderr_too);
_PUBLIC_ void become_daemon(bool do_fork, bool no_process_group, bool log_stdout);
/**
+ Exit daemon and print error message to the log at level 0
+ Optionally report failure to systemd if systemd integration is enabled
+**/
+_PUBLIC_ void exit_daemon(const char *msg, int error);
+
+/**
+ Report that the daemon is ready to serve connections to the log at level 0
+ Optionally report status to systemd if systemd integration is enabled
+**/
+_PUBLIC_ void daemon_ready(const char *daemon);
+
+/**
* @brief Get a password from the console.
*
* You should make sure that the buffer is an empty string!