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

  • Committer: Teddy Hogeborn
  • Date: 2016-10-09 22:35:41 UTC
  • Revision ID: teddy@recompile.se-20161009223541-2g2xrvfii5m5ibjw
Stop the GnuPG agent after Debian package installation

* debian/mandos-client.postinst (create_key): Stop GPG agent after
                                              running mandos-keygen.

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-2017 Teddy Hogeborn
15
 
# Copyright © 2008-2017 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
 
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
21
19
# the Free Software Foundation, either version 3 of the License, or
22
20
# (at your option) any later version.
23
21
#
24
 
#     Mandos is distributed in the hope that it will be useful, but
25
 
#     WITHOUT ANY WARRANTY; without even the implied warranty of
 
22
#     This program is distributed in the hope that it will be useful,
 
23
#     but WITHOUT ANY WARRANTY; without even the implied warranty of
26
24
#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27
25
#     GNU General Public License for more details.
28
26
#
29
27
# You should have received a copy of the GNU General Public License
30
 
# along with Mandos.  If not, see <http://www.gnu.org/licenses/>.
 
28
# along with this program.  If not, see
 
29
# <http://www.gnu.org/licenses/>.
31
30
#
32
31
# Contact the authors at <mandos@recompile.se>.
33
32
#
115
114
if sys.version_info.major == 2:
116
115
    str = unicode
117
116
 
118
 
version = "1.7.15"
 
117
version = "1.7.13"
119
118
stored_state_file = "clients.pickle"
120
119
 
121
120
logger = logging.getLogger()
516
515
    _need_version = b"3.3.0"
517
516
 
518
517
    def __init__(self):
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))
 
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))
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
 
 
1465
1464
try:
1466
1465
    dbus.OBJECT_MANAGER_IFACE
1467
1466
except AttributeError:
2884
2883
    # Convert the SafeConfigParser object to a dict
2885
2884
    server_settings = server_config.defaults()
2886
2885
    # Use the appropriate methods on the non-string config options
2887
 
    for option in ("debug", "use_dbus", "use_ipv6", "restore",
2888
 
                   "foreground", "zeroconf"):
 
2886
    for option in ("debug", "use_dbus", "use_ipv6", "foreground"):
2889
2887
        server_settings[option] = server_config.getboolean("DEFAULT",
2890
2888
                                                           option)
2891
2889
    if server_settings["port"]: