/mandos/release

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

« back to all changes in this revision

Viewing changes to DBUS-API

  • Committer: Teddy Hogeborn
  • Date: 2015-08-10 07:34:37 UTC
  • mto: (237.7.594 trunk)
  • mto: This revision was merged to the branch mainline in revision 325.
  • Revision ID: teddy@recompile.se-20150810073437-3m8jgt13nqric6vf
Revert change to D-Bus API.

The D-Bus API signal CheckerCompleted is documented to provide a
wait(2) status value.  Since the server switched to using subprocess
to run checkers, it no longer has access to a wait(2) status value.  A
previous change to work around this made the D-Bus API incompatible.
Revert this change by constructing a fake wait(2) status value; this
keeps the D-Bus API stable.

* DBUS-API (CheckerCompleted): Revert incompatible change.
* mandos (ClientDBus.checker_callback): Construct fake wait(2) status.
* mandos-monitor (MandosClientWidget.checker_completed): Revert to
                                                         using
                                                         original API
                                                         with wait(2)
                                                         condition
                                                         value.

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
    Assert that this client has been checked and found to be alive.
56
56
    This will restart the timeout before disabling this client.  See
57
57
    also the "LastCheckedOK" property.
58
 
    
59
 
*** Disable() → nothing
60
 
    Disable this client.  See also the "Enabled" property.
61
 
    
62
 
*** Enable() → nothing
63
 
    Enable this client.  See also the "Enabled" property.
64
 
    
65
 
*** StartChecker() → nothing
66
 
    Start a new checker for this client, if none is currently
67
 
    running.  See also the "CheckerRunning" property.
68
 
    
69
 
*** StopChecker() → nothing
70
 
    Abort a running checker process for this client, if any.  See also
71
 
    the "CheckerRunning" property.
72
58
 
73
59
** Properties
74
60
   
96
82
   | LastCheckerStatus (i)   | n    | Read       | N/A                 |
97
83
   | LastEnabled (j)         | s    | Read       | N/A                 |
98
84
   | Name                    | s    | Read       | (Section name)      |
99
 
   | ObjectPath              | o    | Read       | N/A                 |
100
85
   | Secret (k)              | ay   | Write      | secret (or secfile) |
101
86
   | Timeout (a)             | t    | Read/Write | timeout             |
102
87
   
104
89
   
105
90
   b) An approval is currently pending.
106
91
   
107
 
   c) Setting this property is equivalent to calling StartChecker() or
108
 
      StopChecker().
 
92
   c) Changing this property can either start a new checker or abort a
 
93
      running one.
109
94
   
110
95
   d) The creation time of this client object, as an RFC 3339 string.
111
96
   
112
 
   e) Setting this property is equivalent to calling Enable() or
113
 
      Disable().
 
97
   e) Changing this property enables or disables a client.
114
98
   
115
99
   f) The date and time this client will be disabled, as an RFC 3339
116
100
      string, or an empty string if this is not scheduled.
134
118
   k) A raw byte array, not hexadecimal digits.
135
119
 
136
120
** Signals
137
 
*** CheckerCompleted(n: Exitcode, x: Signal, s: Command)
 
121
*** CheckerCompleted(n: Exitcode, x: Waitstatus, s: Command)
138
122
    A checker (Command) has completed.  Exitcode is either the exit
139
 
    code or -1 for abnormal exit, in which case, the signal number
140
 
    is available.
 
123
    code or -1 for abnormal exit.  In any case, the full Waitstatus
 
124
    (as from wait(2)) is also available.
141
125
    
142
126
*** CheckerStarted(s: Command)
143
127
    A checker command (Command) has just been started.