diff options
author | Simo Sorce <idra@samba.org> | 2008-11-25 16:45:11 -0500 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2008-11-25 19:49:18 -0500 |
commit | 6092cf59d7f5d1c0d915c65bde20fdc98f80c950 (patch) | |
tree | e3689b6e32d1079e38d00297395be3fbe2291169 /server/util/util.h | |
parent | d4b9a588bade582ba2968f270101032a11981e17 (diff) | |
download | sssd-6092cf59d7f5d1c0d915c65bde20fdc98f80c950.tar.gz sssd-6092cf59d7f5d1c0d915c65bde20fdc98f80c950.tar.xz sssd-6092cf59d7f5d1c0d915c65bde20fdc98f80c950.zip |
Make a binary out of each major sssd component instead of
using the same binary to fork off all services.
Diffstat (limited to 'server/util/util.h')
-rw-r--r-- | server/util/util.h | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/server/util/util.h b/server/util/util.h index 6e30cfd28..1c3fa2e77 100644 --- a/server/util/util.h +++ b/server/util/util.h @@ -10,6 +10,10 @@ extern const char *debug_prg_name; extern int debug_level; void debug_fn(const char *format, ...); +#define SSSD_DEBUG_OPTS \ + {"debug-level", 'd', POPT_ARG_INT, &debug_level, 0, \ + "Debug level", NULL}, + #define DEBUG(level, body) do { \ if (level <= debug_level) { \ debug_fn("[%s] [%s] (%d): ", \ @@ -30,11 +34,24 @@ void debug_fn(const char *format, ...); #define EOK 0 +#define SSSD_MAIN_OPTS SSSD_DEBUG_OPTS + +#define FLAGS_NONE 0x0000 +#define FLAGS_DAEMON 0x0001 +#define FLAGS_INTERACTIVE 0x0002 +#define FLAGS_PID_FILE 0x0004 + +struct main_context { + struct event_context *event_ctx; + struct confdb_ctx *confdb_ctx; +}; + #include "util/dlinklist.h" -/* from become_daemon.c */ -void become_daemon(bool Fork); -int pidfile(const char *path, const char *name); +/* from server.c */ +int server_setup(const char *name, int flags, + struct main_context **main_ctx); +void server_loop(struct main_context *main_ctx); /* from signal.c */ #include <signal.h> |