/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: 2009-01-05 23:26:06 UTC
  • mfrom: (237.2.11 mandos)
  • Revision ID: teddy@fukt.bsnet.se-20090105232606-2iohqjcsfj076z7i
Merge from trunk, but disable the unfinished D-Bus feature:

* Makefile (PROGS): Removed "mandos-list".
  (mandos-list): Removed.
* mandos (main): Hide "--no-dbus" option.  Hard-code "use_dbus" to
                 "False".
* mandos-list: Removed.
* mandos.xml (SYNOPSIS): Removed "--no-dbus" option.
  (OPTIONS): - '' -
  (D-BUS INTERFACE): Removed section.

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
import ctypes
67
67
import ctypes.util
68
68
 
69
 
version = "1.0.4"
 
69
version = "1.0.2"
70
70
 
71
71
logger = logging.Logger('mandos')
72
72
syslogger = (logging.handlers.SysLogHandler
911
911
                      " files")
912
912
    parser.add_option("--no-dbus", action="store_false",
913
913
                      dest="use_dbus",
914
 
                      help=optparse.SUPPRESS_HELP) # XXX: Not done yet
 
914
                      help=optparse.SUPPRESS_HELP)
915
915
    options = parser.parse_args()[0]
916
916
    
917
917
    if options.check:
957
957
    # For convenience
958
958
    debug = server_settings["debug"]
959
959
    use_dbus = server_settings["use_dbus"]
960
 
    use_dbus = False            # XXX: Not done yet
 
960
    use_dbus = False
961
961
    
962
962
    if not debug:
963
963
        syslogger.setLevel(logging.WARNING)
972
972
    # Parse config file with clients
973
973
    client_defaults = { "timeout": "1h",
974
974
                        "interval": "5m",
975
 
                        "checker": "fping -q -- %%(host)s",
 
975
                        "checker": "fping -q -- %(host)s",
976
976
                        "host": "",
977
977
                        }
978
978
    client_config = ConfigParser.SafeConfigParser(client_defaults)
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)