/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: 2019-07-30 18:17:10 UTC
  • mfrom: (237.7.681 trunk)
  • Revision ID: teddy@recompile.se-20190730181710-0ph4iwqdijdy41uv
MergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
 
81
81
import dbus
82
82
import dbus.service
83
 
import gi
84
83
from gi.repository import GLib
85
84
from dbus.mainloop.glib import DBusGMainLoop
86
85
import ctypes
116
115
if sys.version_info.major == 2:
117
116
    str = unicode
118
117
 
119
 
if sys.version_info < (3, 2):
120
 
    configparser.Configparser = configparser.SafeConfigParser
121
 
 
122
 
version = "1.8.7"
 
118
version = "1.8.4"
123
119
stored_state_file = "clients.pickle"
124
120
 
125
121
logger = logging.getLogger()
3002
2998
    del priority
3003
2999
 
3004
3000
    # Parse config file for server-global settings
3005
 
    server_config = configparser.ConfigParser(server_defaults)
 
3001
    server_config = configparser.SafeConfigParser(server_defaults)
3006
3002
    del server_defaults
3007
3003
    server_config.read(os.path.join(options.configdir, "mandos.conf"))
3008
 
    # Convert the ConfigParser object to a dict
 
3004
    # Convert the SafeConfigParser object to a dict
3009
3005
    server_settings = server_config.defaults()
3010
3006
    # Use the appropriate methods on the non-string config options
3011
3007
    for option in ("debug", "use_dbus", "use_ipv6", "restore",
3083
3079
                                  server_settings["servicename"])))
3084
3080
 
3085
3081
    # Parse config file with clients
3086
 
    client_config = configparser.ConfigParser(Client.client_defaults)
 
3082
    client_config = configparser.SafeConfigParser(Client
 
3083
                                                  .client_defaults)
3087
3084
    client_config.read(os.path.join(server_settings["configdir"],
3088
3085
                                    "clients.conf"))
3089
3086
 
3160
3157
        # Close all input and output, do double fork, etc.
3161
3158
        daemon()
3162
3159
 
3163
 
    if gi.version_info < (3, 10, 2):
3164
 
        # multiprocessing will use threads, so before we use GLib we
3165
 
        # need to inform GLib that threads will be used.
3166
 
        GLib.threads_init()
 
3160
    # multiprocessing will use threads, so before we use GLib we need
 
3161
    # to inform GLib that threads will be used.
 
3162
    GLib.threads_init()
3167
3163
 
3168
3164
    global main_loop
3169
3165
    # From the Avahi example code