/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: 2018-02-10 13:23:58 UTC
  • mto: (237.7.594 trunk)
  • mto: This revision was merged to the branch mainline in revision 362.
  • Revision ID: teddy@recompile.se-20180210132358-8pfvo9vshq9l32y5
Remove unnecessary text left from old example init.d file

* init.d-mandos: Remove unnecessary text left from old example init.d
  file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
# "AvahiService" class, and some lines in "main".
12
12
#
13
13
# Everything else is
14
 
# Copyright © 2008-2016 Teddy Hogeborn
15
 
# Copyright © 2008-2016 Björn Påhlsson
16
 
#
17
 
# This program is free software: you can redistribute it and/or modify
18
 
# it under the terms of the GNU General Public License as published by
 
14
# Copyright © 2008-2018 Teddy Hogeborn
 
15
# Copyright © 2008-2018 Björn Påhlsson
 
16
#
 
17
# This file is part of Mandos.
 
18
#
 
19
# Mandos is free software: you can redistribute it and/or modify it
 
20
# under the terms of the GNU General Public License as published by
19
21
# the Free Software Foundation, either version 3 of the License, or
20
22
# (at your option) any later version.
21
23
#
22
 
#     This program is distributed in the hope that it will be useful,
23
 
#     but WITHOUT ANY WARRANTY; without even the implied warranty of
 
24
#     Mandos is distributed in the hope that it will be useful, but
 
25
#     WITHOUT ANY WARRANTY; without even the implied warranty of
24
26
#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25
27
#     GNU General Public License for more details.
26
28
#
27
29
# You should have received a copy of the GNU General Public License
28
 
# along with this program.  If not, see
29
 
# <http://www.gnu.org/licenses/>.
 
30
# along with Mandos.  If not, see <http://www.gnu.org/licenses/>.
30
31
#
31
32
# Contact the authors at <mandos@recompile.se>.
32
33
#
114
115
if sys.version_info.major == 2:
115
116
    str = unicode
116
117
 
117
 
version = "1.7.11"
 
118
version = "1.7.16"
118
119
stored_state_file = "clients.pickle"
119
120
 
120
121
logger = logging.getLogger()
495
496
class AvahiServiceToSyslog(AvahiService):
496
497
    def rename(self, *args, **kwargs):
497
498
        """Add the new name to the syslog messages"""
498
 
        ret = AvahiService.rename(self, *args, **kwargs)
 
499
        ret = super(AvahiServiceToSyslog, self).rename(*args, **kwargs)
499
500
        syslogger.setFormatter(logging.Formatter(
500
501
            'Mandos ({}) [%(process)d]: %(levelname)s: %(message)s'
501
502
            .format(self.name)))
515
516
    _need_version = b"3.3.0"
516
517
 
517
518
    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))
 
519
        # Need to use "self" here, since this method is called before
 
520
        # the assignment to the "gnutls" global variable happens.
 
521
        if self.check_version(self._need_version) is None:
 
522
            raise self.Error("Needs GnuTLS {} or later"
 
523
                             .format(self._need_version))
524
524
 
525
525
    # Unless otherwise indicated, the constants and types below are
526
526
    # all from the gnutls/gnutls.h C header file.
1461
1461
                         exc_info=error)
1462
1462
        return xmlstring
1463
1463
 
 
1464
 
1464
1465
try:
1465
1466
    dbus.OBJECT_MANAGER_IFACE
1466
1467
except AttributeError:
2577
2578
        command = request[0]
2578
2579
 
2579
2580
        if command == 'init':
2580
 
            fpr = request[1]
 
2581
            fpr = request[1].decode("ascii")
2581
2582
            address = request[2]
2582
2583
 
2583
2584
            for c in self.clients.values():
2883
2884
    # Convert the SafeConfigParser object to a dict
2884
2885
    server_settings = server_config.defaults()
2885
2886
    # Use the appropriate methods on the non-string config options
2886
 
    for option in ("debug", "use_dbus", "use_ipv6", "foreground"):
 
2887
    for option in ("debug", "use_dbus", "use_ipv6", "restore",
 
2888
                   "foreground", "zeroconf"):
2887
2889
        server_settings[option] = server_config.getboolean("DEFAULT",
2888
2890
                                                           option)
2889
2891
    if server_settings["port"]: