From: kremlin Date: Thu, 26 Jun 2014 01:44:39 +0000 (-0500) Subject: merge license, hostname buffer changes from master branch X-Git-Tag: gsoc-final~123 X-Git-Url: https://uglyman.kremlin.cc/gitweb/gitweb.cgi?p=systembsd.git;a=commitdiff_plain;h=e3382563a24b6a3c162763942edefee462b2d752;hp=1cd5e6fecdb03d2a3611f72fdc6021cbdf998afc merge license, hostname buffer changes from master branch --- diff --git a/TODO b/TODO index 1f986f4..8463eba 100644 --- a/TODO +++ b/TODO @@ -1 +1,2 @@ * get autoconf stuff figured out + * handle SIGINTs so file descriptors are dropped properly, otherwise we get bus errors next run diff --git a/src/config.c b/src/config.c index ac9ecf4..3c20820 100644 --- a/src/config.c +++ b/src/config.c @@ -19,6 +19,20 @@ #include static GKeyFile *config; +static int config_descr; + +static gchar *data_dir; + +static int hostnamed_ispect_xml_descr, hostnamed_dbus_xml_descr; +static int localed_ispect_xml_descr, localed_dbus_xml_descr; +static int timedated_ispect_xml_descr, timedated_dbus_xml_descr; +static int logind_ispect_xml_descr, logind_dbus_xml_descr; + +/*TODO depending on builtin xml flag, these should be matched to checksums */ +static gchar **hostnamed_ispect_xml, hostnamed_dbus_xml; +static gchar **localed_ispect_xml, localed_dbus_xml; +static gchar **timedated_ispect_xml, timedated_dbus_xml; +static gchar **logind_ispect_xml, logind_dbus_xml; static const gchar *CONFIG_KEYS[] = { "PrettyHostname", @@ -109,3 +123,4 @@ gboolean config_init() { return FALSE; } } +} diff --git a/src/main.c b/src/main.c index 0c343e4..fc50a24 100644 --- a/src/main.c +++ b/src/main.c @@ -28,6 +28,25 @@ //#include "main/h" gboolean systemd_utils_init() { +<<<<<<< HEAD + #ifdef INSTALL + if(!config_init()) { + gchar *tmp; + tmp = "/etc/"; //what the hell is /etc/xdg anyway + + g_printf("FAILED to install configs in %s!\n", tmp); + return FALSE; + } + if(!init_xml()) { + gchar **tmp; + tmp = g_get_system_data_dirs(); + + g_printf("FAILED to install xml configs in %s!\n", tmp[0]); + return FALSE; + } + #endif + return TRUE; +======= #ifdef INSTALL if(!config_init()) { g_printf("%s\n", "FAILED to install configs in /etc/!"); @@ -35,6 +54,7 @@ gboolean systemd_utils_init() { } #endif return TRUE; +>>>>>>> master } int main() {