/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: 2019-08-31 01:50:02 UTC
  • Revision ID: teddy@recompile.se-20190831015002-fe1go9fb7jf66bcn
Fix bug in Debian package dependencies

* debian/control: Change both of "python (>= 3)" to "python3 (>= 3)".

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/python3 -bI
 
1
#!/usr/bin/python3 -b
2
2
# -*- mode: python; after-save-hook: (lambda () (let ((command (if (fboundp 'file-local-name) (file-local-name (buffer-file-name)) (or (file-remote-p (buffer-file-name) 'localname) (buffer-file-name))))) (if (= (progn (if (get-buffer "*Test*") (kill-buffer "*Test*")) (process-file-shell-command (format "%s --check" (shell-quote-argument command)) nil "*Test*")) 0) (let ((w (get-buffer-window "*Test*"))) (if w (delete-window w))) (progn (with-current-buffer "*Test*" (compilation-mode)) (display-buffer "*Test*" '(display-buffer-in-side-window)))))); coding: utf-8 -*-
3
3
#
4
4
# Mandos server - give out binary blobs to connecting clients.
128
128
if sys.version_info < (3, 2):
129
129
    configparser.Configparser = configparser.SafeConfigParser
130
130
 
131
 
version = "1.8.9"
 
131
version = "1.8.8"
132
132
stored_state_file = "clients.pickle"
133
133
 
134
134
logger = logging.getLogger()
203
203
            output = subprocess.check_output(["gpgconf"])
204
204
            for line in output.splitlines():
205
205
                name, text, path = line.split(b":")
206
 
                if name == b"gpg":
 
206
                if name == "gpg":
207
207
                    self.gpg = path
208
208
                    break
209
209
        except OSError as e:
214
214
                          '--force-mdc',
215
215
                          '--quiet']
216
216
        # Only GPG version 1 has the --no-use-agent option.
217
 
        if self.gpg == b"gpg" or self.gpg.endswith(b"/gpg"):
 
217
        if self.gpg == "gpg" or self.gpg.endswith("/gpg"):
218
218
            self.gnupgargs.append("--no-use-agent")
219
219
 
220
220
    def __enter__(self):
1053
1053
        # Read return code from connection (see call_pipe)
1054
1054
        returncode = connection.recv()
1055
1055
        connection.close()
1056
 
        if self.checker is not None:
1057
 
            self.checker.join()
 
1056
        self.checker.join()
1058
1057
        self.checker_callback_tag = None
1059
1058
        self.checker = None
1060
1059
 
3252
3251
                             if isinstance(s, bytes)
3253
3252
                             else s) for s in
3254
3253
                            value["client_structure"]]
3255
 
                        # .name, .host, and .checker_command
3256
 
                        for k in ("name", "host", "checker_command"):
 
3254
                        # .name & .host
 
3255
                        for k in ("name", "host"):
3257
3256
                            if isinstance(value[k], bytes):
3258
3257
                                value[k] = value[k].decode("utf-8")
3259
3258
                        if "key_id" not in value:
3269
3268
                        for key, value in
3270
3269
                        bytes_old_client_settings.items()}
3271
3270
                    del bytes_old_client_settings
3272
 
                    # .host and .checker_command
 
3271
                    # .host
3273
3272
                    for value in old_client_settings.values():
3274
 
                        for attribute in ("host", "checker_command"):
3275
 
                            if isinstance(value[attribute], bytes):
3276
 
                                value[attribute] = (value[attribute]
3277
 
                                                    .decode("utf-8"))
 
3273
                        if isinstance(value["host"], bytes):
 
3274
                            value["host"] = (value["host"]
 
3275
                                             .decode("utf-8"))
3278
3276
            os.remove(stored_state_path)
3279
3277
        except IOError as e:
3280
3278
            if e.errno == errno.ENOENT: