summaryrefslogtreecommitdiff
path: root/src/options.c
diff options
context:
space:
mode:
authorJeremy White <jwhite@codeweavers.com>2016-10-31 10:15:41 -0500
committerJeremy White <jwhite@codeweavers.com>2016-10-31 13:59:29 -0500
commit638b996881d6065f32212152509b08ac1b49880a (patch)
treea3655fa532215cb91ebbc0394a272b6f3996141b /src/options.c
parent49452f5e1967534bfe373ab711baed3a188e9454 (diff)
Add an option to require auditing.
Diffstat (limited to 'src/options.c')
-rw-r--r--src/options.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/options.c b/src/options.c
index 8a8a99e..647a10d 100644
--- a/src/options.c
+++ b/src/options.c
@@ -41,6 +41,10 @@
#include "options.h"
#include "x11spice.h"
+#if defined(HAVE_LIBAUDIT_H)
+#include <libaudit.h>
+#endif
+
void options_init(options_t *options)
{
memset(options, 0, sizeof(*options));
@@ -375,6 +379,14 @@ void options_from_config(options_t *options)
options->uinput_path = string_option(userkey, systemkey, "spice", "uinput-path");
options->on_connect = string_option(userkey, systemkey, "spice", "on-connect");
options->on_disconnect = string_option(userkey, systemkey, "spice", "on-disconnect");
+ options->audit = bool_option(userkey, systemkey, "spice", "audit");
+ options->audit_message_type = int_option(userkey, systemkey, "spice", "audit-message-type");
+
+#if defined(HAVE_LIBAUDIT_H)
+ /* Pick an arbitrary default in the user range. CodeWeavers was founed in 1996, so 1196 it is... */
+ if (options->audit_message_type == 0)
+ options->audit_message_type = AUDIT_LAST_USER_MSG - 3;
+#endif
options_handle_ssl_file_options(options, userkey, systemkey);