/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 TODO

  • Committer: Teddy Hogeborn
  • Date: 2015-05-23 20:18:34 UTC
  • mto: This revision was merged to the branch mainline in revision 756.
  • Revision ID: teddy@recompile.se-20150523201834-e89ex4ito93yni8x
mandos: Use multiprocessing module to run checkers.

For a long time, the Mandos server has occasionally logged the message
"ERROR: Child process vanished".  This was never a fatal error, but it
has been annoying and slightly worrying, since a definite cause was
not found.  One potential cause could be the "multiprocessing" and
"subprocess" modules conflicting w.r.t. SIGCHLD.  To avoid this,
change the running of checkers from using subprocess.Popen
asynchronously to instead first create a multiprocessing.Process()
(which is asynchronous) calling a function, and have that function
then call subprocess.call() (which is synchronous).  In this way, the
only thing using any asynchronous subprocesses is the multiprocessing
module.

This makes it necessary to change one small thing in the D-Bus API,
since the subprocesses.call() function does not expose the raw wait(2)
status value.

DBUS-API (CheckerCompleted): Change the second value provided by this
                             D-Bus signal from the raw wait(2) status
                             to the actual terminating signal number.
mandos (subprocess_call_pipe): New function to be called by
                               multiprocessing.Process (starting a
                               separate process).
(Client.last_checker signal): New attribute for signal which
                              terminated last checker.  Like
                              last_checker_status, only not accessible
                              via D-Bus.
(Client.checker_callback): Take new "connection" argument and use it
                           to get returncode; set last_checker_signal.
                           Return False so gobject does not call this
                           callback again.
(Client.start_checker): Start checker using a multiprocessing.Process
                        instead of a subprocess.Popen.
(ClientDBus.checker_callback): Take new "connection" argument.        Call
                               Client.checker_callback early to have
                               it set last_checker_status and
                               last_checker_signal; use those.  Change
                               second value provided to D-Bus signal
                               CheckerCompleted to use
                               last_checker_signal if checker was
                               terminated by signal.
mandos-monitor: Update to reflect DBus API change.
(MandosClientWidget.checker_completed): Take "signal" instead of
                                        "condition" argument.  Use it
                                        accordingly.  Remove dead code
                                        (os.WCOREDUMP case).

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
* mandos-applet
21
21
 
22
22
* mandos-client
 
23
** TODO [#A] --dh-params=FILE
23
24
** TODO [#B] Use capabilities instead of seteuid().
 
25
   https://forums.grsecurity.net/viewtopic.php?f=7&t=2522
24
26
** TODO [#B] Use getaddrinfo(hints=AI_NUMERICHOST) instead of inet_pton()
25
27
** TODO [#C] Make start_mandos_communication() take "struct server".
 
28
** TODO [#C] --interfaces=regex,eth*,noregex (bridge-utils-interfaces(5))
26
29
 
27
30
* splashy
28
31
** TODO [#B] use scandir(3) instead of readdir(3)
32
35
** TODO [#B] use scandir(3) instead of readdir(3)
33
36
 
34
37
* askpass-fifo
35
 
** TODO [#B] Drop privileges after opening FIFO.
36
38
 
37
39
* password-prompt
38
40
** TODO [#B] lock stdin (with flock()?)
48
50
** kernel command line option for debug info
49
51
 
50
52
* mandos (server)
 
53
** TODO [#B] Work around Avahi issue
 
54
   Avahi does not announce link-local addresses if any global
 
55
   addresses exist: http://lists.freedesktop.org/archives/avahi/2010-March/001863.html
 
56
** TODO [#B] --notify-command
 
57
   This would allow the mandos.service to use
 
58
   --notify-command="systemd-notify --pid READY=1"
51
59
** TODO [#B] Log level                                                    :BUGS:
52
60
*** TODO /etc/mandos/clients.d/*.conf
53
61
    Watch this directory and add/remove/update clients?
69
77
** TODO Use python-tlslite?
70
78
** TODO D-Bus AddClient() method on server object
71
79
** TODO Use org.freedesktop.DBus.Method.NoReply annotation on async methods. :2:
72
 
** TODO Emit [[http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties][org.freedesktop.DBus.Properties.PropertiesChanged]] signal         :2:
73
 
   TODO Deprecate se.recompile.Mandos.Client.PropertyChanged - annotate!
74
 
   TODO Can use "invalidates" annotation to also emit on changed secret.
75
80
** TODO Support [[http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager][org.freedesktop.DBus.ObjectManager]] interface on server object :2:
76
81
   Deprecate methods GetAllClients(), GetAllClientsWithProperties()
77
82
   and signals ClientAdded and ClientRemoved.
80
85
** TODO Secret Service API?
81
86
   http://standards.freedesktop.org/secret-service/
82
87
** TODO Remove D-Bus interfaces with old domain name                      :2:
83
 
** TODO Remove old string_to_delta format                                 :2:
 
88
** TODO Remove old string_to_delta format                                    :2:
84
89
** TODO http://0pointer.de/blog/projects/stateless.html
85
90
*** tmpfiles snippet to create /var/lib/mandos with right user+perms
86
91
*** File in /usr/lib/sysusers.d to create user+group "_mandos"
87
92
** TODO Error handling on error parsing config files
88
93
** TODO init.d script error handling
 
94
** TODO D-Bus server properties; address, port, interface, etc.              :2:
 
95
** TODO [#C] In Python 3.3, use shlex.quote() instead of re.escape()
89
96
 
90
97
* mandos.xml
91
98
** Add mandos contact info in manual pages
93
100
* mandos-ctl
94
101
*** Handle "no D-Bus server" and/or "no Mandos server found" better
95
102
*** [#B] --dump option
96
 
** TODO Remove old string_to_delta format                                 :2:
 
103
** TODO Remove old string_to_delta format                                    :2:
97
104
 
98
105
* TODO mandos-dispatch
99
106
  Listens for specified D-Bus signals and spawns shell commands with