git.fiddlerwoaroof.com
Browse code

CJPM-5222: adds actual logging

Greg Wiley authored on 03/04/2017 22:42:04
Showing 1 changed files
... ...
@@ -1,5 +1,18 @@
1 1
 #include "logging.h"
2
+#include <syslog.h>
3
+
4
+/*
5
+void openlog(const char *ident, int option, int facility);
6
+void syslog(int priority, const char *format, ...);
7
+void closelog(void);
8
+void vsyslog(int priority, const char *format, va_list ap);
9
+*/
10
+
11
+static const char program_name[] = "pam_dual_control";
2 12
 
3 13
 void log_dual_control() {
4
-    // do nothing
14
+    openlog(program_name, 0, LOG_AUTH);
15
+    syslog(LOG_INFO, "Logged: ");
16
+    closelog();
5 17
 }
18
+