diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-03-08 16:42:03 +0100 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-03-08 16:51:15 +0100 |
commit | 3e2d86693f6e8920c97fe296491e7741e31f922c (patch) | |
tree | 1c755422fd27c7f192243e8eb7f7811193efa1f6 /bin/privsep-server.c | |
parent | e0cabd6295204fe8a6b54edfc9141302943fdbfb (diff) | |
download | privsep-3e2d86693f6e8920c97fe296491e7741e31f922c.tar.bz2 privsep-3e2d86693f6e8920c97fe296491e7741e31f922c.tar.xz |
This allows you load various modules into a server lua state and give
a performance boost when calling the privileged functions
Diffstat (limited to 'bin/privsep-server.c')
-rw-r--r-- | bin/privsep-server.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/bin/privsep-server.c b/bin/privsep-server.c deleted file mode 100644 index 76d3f4c..0000000 --- a/bin/privsep-server.c +++ /dev/null @@ -1,35 +0,0 @@ - -#include <sys/stat.h> -#include <stdio.h> -#include <ev.h> - -#ifndef DEFAULT_SOCKET_PATH -#define DEFAULT_SOCKET_PATH "/var/run/privsep/root.sock" -#endif - -static void sigint_cb(struct ev_loop *loop, ev_signal *w, int revents) -{ - ev_break(loop, EVBREAK_ALL); -} - -int main(int argc, char *argv[]) -{ - int c; - const char *socket_path = DEFAULT_SOCKET_PATH; - static struct ev_loop *loop; - static struct ev_signal signal_watcher; - - loop = ev_default_loop(0); - - if (conn_init(loop, socket_path) < 0) - return 1; - - ev_signal_init(&signal_watcher, sigint_cb, SIGINT); - ev_signal_start(loop, &signal_watcher); - - ev_run(loop, 0); - printf("%s\n", "Shutting down."); - ev_loop_destroy(loop); - return 0; -} - |