/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

merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
# and some lines in "main".
12
12
13
13
# Everything else is
14
 
# Copyright © 2008,2009 Teddy Hogeborn
15
 
# Copyright © 2008,2009 Björn Påhlsson
 
14
# Copyright © 2008 Teddy Hogeborn
 
15
# Copyright © 2008 Björn Påhlsson
16
16
17
17
# This program is free software: you can redistribute it and/or modify
18
18
# it under the terms of the GNU General Public License as published by
66
66
import ctypes
67
67
import ctypes.util
68
68
 
69
 
version = "1.0.3"
 
69
version = "1.0.2"
70
70
 
71
71
logger = logging.Logger('mandos')
72
72
syslogger = (logging.handlers.SysLogHandler
993
993
    
994
994
    try:
995
995
        uid = pwd.getpwnam("_mandos").pw_uid
 
996
    except KeyError:
 
997
        try:
 
998
            uid = pwd.getpwnam("mandos").pw_uid
 
999
        except KeyError:
 
1000
            try:
 
1001
                uid = pwd.getpwnam("nobody").pw_uid
 
1002
            except KeyError:
 
1003
                uid = 65534
 
1004
    try:
996
1005
        gid = pwd.getpwnam("_mandos").pw_gid
997
1006
    except KeyError:
998
1007
        try:
999
 
            uid = pwd.getpwnam("mandos").pw_uid
1000
1008
            gid = pwd.getpwnam("mandos").pw_gid
1001
1009
        except KeyError:
1002
1010
            try:
1003
 
                uid = pwd.getpwnam("nobody").pw_uid
1004
1011
                gid = pwd.getpwnam("nogroup").pw_gid
1005
1012
            except KeyError:
1006
 
                uid = 65534
1007
1013
                gid = 65534
1008
1014
    try:
1009
1015
        os.setuid(uid)
1040
1046
                              use_dbus = use_dbus)
1041
1047
                       for section in client_config.sections()))
1042
1048
    if not clients:
1043
 
        logger.warning(u"No clients defined")
 
1049
        logger.critical(u"No clients defined")
 
1050
        sys.exit(1)
1044
1051
    
1045
1052
    if debug:
1046
1053
        # Redirect stdin so all checkers get /dev/null
1129
1136
                        self.ClientRemoved(object_path)
1130
1137
                        return
1131
1138
                raise KeyError
1132
 
            @dbus.service.method(_interface)
1133
 
            def Quit(self):
1134
 
                main_loop.quit()
1135
1139
 
1136
1140
            del _interface
1137
1141