/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: 2011-03-08 11:08:35 UTC
  • Revision ID: teddy@fukt.bsnet.se-20110308110835-3sh7b314tf7q3o1i
* plugins.d/password-prompt.c (conflict_detection): Check for both
                                                    "plymouth" and
                                                    "plymouthd".

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
 
37
37
import SocketServer as socketserver
38
38
import socket
39
 
import argparse
 
39
import optparse
40
40
import datetime
41
41
import errno
42
42
import gnutls.crypto
82
82
        SO_BINDTODEVICE = None
83
83
 
84
84
 
85
 
version = "1.3.0"
 
85
version = "1.2.3"
86
86
 
87
87
#logger = logging.getLogger('mandos')
88
88
logger = logging.Logger('mandos')
1673
1673
    ##################################################################
1674
1674
    # Parsing of options, both command line and config file
1675
1675
    
1676
 
    parser = argparse.ArgumentParser()
1677
 
    parser.add_argument("-v", "--version", action="version",
1678
 
                        version = "%%(prog)s %s" % version,
1679
 
                        help="show version number and exit")
1680
 
    parser.add_argument("-i", "--interface", metavar="IF",
1681
 
                        help="Bind to interface IF")
1682
 
    parser.add_argument("-a", "--address",
1683
 
                        help="Address to listen for requests on")
1684
 
    parser.add_argument("-p", "--port", type=int,
1685
 
                        help="Port number to receive requests on")
1686
 
    parser.add_argument("--check", action="store_true",
1687
 
                        help="Run self-test")
1688
 
    parser.add_argument("--debug", action="store_true",
1689
 
                        help="Debug mode; run in foreground and log"
1690
 
                        " to terminal")
1691
 
    parser.add_argument("--debuglevel", metavar="LEVEL",
1692
 
                        help="Debug level for stdout output")
1693
 
    parser.add_argument("--priority", help="GnuTLS"
1694
 
                        " priority string (see GnuTLS documentation)")
1695
 
    parser.add_argument("--servicename",
1696
 
                        metavar="NAME", help="Zeroconf service name")
1697
 
    parser.add_argument("--configdir",
1698
 
                        default="/etc/mandos", metavar="DIR",
1699
 
                        help="Directory to search for configuration"
1700
 
                        " files")
1701
 
    parser.add_argument("--no-dbus", action="store_false",
1702
 
                        dest="use_dbus", help="Do not provide D-Bus"
1703
 
                        " system bus interface")
1704
 
    parser.add_argument("--no-ipv6", action="store_false",
1705
 
                        dest="use_ipv6", help="Do not use IPv6")
1706
 
    options = parser.parse_args()
 
1676
    parser = optparse.OptionParser(version = "%%prog %s" % version)
 
1677
    parser.add_option("-i", "--interface", type="string",
 
1678
                      metavar="IF", help="Bind to interface IF")
 
1679
    parser.add_option("-a", "--address", type="string",
 
1680
                      help="Address to listen for requests on")
 
1681
    parser.add_option("-p", "--port", type="int",
 
1682
                      help="Port number to receive requests on")
 
1683
    parser.add_option("--check", action="store_true",
 
1684
                      help="Run self-test")
 
1685
    parser.add_option("--debug", action="store_true",
 
1686
                      help="Debug mode; run in foreground and log to"
 
1687
                      " terminal")
 
1688
    parser.add_option("--debuglevel", type="string", metavar="LEVEL",
 
1689
                      help="Debug level for stdout output")
 
1690
    parser.add_option("--priority", type="string", help="GnuTLS"
 
1691
                      " priority string (see GnuTLS documentation)")
 
1692
    parser.add_option("--servicename", type="string",
 
1693
                      metavar="NAME", help="Zeroconf service name")
 
1694
    parser.add_option("--configdir", type="string",
 
1695
                      default="/etc/mandos", metavar="DIR",
 
1696
                      help="Directory to search for configuration"
 
1697
                      " files")
 
1698
    parser.add_option("--no-dbus", action="store_false",
 
1699
                      dest="use_dbus", help="Do not provide D-Bus"
 
1700
                      " system bus interface")
 
1701
    parser.add_option("--no-ipv6", action="store_false",
 
1702
                      dest="use_ipv6", help="Do not use IPv6")
 
1703
    options = parser.parse_args()[0]
1707
1704
    
1708
1705
    if options.check:
1709
1706
        import doctest