/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

* Makefile: Merge branch adding warning messages to "run-*" targets.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
server_interface = domain + '.Mandos'
32
32
client_interface = domain + '.Mandos.Client'
33
33
version = "1.0.14"
34
 
try:
35
 
    bus = dbus.SystemBus()
36
 
    mandos_dbus_objc = bus.get_object(busname, server_path)
37
 
except dbus.exceptions.DBusException:
38
 
    sys.exit(1)
39
 
    
 
34
bus = dbus.SystemBus()
 
35
mandos_dbus_objc = bus.get_object(busname, server_path)
40
36
mandos_serv = dbus.Interface(mandos_dbus_objc,
41
37
                             dbus_interface = server_interface)
42
38
mandos_clients = mandos_serv.GetAllClientsWithProperties()
145
141
                  help="Set host for client")
146
142
parser.add_option("-s", "--secret", type="string",
147
143
                  help="Set password blob (file) for client")
148
 
parser.add_option("-A", "--approve", action="store_true",
149
 
                  help="Approve any current client request")
150
 
parser.add_option("-D", "--deny", action="store_true",
151
 
                  help="Deny any current client request")
152
144
options, client_names = parser.parse_args()
153
145
 
154
146
# Compile list of clients to process
210
202
        client.Set(client_interface, u"secret",
211
203
                   dbus.ByteArray(open(options.secret, u'rb').read()),
212
204
                   dbus_interface=dbus.PROPERTIES_IFACE)
213
 
    if options.approve:
214
 
        client.Approve(dbus.Boolean(True), dbus_interface=client_interface)
215
 
    if options.deny:
216
 
        client.Approve(dbus.Boolean(False), dbus_interface=client_interface)