chiark / gitweb /
resolved: add daemon to manage resolv.conf
[elogind.git] / src / timesync / timesyncd.c
index 21843363d2ac03259ad7b48cb980f45c25b2eb52..6e63e34d876a30fa0d7ae39ecb12e3c0c7073ca6 100644 (file)
@@ -978,8 +978,8 @@ static int manager_new(Manager **ret) {
 
         sd_event_set_watchdog(m->event, true);
 
-        sd_event_add_signal(m->event, &m->sigterm, SIGTERM, NULL,  NULL);
-        sd_event_add_signal(m->event, &m->sigint, SIGINT, NULL, NULL);
+        sd_event_add_signal(m->event, NULL, SIGTERM, NULL,  NULL);
+        sd_event_add_signal(m->event, NULL, SIGINT, NULL, NULL);
 
         r = sd_resolve_default(&m->resolve);
         if (r < 0)
@@ -1006,9 +1006,6 @@ static void manager_free(Manager *m) {
         manager_disconnect(m);
         manager_flush_names(m);
 
-        sd_event_source_unref(m->sigint);
-        sd_event_source_unref(m->sigterm);
-
         sd_event_source_unref(m->event_retry);
 
         sd_event_source_unref(m->network_event_source);
@@ -1144,7 +1141,7 @@ static int manager_network_monitor_listen(Manager *m) {
         return 0;
 }
 
-static int drop_priviliges(void) {
+static int drop_privileges(void) {
         static const cap_value_t bits[] = {
                 CAP_SYS_TIME,
         };
@@ -1155,7 +1152,7 @@ static int drop_priviliges(void) {
         gid_t gid;
         int r;
 
-        /* Unfortunately we cannot leave privilige dropping to PID 1
+        /* Unfortunately we cannot leave privilege dropping to PID 1
          * here, since we want to run as user but want to keep te
          * CAP_SYS_TIME capability. Since file capabilities have been
          * introduced this cannot be done across exec() anymore,
@@ -1234,7 +1231,7 @@ int main(int argc, char *argv[]) {
 
         umask(0022);
 
-        r = drop_priviliges();
+        r = drop_privileges();
         if (r < 0)
                 goto out;