/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: 2019-03-30 07:03:04 UTC
  • Revision ID: teddy@recompile.se-20190330070304-dqgch62lsaaygg46
mandos-ctl: Refactor D-Bus operations

* mandos-ctl (dbus): Rename imported module to "dbus_python".
  (main): Only create a bus object and do everything via that object.
  (get_mandos_dbus_object): Remove and move code into dbus or
                            dbus_python_adapter namespaces.
  (if_dbus_exception_log_with_exception_and_exit): - '' -
  (SilenceLogger): - '' -
  (dbus): New; move everything dbus-specific into this module-like
          namespace.
  (dbus_python_adapter): New; move everything specific to the
                         dbus-python D-Bus module into this
                         module-like namespace.
  (command.Base.run): Take only a bus argument; use only that.  Pass
                      "client" argument as a D-Bus object path string,
                      not a dbus-python proxy object.  All derivatives
                      adjusted.
  (command.IsEnabled.is_enabled): Remove.
  (command.Approve, command.Deny, command.Remove,
  command.PropertySetter): Do no logging of D-Bus commands, and use
  only bus, not client, to do D-Bus calls.
  (command.DumpJSON.dbus_boolean_to_bool): Remove; move filtering to
                                           dbus_python_adapter.
  (command.Enable, command.Disable, command.StopChecker,
  command.ApproveByDefault): Use normal Python booleans instead of
  dbus-python's special Boolean types.
  (Unique): New; move here out from inside TestPropertySetterCmd.
  (Test_get_mandos_dbus_object): Remove.
  (Test_get_managed_objects): - '' -
  (Test_dbus_exceptions): New.
  (Test_dbus_MandosBus): - '' -
  (Test_dbus_python_adapter_SystemBus): - '' -
  (Test_dbus_python_adapter_CachingBus): - '' -
  (Test_commands_from_options): Don't create mock client proxy
  objects, define dict of client properties and use a mock dbus to
  verify that the correct D-Bus calls are made.  Also remove any types
  specific to dbus-python.
  (TestEnableCmd, TestDisableCmd, TestStartCheckerCmd,
  TestStopCheckerCmd, TestApproveByDefaultCmd, TestDenyByDefaultCmd):
  Use normal Python booleans instead of dbus-python's special Boolean
  types.
  (TestPropertySetterValueCmd.runTest): Remove; unnecessary.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
** TODO [#B] Use getaddrinfo(hints=AI_NUMERICHOST) instead of inet_pton()
14
14
** TODO [#C] Make start_mandos_communication() take "struct server".
15
15
** TODO [#C] --interfaces=regex,eth*,noregex (bridge-utils-interfaces(5))
 
16
** TODO [#A] Detect partial writes to stdout and exit with EX_TEMPFAIL
 
17
** TODO [#B] Use reallocarray() with GNU LibC 2.29 or later.
16
18
 
17
19
* splashy
18
20
** TODO [#B] use scandir(3) instead of readdir(3)
 
21
** TODO [#A] Detect partial writes to stdout and exit with EX_TEMPFAIL
19
22
 
20
23
* usplash (Deprecated)
21
24
** TODO [#B] Make it work again
22
25
** TODO [#B] use scandir(3) instead of readdir(3)
 
26
** TODO [#A] Detect partial writes to stdout and exit with EX_TEMPFAIL
23
27
 
24
28
* askpass-fifo
 
29
** TODO [#A] Detect partial writes to stdout and exit with EX_TEMPFAIL
25
30
 
26
31
* password-prompt
27
32
** TODO [#B] lock stdin (with flock()?)
 
33
** TODO [#A] Detect partial writes to stdout and exit with EX_TEMPFAIL
28
34
 
29
35
* plymouth
 
36
** TODO [#A] Detect partial writes to stdout and exit with EX_TEMPFAIL
 
37
** TODO [#B] Use reallocarray() with GNU LibC 2.29 or later.
30
38
 
31
39
* TODO [#B] passdev
32
40
 
35
43
*** Hook up stderr of plugins, buffer them, and prepend "Mandos Plugin [plugin name]"
36
44
** TODO [#C] use same file name rules as run-parts(8)
37
45
** kernel command line option for debug info
 
46
** TODO [#A] Restart plugins which exit with EX_TEMPFAIL
38
47
 
39
48
* mandos (server)
40
 
** TODO Fix bug: it does not exit on SIGTERM until poked via D-Bus
41
 
** TODO Convert to Python 3 by using own Avahi module, same as GnuTLS
42
49
** TODO [#B] --notify-command
43
50
   This would allow the mandos.service to use
44
 
   --notify-command="systemd-notify --pid READY=1"
 
51
   --notify-command="systemd-notify --pid --ready"
 
52
** TODO [#B] python-systemd
 
53
*** import systemd.daemon; systemd.daemon.notify()
45
54
** TODO [#B] Log level                                                    :BUGS:
46
55
*** TODO /etc/mandos/clients.d/*.conf
47
56
    Watch this directory and add/remove/update clients?
65
74
** TODO Save state periodically to recover better from hard shutdowns
66
75
** TODO CheckerCompleted method, deprecate CheckedOK
67
76
** TODO Secret Service API?
68
 
   http://standards.freedesktop.org/secret-service/
 
77
   https://standards.freedesktop.org/secret-service/
69
78
** TODO Remove D-Bus interfaces with old domain name                      :2:
70
79
** TODO Remove old string_to_delta format                                 :2:
71
80
** TODO http://0pointer.de/blog/projects/stateless.html
72
 
*** tmpfiles snippet to create /var/lib/mandos with right user+perms
73
81
*** File in /usr/lib/sysusers.d to create user+group "_mandos"
74
82
** TODO Error handling on error parsing config files
75
83
** TODO init.d script error handling
76
84
** TODO D-Bus server properties; address, port, interface, etc.           :2:
77
 
** TODO [#C] In Python 3.3, use shlex.quote() instead of re.escape()
 
85
** Python 3                                                               :2:
 
86
*** TODO [#C] In Python 3.3, use shlex.quote() instead of re.escape()
78
87
 
79
88
* mandos-ctl
80
 
*** Handle "no D-Bus server" and/or "no Mandos server found" better
81
 
*** [#B] --dump option
82
89
** TODO Remove old string_to_delta format                                 :2:
83
90
 
84
91
* TODO mandos-dispatch