Module Expr Str Import alias ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias identifier ImportFrom alias identifier ImportFrom alias FunctionDef arguments args NameParam NameParam NameParam defaults Num body Assign NameStore ListLoad Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults TupleLoad Str Str Str Str Str body Assign NameStore Str Assign NameStore BinOpMod Str TupleLoad NameLoad Call AttributeLoad Str attr NameLoad Call AttributeLoad Str attr NameLoad NameLoad Return Dict Str BinOpMod Str NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Str Str body Assign NameStore Str Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad Return Dict Str BinOpMod Str NameLoad NameLoad NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Str Str Assign TupleStore NameStore NameStore Call NameLoad NameLoad Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr ListLoad Num Num Num Num AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr ListLoad Num AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr ListLoad Str Str Str Str Str Str Str Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr ListLoad Str Str Str Str Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore ListLoad Str Str Str Assign NameStore ListLoad NameLoad NameLoad NameLoad Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Str Str Expr Call AttributeLoad NameLoad attr Call NameLoad Str Str Assign TupleStore NameStore NameStore Call NameLoad NameLoad Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr ListLoad Str Str ListComp AttributeLoad NameLoad attr comprehension NameStore NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr Str Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr ListLoad Str Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore NameLoad FunctionDef arguments args NameParam defaults vararg kwarg body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad If CompareIs AttributeLoad NameLoad attr NameLoad body Assign NameStore ListLoad Str Str Str Str Str Assign TupleStore NameStore NameStore Call NameLoad NameLoad BinOpMult ListLoad Str Call NameLoad NameLoad keyword Num Assign NameStore ListLoad Str Str Str Assign TupleStore NameStore NameStore Call NameLoad NameLoad BinOpMult ListLoad Str Call NameLoad NameLoad Assign NameStore ListLoad Str Str Str Str Str Str Str Assign TupleStore NameStore NameStore Call NameLoad NameLoad BinOpMult ListLoad Str Call NameLoad NameLoad keyword Num Assign NameStore BinOpAdd BinOpAdd NameLoad NameLoad NameLoad Assign NameStore BinOpAdd BinOpAdd NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore DictComp AttributeLoad NameLoad attr NameLoad comprehension NameStore AttributeLoad NameLoad attr Call NameLoad NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr ListLoad Str Str Str Str Str NameLoad Expr Call AttributeLoad NameLoad attr ListLoad Num AttributeLoad SubscriptLoad NameLoad Index Str attr Expr Call AttributeLoad NameLoad attr ListLoad Num Num AttributeLoad SubscriptLoad NameLoad Index Str attr Expr Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad NameLoad Index Str attr Expr Call AttributeLoad NameLoad attr ListLoad Num AttributeLoad SubscriptLoad NameLoad Index Str attr Expr Call AttributeLoad NameLoad attr AttributeLoad SubscriptLoad NameLoad Index Str attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListComp NameLoad comprehension NameStore AttributeLoad NameLoad attr Call NameLoad NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Call NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr ListLoad Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr NameLoad
N/A N/A Unit test for the linux sysctl parser. N/A StringIO grr.lib flags grr.lib test_lib grr.lib.rdfvalues anomaly rdf_anomaly grr.lib.rdfvalues client rdf_client grr.lib.rdfvalues paths rdf_paths grr.parsers linux_service_parser GenTestData N/A N/A paths data st_mode N/A 33188 N/A N/A stats N/A N/A files N/A N/A path paths N/A N/A p N/A N/A rdf_paths PathSpec path path pathtype OS N/A N/A N/A stats append N/A N/A rdf_client StatEntry pathspec p st_mode st_mode N/A val data N/A N/A N/A N/A files append N/A N/A StringIO StringIO val N/A N/A stats files N/A GenInit N/A N/A svc desc start stop N/A N/A 2 3 4 5 1 N/A N/A insserv 
    $local_fs   +umountfs
    $network    +networking
    $remote_fs  $local_fs +umountnfs +sendsigs
    $syslog     +rsyslog +sysklogd +syslog-ng +dsyslog +inetutils-syslogd
     N/A tmpl N/A 
    ### BEGIN INIT INFO
    # Provides:             %s
    # Required-Start:       $remote_fs $syslog
    # Required-Stop:        $syslog
    # Default-Start:        %s
    # Default-Stop:         %s
    # Short-Description:    %s
    ### END INIT INFO
     N/A svc N/A N/A join start N/A N/A join stop desc N/A N/A /etc/insserv.conf N/A /etc/init.d/%s svc insserv tmpl N/A GenXinetd N/A N/A svc disable N/A test no N/A N/A defaults 
    defaults
    {
       instances      = 60
       log_type       = SYSLOG     authpriv
       log_on_success = HOST PID
       log_on_failure = HOST
       cps            = 25 30
    }
    includedir /etc/xinetd.d
     N/A tmpl N/A 
    service %s
    {
       disable         = %s
    }
     N/A svc disable N/A N/A /etc/xinetd.conf N/A /etc/xinetd.d/%s svc defaults tmpl N/A LinuxLSBInitParserTest N/A N/A test_lib GRRBaseTest N/A N/A Test parsing of linux /etc/init.d files with LSB headers. testParseLSBInit N/A N/A self N/A N/A N/A Init entries return accurate LinuxServiceInformation values. N/A configs N/A GenInit sshd OpenBSD Secure Shell server N/A N/A stats files N/A GenTestData configs N/A N/A configs values N/A parser N/A N/A linux_service_parser LinuxLSBInitParser N/A results N/A list N/A N/A parser ParseMultiple stats files None N/A N/A N/A self assertIsInstance N/A results N/A 0 N/A rdf_client LinuxServiceInformation N/A result N/A results N/A 0 N/A N/A N/A self assertEqual sshd N/A result name N/A N/A N/A self assertEqual OpenBSD Secure Shell server N/A result description N/A N/A N/A self assertEqual INIT N/A result start_mode N/A N/A N/A self assertItemsEqual N/A 2 3 4 5 N/A result start_on N/A N/A N/A self assertItemsEqual N/A 1 N/A result stop_on N/A N/A N/A self assertItemsEqual N/A umountfs umountnfs sendsigs rsyslog sysklogd syslog-ng dsyslog inetutils-syslogd N/A result start_after N/A N/A N/A self assertItemsEqual N/A rsyslog sysklogd syslog-ng dsyslog inetutils-syslogd N/A result stop_after N/A testSkipBadLSBInit N/A N/A self N/A N/A N/A Bad Init entries fail gracefully. N/A empty N/A snippet # Provides:             sshd N/A unfinished 
      ### BEGIN INIT INFO
      what are you thinking?
     N/A paths N/A /tmp/empty /tmp/snippet /tmp/unfinished N/A vals N/A empty snippet unfinished N/A N/A stats files N/A GenTestData paths vals N/A parser N/A N/A linux_service_parser LinuxLSBInitParser N/A results N/A list N/A N/A parser ParseMultiple stats files None N/A N/A N/A self assertFalse results N/A N/A LinuxXinetdParserTest N/A N/A test_lib GRRBaseTest N/A N/A Test parsing of xinetd entries. testParseXinetd N/A N/A self N/A N/A N/A Xinetd entries return accurate LinuxServiceInformation values. N/A configs N/A GenXinetd telnet yes N/A N/A N/A configs update N/A GenXinetd forwarder no N/A N/A stats files N/A GenTestData configs N/A N/A configs values N/A parser N/A N/A linux_service_parser LinuxXinetdParser N/A results N/A list N/A N/A parser ParseMultiple stats files None N/A N/A N/A self assertEqual 2 N/A len results N/A N/A N/A self assertItemsEqual N/A forwarder telnet N/A N/A r name N/A r results N/A rslt results N/A N/A N/A N/A self assertFalse N/A rslt start_on N/A N/A N/A self assertFalse N/A rslt stop_on N/A N/A N/A self assertFalse N/A rslt stop_after N/A N/A N/A rslt name telnet N/A N/A N/A N/A self assertFalse N/A rslt start_mode N/A N/A N/A self assertFalse N/A rslt start_after N/A N/A N/A self assertFalse N/A rslt starts N/A N/A N/A N/A self assertEqual XINETD N/A str N/A rslt start_mode N/A N/A N/A self assertItemsEqual N/A xinetd N/A list N/A rslt start_after N/A N/A N/A self assertTrue N/A rslt starts N/A N/A LinuxSysVInitParserTest N/A N/A test_lib GRRBaseTest N/A N/A Test parsing of sysv startup and shutdown links. N/A results None setUp N/A N/A self N/A args kwargs N/A N/A N/A N/A N/A super LinuxSysVInitParserTest self setUp args kwargs N/A N/A N/A self results None N/A N/A dirs N/A /etc /etc/rc1.d /etc/rc2.d /etc/rc6.d /etc/rcS.d N/A N/A d_stat d_files N/A GenTestData dirs N/A N/A N/A len dirs st_mode 16877 N/A files N/A /etc/rc.local /etc/ignoreme /etc/rc2.d/S20ssh N/A N/A f_stat f_files N/A GenTestData files N/A N/A N/A len files N/A links N/A /etc/rc1.d/S90single /etc/rc1.d/K20ssh /etc/rc1.d/ignore /etc/rc2.d/S20ntp /etc/rc2.d/S30ufw /etc/rc6.d/K20ssh /etc/rcS.d/S20firewall N/A N/A l_stat l_files N/A GenTestData links N/A N/A N/A len links st_mode 41471 N/A stats N/A N/A d_stat f_stat l_stat N/A files N/A N/A d_files f_files l_files N/A parser N/A N/A linux_service_parser LinuxSysVInitParser N/A N/A self results N/A list N/A N/A parser ParseMultiple stats files None N/A testParseServices N/A N/A self N/A N/A N/A SysV init links return accurate LinuxServiceInformation values. N/A services N/A N/A s name s N/A s N/A self results N/A isinstance s N/A rdf_client LinuxServiceInformation N/A N/A N/A self assertEqual 5 N/A len services N/A N/A N/A self assertItemsEqual N/A single ssh ntp ufw firewall services N/A N/A N/A self assertItemsEqual N/A 2 N/A N/A services N/A ssh start_on N/A N/A N/A self assertItemsEqual N/A 1 6 N/A N/A services N/A ssh stop_on N/A N/A N/A self assertTrue N/A N/A services N/A ssh starts N/A N/A N/A self assertItemsEqual N/A 1 N/A N/A services N/A firewall start_on N/A N/A N/A self assertTrue N/A N/A services N/A firewall starts N/A testDetectAnomalies N/A N/A self N/A N/A N/A anomalies N/A a N/A a N/A self results N/A isinstance a N/A rdf_anomaly Anomaly N/A N/A N/A self assertEqual 1 N/A len anomalies N/A rslt N/A anomalies N/A 0 N/A N/A N/A self assertEqual Startup script is not a symlink. N/A rslt explanation N/A N/A N/A self assertEqual N/A /etc/rc2.d/S20ssh N/A rslt finding N/A N/A N/A self assertEqual PARSER_ANOMALY N/A rslt type N/A N/A main N/A N/A args N/A N/A N/A N/A N/A test_lib main args N/A N/A N/A __name__ __main__ N/A N/A N/A N/A flags StartMain main