Add a function to drop privileges.
[apps/pfixtools.git] / daemon.h
index 5e3b30f..5bc2cfb 100644 (file)
--- a/daemon.h
+++ b/daemon.h
@@ -1,5 +1,5 @@
 /******************************************************************************/
-/*          postlicyd: a postfix policy daemon with a lot of features         */
+/*          pfixtools: a collection of postfix related tools                  */
 /*          ~~~~~~~~~                                                         */
 /*  ________________________________________________________________________  */
 /*                                                                            */
 #ifndef POSTLICYD_DAEMON_H
 #define POSTLICYD_DAEMON_H
 
-int tcp_listen(const struct sockaddr *addr, socklen_t len);
+int tcp_listen_nonblock(const struct sockaddr *addr, socklen_t len);
+int accept_nonblock(int fd);
+
+int daemon_detach(void);
+int drop_privilegies(const char *user, const char *group);
 
 #endif