/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: 2025-06-14 15:37:45 UTC
  • Revision ID: teddy@recompile.se-20250614153745-1labvcqq11fuijy4
debian/control: Require cryptsetup support in systemd

* debian/control (Package: mandos-client/Depends): Add dependency on
  "systemd-cryptsetup" (for newer systemd), or "systemd (<< 256-2)"
  for when cryptsetup support was included in the systemd package
  itself, or "sysvinit-core" for installations without systemd.

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
except AttributeError:
111
111
    shlex.quote = re.escape
112
112
 
 
113
# Add os.set_inheritable if it does not exist
 
114
try:
 
115
    os.set_inheritable
 
116
except AttributeError:
 
117
    def set_inheritable(fd, inheritable):
 
118
        flags = fcntl.fcntl(fd, fcntl.F_GETFD)
 
119
        if inheritable and ((flags & fcntl.FD_CLOEXEC) != 0):
 
120
            fcntl.fcntl(fd, fcntl.F_SETFL, flags & ~fcntl.FD_CLOEXEC)
 
121
        elif (not inheritable) and ((flags & fcntl.FD_CLOEXEC) == 0):
 
122
            fcntl.fcntl(fd, fcntl.F_SETFL, flags | fcntl.FD_CLOEXEC)
 
123
    os.set_inheritable = set_inheritable
 
124
    del set_inheritable
 
125
 
113
126
# Show warnings by default
114
127
if not sys.warnoptions:
115
128
    import warnings
143
156
if sys.version_info < (3, 2):
144
157
    configparser.Configparser = configparser.SafeConfigParser
145
158
 
146
 
version = "1.8.16"
 
159
version = "1.8.18"
147
160
stored_state_file = "clients.pickle"
148
161
 
149
162
log = logging.getLogger(os.path.basename(sys.argv[0]))
3096
3109
        # Later, stdin will, and stdout and stderr might, be dup'ed
3097
3110
        # over with an opened os.devnull.  But we don't want this to
3098
3111
        # happen with a supplied network socket.
3099
 
        if 0 <= server_settings["socket"] <= 2:
 
3112
        while 0 <= server_settings["socket"] <= 2:
3100
3113
            server_settings["socket"] = os.dup(server_settings
3101
3114
                                               ["socket"])
 
3115
        os.set_inheritable(server_settings["socket"], False)
3102
3116
    del server_config
3103
3117
 
3104
3118
    # Override the settings from the config file with command line
3243
3257
    # From the Avahi example code
3244
3258
    DBusGMainLoop(set_as_default=True)
3245
3259
    main_loop = GLib.MainLoop()
3246
 
    bus = dbus.SystemBus()
 
3260
    if use_dbus or zeroconf:
 
3261
        bus = dbus.SystemBus()
3247
3262
    # End of Avahi example code
3248
3263
    if use_dbus:
3249
3264
        try: