/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 mandos-ctl

  • Committer: Teddy Hogeborn
  • Date: 2009-09-23 08:52:09 UTC
  • Revision ID: teddy@fukt.bsnet.se-20090923085209-n6nx3i86rvokwfq6
* plugin-runner.c (main): Use the O_CLOEXEC flag, if available, when
                          opening the plugin directory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
    'last_enabled': u'Last Enabled',
25
25
    'checker': u'Checker',
26
26
    }
27
 
defaultkeywords = ('name', 'enabled', 'timeout', 'last_checked_ok')
 
27
defaultkeywords = ('name', 'enabled', 'timeout', 'last_checked_ok',
 
28
                   'checker')
28
29
domain = 'se.bsnet.fukt'
29
30
busname = domain + '.Mandos'
30
31
server_path = '/'
31
32
server_interface = domain + '.Mandos'
32
33
client_interface = domain + '.Mandos.Client'
33
 
version = "1.0.14"
 
34
version = "1.0.12"
34
35
bus = dbus.SystemBus()
35
36
mandos_dbus_objc = bus.get_object(busname, server_path)
36
37
mandos_serv = dbus.Interface(mandos_dbus_objc,
127
128
                  help="Start checker for client")
128
129
parser.add_option("--stop-checker", action="store_true",
129
130
                  help="Stop checker for client")
130
 
parser.add_option("-V", "--is-enabled", action="store_true",
131
 
                  help="Check if client is enabled")
 
131
parser.add_option("-V", "--is-valid", action="store_true",
 
132
                  help="Check if client is still valid")
132
133
parser.add_option("-r", "--remove", action="store_true",
133
134
                  help="Remove client")
134
135
parser.add_option("-c", "--checker", type="string",
177
178
        client.StartChecker(dbus_interface=client_interface)
178
179
    if options.stop_checker:
179
180
        client.StopChecker(dbus_interface=client_interface)
180
 
    if options.is_enabled:
 
181
    if options.is_valid:
181
182
        sys.exit(0 if client.Get(client_interface,
182
183
                                 u"enabled",
183
184
                                 dbus_interface=dbus.PROPERTIES_IFACE)