/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to plugin-runner.c

  • Committer: Teddy Hogeborn
  • Date: 2009-09-21 21:39:25 UTC
  • Revision ID: teddy@fukt.bsnet.se-20090921213925-jbpt6tzu99otseng
Use D-Bus properties instead of our own methods.

* mandos (Client._datetime_to_milliseconds): Renamed to
                                             "_timedelta_to_milliseconds".
                                             All callers changed.
  (dbus_service_property): New decorator for D-Bus properties.
  (DBusPropertyException, DBusPropertyAccessException,
  DBusPropertyNotFound): New D-Bus exception classes.
  (DBusObjectWithProperties): New; extends "dbus.service.Object" with
                              support for properties.
  (ClientDBus): Inherit from, and call up to, "DBusObjectWithProperties".
  (ClientDBus.CheckedOK, ClientDBus.GetAllProperties,
  ClientDBus.SetChecker, ClientDBus.SetHost, ClientDBus.SetInterval,
  ClientDBus.SetSecret, ClientDBus.SetTimeout, ClientDBus.Enable,
  ClientDBus.StartChecker, ClientDBus.Disable,
  ClientDBus.StopChecker): Removed, replaced with properties.
  (ClientDBus.IsStillValid): Removed, superfluous.
  (ClientDBus.name_dbus_property,
  ClientDBus.fingerprint_dbus_property, ClientDBus.host_dbus_property,
  ClientDBus.created_dbus_property,
  ClientDBus.last_enabled_dbus_property,
  ClientDBus.enabled_dbus_property,
  ClientDBus.last_checked_ok_dbus_property,
  ClientDBus.timeout_dbus_property, ClientDBus.interval_dbus_property,
  ClientDBus.checker_dbus_property,
  ClientDBus.checker_running_dbus_property,
  ClientDBus.object_path_dbus_property,
  ClientDBus.secret_dbus_property): New D-Bus properties.

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
#include <fcntl.h>              /* fcntl(), F_GETFD, F_SETFD,
55
55
                                   FD_CLOEXEC */
56
56
#include <string.h>             /* strsep, strlen(), asprintf(),
57
 
                                   strsignal(), strcmp(), strncmp() */
 
57
                                   strsignal() */
58
58
#include <errno.h>              /* errno */
59
59
#include <argp.h>               /* struct argp_option, struct
60
60
                                   argp_state, struct argp,
771
771
      for(const char **suf = bad_suffixes; *suf != NULL; suf++){
772
772
        size_t suf_len = strlen(*suf);
773
773
        if((d_name_len >= suf_len)
774
 
           and (strcmp((dirst->d_name) + d_name_len-suf_len, *suf)
 
774
           and (strcmp((dirst->d_name)+d_name_len-suf_len, *suf)
775
775
                == 0)){
776
776
          if(debug){
777
777
            fprintf(stderr, "Ignoring plugin dir entry \"%s\""