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

  • Committer: Teddy Hogeborn
  • Date: 2017-02-22 21:45:35 UTC
  • mto: (237.7.594 trunk)
  • mto: This revision was merged to the branch mainline in revision 358.
  • Revision ID: teddy@recompile.se-20170222214535-milf6w0b1krwpaex
Server bug fix: Use the mandos.conf "zeroconf" and "restore" options

Allow the "zeroconf" and "restore" options to actually work from the
mandos.conf file, in addition to command line options.

Closes: 855589
Reported-by: Pablo Abelenda <pabelenda@igalia.com>
Suggested-by: Pablo Abelenda <pabelenda@igalia.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
114
114
if sys.version_info.major == 2:
115
115
    str = unicode
116
116
 
117
 
version = "1.7.12"
 
117
version = "1.7.14"
118
118
stored_state_file = "clients.pickle"
119
119
 
120
120
logger = logging.getLogger()
515
515
    _need_version = b"3.3.0"
516
516
 
517
517
    def __init__(self):
518
 
        # Need to use class name "GnuTLS" here, since this method is
519
 
        # called before the assignment to the "gnutls" global variable
520
 
        # happens.
521
 
        if GnuTLS.check_version(self._need_version) is None:
522
 
            raise GnuTLS.Error("Needs GnuTLS {} or later"
523
 
                               .format(self._need_version))
 
518
        # Need to use "self" here, since this method is called before
 
519
        # the assignment to the "gnutls" global variable happens.
 
520
        if self.check_version(self._need_version) is None:
 
521
            raise self.Error("Needs GnuTLS {} or later"
 
522
                             .format(self._need_version))
524
523
 
525
524
    # Unless otherwise indicated, the constants and types below are
526
525
    # all from the gnutls/gnutls.h C header file.
1461
1460
                         exc_info=error)
1462
1461
        return xmlstring
1463
1462
 
 
1463
 
1464
1464
try:
1465
1465
    dbus.OBJECT_MANAGER_IFACE
1466
1466
except AttributeError:
2883
2883
    # Convert the SafeConfigParser object to a dict
2884
2884
    server_settings = server_config.defaults()
2885
2885
    # Use the appropriate methods on the non-string config options
2886
 
    for option in ("debug", "use_dbus", "use_ipv6", "foreground"):
 
2886
    for option in ("debug", "use_dbus", "use_ipv6", "restore",
 
2887
                   "foreground", "zeroconf"):
2887
2888
        server_settings[option] = server_config.getboolean("DEFAULT",
2888
2889
                                                           option)
2889
2890
    if server_settings["port"]: