]> git.ipfire.org Git - pakfire.git/commitdiff
daemon: Remove the authentication framework
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 24 Jun 2025 15:46:32 +0000 (15:46 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 24 Jun 2025 15:46:32 +0000 (15:46 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/daemon.c

index 13b71f32ade3930695eb04623c1f50ac388af267..7620894ad7b7491872f8d67bfd8039c469ac41b7 100644 (file)
@@ -65,9 +65,6 @@ struct pakfire_daemon {
        sd_bus* bus;
        int inhibitfd;
 
-       // Authentication Timer
-       sd_event_source* auth_timer;
-
        // The control connection
        struct pakfire_xfer* control;
 
@@ -882,14 +879,6 @@ static int pakfire_daemon_SIGCHLD(sd_event_source* s, const struct signalfd_sigi
        return 0;
 }
 
-static int pakfire_daemon_auth(sd_event_source* s, uint64_t usec, void* data) {
-       struct pakfire_daemon* daemon = data;
-
-       DEBUG(daemon->ctx, "Authenticating...\n");
-
-       return 0;
-}
-
 static int pakfire_daemon_prepare_for_shutdown(
                sd_bus_message* message, void* data, sd_bus_error* error) {
        struct pakfire_daemon* daemon = data;
@@ -999,21 +988,6 @@ static int pakfire_daemon_setup_loop(struct pakfire_daemon* daemon) {
                return r;
        }
 
-       // Setup the authentication timer
-       r = sd_event_add_time_relative(daemon->loop, &daemon->auth_timer,
-               CLOCK_MONOTONIC, 0, 0, pakfire_daemon_auth, daemon);
-       if (r < 0) {
-               ERROR(daemon->ctx, "Could not register the authentication timer: %s\n", strerror(-r));
-               return r;
-       }
-
-       // Authenticate continuously
-       r = sd_event_source_set_enabled(daemon->auth_timer, SD_EVENT_ON);
-       if (r < 0) {
-               ERROR(daemon->ctx, "Could not activate the auth timer: %s\n", strerror(-r));
-               return r;
-       }
-
        // Setup the reconnection timer
        r = sd_event_add_time_relative(daemon->loop, &daemon->connect_timer,
                CLOCK_MONOTONIC, 0, 0, pakfire_daemon_connect, daemon);
@@ -1079,8 +1053,6 @@ static void pakfire_daemon_free(struct pakfire_daemon* daemon) {
        // Release shutdown inhibition
        pakfire_daemon_release_inhibit_shutdown(daemon);
 
-       if (daemon->auth_timer)
-               sd_event_source_unref(daemon->auth_timer);
        if (daemon->connect_timer)
                sd_event_source_unref(daemon->connect_timer);
        if (daemon->stats_timer)