summaryrefslogtreecommitdiffstats
path: root/qarshd.c
diff options
context:
space:
mode:
Diffstat (limited to 'qarshd.c')
-rw-r--r--qarshd.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/qarshd.c b/qarshd.c
index daead85..ef0fc15 100644
--- a/qarshd.c
+++ b/qarshd.c
@@ -36,6 +36,7 @@
#include <netdb.h>
#include <pwd.h>
#include <grp.h>
+#include <stdarg.h>
#include "sockutil.h"
@@ -64,6 +65,19 @@ off_t received = 0;
char *saved_path = NULL;
struct stat saved_stat;
+void
+lprintf(int priority, const char *format, ...)
+{
+ char buf[4096];
+ va_list ap;
+
+ va_start(ap, format);
+ vsnprintf(buf, 4096, format, ap);
+ va_end(ap);
+
+ syslog(priority, "%s", buf);
+}
+
int
setup_user(char *user, char *group)
{