(CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:tid) op:Equal rhs:{(DQ ('address match'))} spids:[7])] spids: [7] ) (C {(mv)} {($ VSub_Name '$OBJ') (/sshd_proxy)} {($ VSub_Name '$OBJ') (/sshd_proxy_bak)}) (FuncDef name: run_trial body: (BraceGroup children: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:user) op: Equal rhs: {(DQ ($ VSub_Number '$1'))} spids: [29] ) ] spids: [29] ) terminator: <Op_Semi ';'> ) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:addr) op: Equal rhs: {(DQ ($ VSub_Number '$2'))} spids: [35] ) ] spids: [35] ) terminator: <Op_Semi ';'> ) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:host) op: Equal rhs: {(DQ ($ VSub_Number '$3'))} spids: [41] ) ] spids: [41] ) terminator: <Op_Semi ';'> ) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:laddr) op: Equal rhs: {(DQ ($ VSub_Number '$4'))} spids: [47] ) ] spids: [47] ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:lport) op: Equal rhs: {(DQ ($ VSub_Number '$5'))} spids: [53] ) ] spids: [53] ) (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:expected) op: Equal rhs: {(DQ ($ VSub_Number '$6'))} spids: [59] ) ] spids: [59] ) terminator: <Op_Semi ';'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:descr) op: Equal rhs: {(DQ ($ VSub_Number '$7'))} spids: [65] ) ] spids: [65] ) (C {(verbose)} { (DQ ('test ') ($ VSub_Name '$descr') (' for ') ($ VSub_Name '$user') (' ') ($ VSub_Name '$addr') (' ') ($ VSub_Name '$host') ) } ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:result) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(${ VSub_Name SSHD)} {(-f)} {($ VSub_Name '$OBJ') (/sshd_proxy)} {(-T)} {(-C)} {(Lit_VarLike 'user=') (${ VSub_Name user) (Lit_Comma ',') (Lit_VarLike 'addr=') (${ VSub_Name addr) (Lit_Comma ',') (Lit_VarLike 'host=') (${ VSub_Name host) (Lit_Comma ',') (Lit_VarLike 'laddr=') (${ VSub_Name laddr) (Lit_Comma ',') (Lit_VarLike 'lport=') (${ VSub_Name lport) } ) (C {(awk)} {(SQ <'/^forcecommand/ {print $2}'>)}) ] negated: False ) ] ) left_token: <Left_Backtick '`'> spids: [87 137] ) } spids: [86] ) ] spids: [86] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$result'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ ($ VSub_Name '$expected'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(fail)} { (DQ ("failed '") ($ VSub_Name '$descr') ("' expected ") ($ VSub_Name '$expected') (' got ') ($ VSub_Name '$result') ) } ) ] spids: [16777215 158] ) ] spids: [16777215 173] ) ] spids: [26] ) spids: [22 25] ) (C {(cp)} {($ VSub_Name '$OBJ') (/sshd_proxy_bak)} {($ VSub_Name '$OBJ') (/sshd_proxy)}) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id: Redir_DGreat fd: 16777215 arg_word: {($ VSub_Name '$OBJ') (/sshd_proxy)} spids: [188] ) (HereDoc op_id: Redir_DLess fd: 16777215 body: { (DQ ('ForceCommand nomatch\n') ('Match Address 192.168.0.0/16,!192.168.30.0/24,10.0.0.0/8,host.example.com\n') ('\tForceCommand match1\n') ('Match Address 1.1.1.1,::1,!::3,2000::/16\n') ('\tForceCommand match2\n') ('Match LocalAddress 127.0.0.1,::1\n') ('\tForceCommand match3\n') ('Match LocalPort 5678\n') ('\tForceCommand match4\n') ) } do_expansion: True here_end: EOD was_filled: True spids: [192] ) ] ) (C {(run_trial)} {(user)} {(192.168.0.1)} {(somehost)} {(1.2.3.4)} {(1234)} {(match1)} {(DQ ('first entry'))} ) (C {(run_trial)} {(user)} {(192.168.30.1)} {(somehost)} {(1.2.3.4)} {(1234)} {(nomatch)} {(DQ ('negative match'))} ) (C {(run_trial)} {(user)} {(19.0.0.1)} {(somehost)} {(1.2.3.4)} {(1234)} {(nomatch)} {(DQ ('no match'))}) (C {(run_trial)} {(user)} {(10.255.255.254)} {(somehost)} {(1.2.3.4)} {(1234)} {(match1)} {(DQ ('list middle'))} ) (C {(run_trial)} {(user)} {(192.168.30.1)} {(192.168.0.1)} {(1.2.3.4)} {(1234)} {(nomatch)} {(DQ ('faked IP in hostname'))} ) (C {(run_trial)} {(user)} {(1.1.1.1)} {(somehost.example.com)} {(1.2.3.4)} {(1234)} {(match2)} {(DQ ('bare IP4 address'))} ) (C {(run_trial)} {(user)} {(19.0.0.1)} {(somehost)} {(127.0.0.1)} {(1234)} {(match3)} {(DQ (localaddress))} ) (C {(run_trial)} {(user)} {(19.0.0.1)} {(somehost)} {(1.2.3.4)} {(5678)} {(match4)} {(DQ (localport))}) (If arms: [ (if_arm cond: [ (Sentence child: (C {(test)} {(DQ ($ VSub_Name '$TEST_SSH_IPV6'))} {(KW_Bang '!') (Lit_Other '=')} {(DQ (no))} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(run_trial)} {(user)} {(Lit_Other ':') (Lit_Other ':') (1)} {(somehost.example.com)} {(Lit_Other ':') (Lit_Other ':') (2)} {(1234)} {(match2)} {(DQ ('bare IP6 address'))} ) (C {(run_trial)} {(user)} {(Lit_Other ':') (Lit_Other ':') (2)} {(somehost.exaple.com)} {(Lit_Other ':') (Lit_Other ':') (2)} {(1234)} {(nomatch)} {(DQ ('deny IPv6'))} ) (C {(run_trial)} {(user)} {(Lit_Other ':') (Lit_Other ':') (3)} {(somehost)} {(Lit_Other ':') (Lit_Other ':') (2)} {(1234)} {(nomatch)} {(DQ ('IP6 negated'))} ) (C {(run_trial)} {(user)} {(Lit_Other ':') (Lit_Other ':') (4)} {(somehost)} {(Lit_Other ':') (Lit_Other ':') (2)} {(1234)} {(nomatch)} {(DQ ('IP6 no match'))} ) (C {(run_trial)} {(user)} {(2000) (Lit_Other ':') (Lit_Other ':') (1)} {(somehost)} {(Lit_Other ':') (Lit_Other ':') (2)} {(1234)} {(match2)} {(DQ ('IP6 network'))} ) (C {(run_trial)} {(user)} {(2001) (Lit_Other ':') (Lit_Other ':') (1)} {(somehost)} {(Lit_Other ':') (Lit_Other ':') (2)} {(1234)} {(nomatch)} {(DQ ('IP6 network'))} ) (C {(run_trial)} {(user)} {(Lit_Other ':') (Lit_Other ':') (5)} {(somehost)} {(Lit_Other ':') (Lit_Other ':') (1)} {(1234)} {(match3)} {(DQ ('IP6 localaddress'))} ) (C {(run_trial)} {(user)} {(Lit_Other ':') (Lit_Other ':') (5)} {(somehost)} {(Lit_Other ':') (Lit_Other ':') (2)} {(5678)} {(match4)} {(DQ ('IP6 localport'))} ) ] spids: [16777215 367] ) ] spids: [16777215 547] ) (C {(cp)} {($ VSub_Name '$OBJ') (/sshd_proxy_bak)} {($ VSub_Name '$OBJ') (/sshd_proxy)}) (C {(rm)} {($ VSub_Name '$OBJ') (/sshd_proxy_bak)}) ] )