def __init__(self, logfile=None, configfile=None,<EOL>configdir=None, debug=False, **kwargs):
self.debug = debug<EOL>self.logfile = logfile<EOL>self.client_ip = None<EOL>if logfile:<EOL><INDENT>self.logfh = open(logfile, '<STR_LIT:a>')<EOL><DEDENT>else:<EOL><INDENT>self.logfh = False<EOL><DEDENT>if kwargs.get('<STR_LIT>'):<EOL><INDENT>self.authprogs_binary = kwargs['<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>self.authprogs_binary = (<EOL>os.path.abspath(os.path.abspath(sys.argv[<NUM_LIT:0>])))<EOL><DEDENT>self.original_command_string = os.environ.get(<EOL>'<STR_LIT>', '<STR_LIT>')<EOL>self.original_command_list = self.original_command_string.split()<EOL>self.keyname = kwargs.get('<STR_LIT>')<EOL>if not self.keyname:<EOL><INDENT>self.keyname = '<STR_LIT>'<EOL><DEDENT>if '<STR_LIT:U+0020>' in self.keyname or '<STR_LIT:\t>' in self.keyname:<EOL><INDENT>self.log('<STR_LIT>')<EOL>raise Error('<STR_LIT>')<EOL><DEDENT>self.yamldocs = None<EOL>self.configfile = configfile<EOL>self.configdir = configdir<EOL>
AuthProgs constructor.

        kwargs include:
            authprogs_binary: path to this binary, when creating
                              authorized_keys entries.
                              If not specified, determines from sys.argv[0]
            name: the name of this key, for matching in rules.