(command.CommandList children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(test)} {(-z)} {(DQ ($ Id.VSub_DollarName '$VERBOSE'))}) (C {(Id.KW_Set set)} {(-x)}) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(test)} {(DQ ($ Id.VSub_DollarName '$USE_ACL'))} {(Id.Lit_Equals '=')} {(0)}) (command.BraceGroup children: [ (C {(echo)} {(DQ ('Skipping test: insufficient ACL support'))}) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:45) arg_word: {(77)} ) ] ) ] ) (command.ShFunction name: func_tmpdir body: (command.BraceGroup children: [ (C {(Id.Lit_Other ':')} { (braced_var_sub token: (Token id:Id.VSub_Name val:TMPDIR span_id:88) suffix_op: (suffix_op.Unary op_id:Id.VTest_Equals arg_word:{(Id.Lit_Slash /) (tmp)}) ) } ) (command.AndOr ops: [Id.Op_DPipe Id.Op_DPipe] children: [ (command.BraceGroup children: [ (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tmp) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:107) command_list: (command.CommandList children: [ (command.Subshell command_list: (command.CommandList children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(umask)} {(077)}) (C {(mktemp)} {(-d)} { (DQ ($ Id.VSub_DollarName '$TMPDIR') (/glXXXXXX) ) } ) ] ) ] ) redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:127) fd: 2 arg_word: {(/dev/null)} ) ] ) ] ) ) } spids: [106] ) ] ) (C {(test)} {(-n)} {(DQ ($ Id.VSub_DollarName '$tmp'))}) (C {(test)} {(-d)} {(DQ ($ Id.VSub_DollarName '$tmp'))}) ] ) ] ) (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tmp) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$TMPDIR') (/gl) ($ Id.VSub_Dollar '$$') (-) ($ Id.VSub_DollarName '$RANDOM') } spids: [181] ) ] ) (command.Subshell command_list: (command.CommandList children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(umask)} {(077)}) (C {(mkdir)} {(DQ ($ Id.VSub_DollarName '$tmp'))}) ] ) ] ) ) ] ) (command.BraceGroup children: [ (command.Simple words: [ {(echo)} { (DQ ($ Id.VSub_Number '$0') (': cannot create a temporary directory in ') ($ Id.VSub_DollarName '$TMPDIR') ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:220) fd: -1 arg_word: {(2)} ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:224) arg_word: {(1)} ) ] ) ] ) ] ) ) (C {(func_tmpdir)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:builddir) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:237) command_list: (command.CommandList children:[(C {(pwd)})]) ) } spids: [236] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(cd)} {(DQ ($ Id.VSub_DollarName '$builddir'))}) (command.BraceGroup children: [ (command.Simple words: [ {(echo)} { (DQ ($ Id.VSub_Number '$0') (': cannot determine build directory (unreadable parent dir?)') ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:262) fd: -1 arg_word: {(2)} ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:266) arg_word: {(1)} ) ] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Subshell command_list: (command.CommandList children: [ (C {(cd)} {(DQ ($ Id.VSub_DollarName '$tmp'))}) (C {(rm)} {(-f)} {(Id.Lit_ArrayLhsOpen 'tmpfile[') (0-9) (Id.Lit_RBracket ']')} {(tmp.err)} ) (command.Simple words: [{(echo)} {(DQ ('Simple contents'))}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:313) fd: -1 arg_word: {(tmpfile0)} ) ] ) (C {(chmod)} {(600)} {(tmpfile0)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:acl_flavor) op: assign_op.Equal rhs: {(none)} spids: [346] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Subshell command_list: (command.CommandList children: [ (command.Simple words: [{(getfacl)} {(tmpfile0)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:357) fd: -1 arg_word: {(/dev/null)} ) ] ) ] ) redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:361) fd: 2 arg_word: {(/dev/null)} ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:363) ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Subshell command_list: (command.CommandList children: [ (command.Simple words: [{(setfacl)} {(--help)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:383) fd: -1 arg_word: {(/dev/null)} ) ] ) ] ) redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:387) fd: 2 arg_word: {(/dev/null)} ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:389) ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Subshell command_list: (command.CommandList children: [ (command.Pipeline children: [ (command.Simple words: [{(setfacl)} {(--help)}] more_env: [ (env_pair name: LC_ALL val: {(C)} spids: [401] ) ] ) (command.Simple words: [ {(grep)} { (SQ (Token id: Id.Lit_Chars val: ' --set-file' span_id: 413 ) ) } ] redirects: [ (redir.Redir op: (Token id: Id.Redir_Great val: '>' span_id: 416 ) fd: -1 arg_word: {(/dev/null)} ) ] ) ] negated: F ) ] ) redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:420) fd: 2 arg_word: {(/dev/null)} ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:422) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:acl_flavor) op: assign_op.Equal rhs: {(linux)} spids: [431] ) ] ) ] spids: [398 424] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:acl_flavor) op: assign_op.Equal rhs: {(cygwin)} spids: [438] ) ] ) ] ) ] spids: [376 391] ) ] else_action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Subshell command_list: (command.CommandList children: [ (command.Pipeline children: [ (command.Simple words: [{(setfacl)}] redirects: [ (redir.Redir op: (Token id: Id.Redir_GreatAnd val: '2>&' span_id: 460 ) fd: 2 arg_word: {(1)} ) ] more_env: [ (env_pair name: LC_ALL val: {(C)} spids: [455] ) ] ) (command.Simple words: [ {(grep)} { (SQ (Token id: Id.Lit_Chars val: '\\-x entries' span_id: 468 ) ) } ] redirects: [ (redir.Redir op: (Token id: Id.Redir_Great val: '>' span_id: 471 ) fd: -1 arg_word: {(/dev/null)} ) ] ) ] negated: F ) ] ) redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:475) fd: 2 arg_word: {(/dev/null)} ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:477) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:acl_flavor) op: assign_op.Equal rhs: {(freebsd)} spids: [486] ) ] ) ] spids: [452 479] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:acl_flavor) op: assign_op.Equal rhs: {(solaris)} spids: [497] ) ] ) ] ) ] ) ] spids: [350 365] ) ] else_action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Subshell command_list: (command.CommandList children: [ (command.Simple words: [{(lsacl)} {(/)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:517) fd: -1 arg_word: {(/dev/null)} ) ] ) ] ) redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:521) fd: 2 arg_word: {(/dev/null)} ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:523) ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Subshell command_list: (command.CommandList children: [ (command.Simple words: [{(getacl)} {(tmpfile0)}] redirects: [ (redir.Redir op: (Token id: Id.Redir_Great val: '>' span_id: 543 ) fd: -1 arg_word: {(/dev/null)} ) ] ) ] ) redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:547) fd: 2 arg_word: {(/dev/null)} ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:549) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:acl_flavor) op: assign_op.Equal rhs: {(hpuxjfs)} spids: [558] ) ] ) ] spids: [536 551] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:acl_flavor) op: assign_op.Equal rhs: {(hpux)} spids: [569] ) ] ) ] ) ] spids: [510 525] ) ] else_action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Subshell command_list: (command.CommandList children: [ (command.Simple words: [{(getacl)} {(tmpfile0)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:586) fd: -1 arg_word: {(/dev/null)} ) ] ) ] ) redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:590) fd: 2 arg_word: {(/dev/null)} ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:592) ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Subshell command_list: (command.CommandList children: [ (command.Simple words: [{(getacl)} {(-m)} {(tmpfile0)}] redirects: [ (redir.Redir op: (Token id: Id.Redir_Great val: '>' span_id: 610 ) fd: -1 arg_word: {(/dev/null)} ) ] ) ] ) redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:614) fd: 2 arg_word: {(/dev/null)} ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:616) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:acl_flavor) op: assign_op.Equal rhs: {(osf1)} spids: [625] ) ] ) ] spids: [601 618] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:acl_flavor) op: assign_op.Equal rhs: {(nsk)} spids: [636] ) ] ) ] ) ] spids: [579 594] ) ] else_action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Subshell command_list: (command.CommandList children: [ (command.Simple words: [{(aclget)} {(tmpfile0)}] redirects: [ (redir.Redir op: (Token id: Id.Redir_Great val: '>' span_id: 653 ) fd: -1 arg_word: {(/dev/null)} ) ] ) ] ) redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:657) fd: 2 arg_word: {(/dev/null)} ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:659) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:acl_flavor) op: assign_op.Equal rhs: {(aix)} spids: [668] ) ] ) ] spids: [646 661] ) ] else_action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Subshell command_list: (command.CommandList children: [ (command.Simple words: [{(fsaclctl)} {(-v)}] redirects: [ (redir.Redir op: (Token id: Id.Redir_Great val: '>' span_id: 682 ) fd: -1 arg_word: {(/dev/null)} ) ] ) ] ) redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:686) fd: 2 arg_word: {(/dev/null)} ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:688) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:acl_flavor) op: assign_op.Equal rhs: {(macosx)} spids: [697] ) ] ) ] spids: [675 690] ) ] else_action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(test)} {(-f)} {(/sbin/chacl)}) terminator: (Token id:Id.Op_Semi val:';' span_id:711) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:acl_flavor) op: assign_op.Equal rhs: {(irix)} spids: [720] ) ] ) ] spids: [704 713] ) ] ) ] ) ] ) ] ) ] ) ] ) (command.ShFunction name: func_test_file_has_acl body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:res) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:765) command_list: (command.CommandList children: [ (C {(DQ ($ Id.VSub_DollarName '$builddir')) (/test-file-has-acl) (${ Id.VSub_Name EXEEXT) } {(DQ ($ Id.VSub_Number '$1'))} ) ] ) ) } spids: [764] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(test)} {(DQ ($ Id.VSub_DollarName '$res'))} {(Id.Lit_Equals '=')} {(DQ ($ Id.VSub_Number '$2'))} ) (command.BraceGroup children: [ (command.Simple words: [ {(echo)} { (DQ ('file_has_acl(') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:803) ) ($ Id.VSub_Number '$1') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:805) ) (') returned ') ($ Id.VSub_DollarName '$res') (', expected ') ($ Id.VSub_Number '$2') ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'1>&' span_id:812) fd: 1 arg_word: {(2)} ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:816) arg_word: {(1)} ) ] ) ] ) ] ) ) (command.Case to_match: {($ Id.VSub_DollarName '$acl_flavor')} arms: [ (case_arm pat_list: [{(freebsd)} {(solaris)} {(hpux)} {(macosx)}] action: [ (command.Case to_match: {($ Id.VSub_DollarName '$acl_flavor')} arms: [ (case_arm pat_list: [{(freebsd)} {(solaris)} {(hpux)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:acl_ls_option) op: assign_op.Equal rhs: {(DQ (-ld))} spids: [885] ) ] ) ] spids: [874 883 890 -1] ) (case_arm pat_list: [{(macosx)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:acl_ls_option) op: assign_op.Equal rhs: {(DQ (-lde))} spids: [896] ) ] ) ] spids: [893 894 901 -1] ) ] ) (command.ShFunction name: func_test_has_acl body: (command.BraceGroup children: [ (C {(func_test_file_has_acl)} {(DQ ($ Id.VSub_Number '$1'))} {(DQ ($ Id.VSub_Number '$2'))} ) (command.Case to_match: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:929) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(/bin/ls)} {($ Id.VSub_DollarName '$acl_ls_option')} {(DQ ($ Id.VSub_Number '$1'))} ) (C {(sed)} {(1q)}) ] negated: F ) ] ) ) } arms: [ (case_arm pat_list: [ {(Id.Lit_QMark '?') (Id.Lit_QMark '?') (Id.Lit_QMark '?') (Id.Lit_QMark '?') (Id.Lit_QMark '?') (Id.Lit_QMark '?') (Id.Lit_QMark '?') (Id.Lit_QMark '?') (Id.Lit_QMark '?') (Id.Lit_QMark '?') (Id.Lit_Other '+') (Id.Lit_Star '*') } ] action: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(test)} {(DQ ($ Id.VSub_Number '$2'))} {(Id.Lit_Equals '=')} {(yes)} ) (command.BraceGroup children: [ (command.Simple words: [ {(echo)} { (DQ ('/bin/ls ') ($ Id.VSub_DollarName '$acl_ls_option') (' ') ($ Id.VSub_Number '$1') (' shows an ACL, but expected ') ($ Id.VSub_Number '$2') ) } ] redirects: [ (redir.Redir op: (Token id: Id.Redir_GreatAnd val: '1>&' span_id: 991 ) fd: 1 arg_word: {(2)} ) ] ) (command.ControlFlow token: (Token id: Id.ControlFlow_Exit val: exit span_id: 995 ) arg_word: {(1)} ) ] ) ] ) ] spids: [950 962 1003 -1] ) (case_arm pat_list: [ {(Id.Lit_QMark '?') (Id.Lit_QMark '?') (Id.Lit_QMark '?') (Id.Lit_QMark '?') (Id.Lit_QMark '?') (Id.Lit_QMark '?') (Id.Lit_QMark '?') (Id.Lit_QMark '?') (Id.Lit_QMark '?') (Id.Lit_QMark '?') (DQ (' ')) (Id.Lit_Star '*') } ] action: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(test)} {(DQ ($ Id.VSub_Number '$2'))} {(Id.Lit_Equals '=')} {(no)} ) (command.BraceGroup children: [ (command.Simple words: [ {(echo)} { (DQ ('/bin/ls ') ($ Id.VSub_DollarName '$acl_ls_option') (' ') ($ Id.VSub_Number '$1') (' shows no ACL, but expected ') ($ Id.VSub_Number '$2') ) } ] redirects: [ (redir.Redir op: (Token id: Id.Redir_GreatAnd val: '1>&' span_id: 1049 ) fd: 1 arg_word: {(2)} ) ] ) (command.ControlFlow token: (Token id: Id.ControlFlow_Exit val: exit span_id: 1053 ) arg_word: {(1)} ) ] ) ] ) ] spids: [1006 1020 1061 -1] ) ] ) ] ) ) ] spids: [851 864 1070 -1] ) (case_arm pat_list: [{(irix)}] action: [ (command.ShFunction name: func_test_has_acl body: (command.BraceGroup children: [ (C {(func_test_file_has_acl)} {(DQ ($ Id.VSub_Number '$1'))} {(DQ ($ Id.VSub_Number '$2'))} ) (command.Case to_match: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:1099) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(/bin/ls)} {(-ldD)} {(DQ ($ Id.VSub_Number '$1'))}) (C {(sed)} {(1q)}) ] negated: F ) ] ) ) } arms: [ (case_arm pat_list: [{(Id.Lit_Star '*') (DQ (' []'))}] action: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(test)} {(DQ ($ Id.VSub_Number '$2'))} {(Id.Lit_Equals '=')} {(no)} ) (command.BraceGroup children: [ (command.Simple words: [ {(echo)} { (DQ ('/bin/ls -ldD ') ($ Id.VSub_Number '$1') (' shows no ACL, but expected ') ($ Id.VSub_Number '$2') ) } ] redirects: [ (redir.Redir op: (Token id: Id.Redir_GreatAnd val: '1>&' span_id: 1151 ) fd: 1 arg_word: {(2)} ) ] ) (command.ControlFlow token: (Token id: Id.ControlFlow_Exit val: exit span_id: 1155 ) arg_word: {(1)} ) ] ) ] ) ] spids: [1120 1124 1163 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(test)} {(DQ ($ Id.VSub_Number '$2'))} {(Id.Lit_Equals '=')} {(yes)} ) (command.BraceGroup children: [ (command.Simple words: [ {(echo)} { (DQ ('/bin/ls -ldD ') ($ Id.VSub_Number '$1') (' shows an ACL, but expected ') ($ Id.VSub_Number '$2') ) } ] redirects: [ (redir.Redir op: (Token id: Id.Redir_GreatAnd val: '1>&' span_id: 1194 ) fd: 1 arg_word: {(2)} ) ] ) (command.ControlFlow token: (Token id: Id.ControlFlow_Exit val: exit span_id: 1198 ) arg_word: {(1)} ) ] ) ] ) ] spids: [1166 1167 1206 -1] ) ] ) ] ) ) ] spids: [1073 1074 1215 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (command.ShFunction name: func_test_has_acl body: (command.BraceGroup children: [ (C {(func_test_file_has_acl)} {(DQ ($ Id.VSub_Number '$1'))} {(DQ ($ Id.VSub_Number '$2'))} ) ] ) ) ] spids: [1218 1219 1245 -1] ) ] ) (C {(func_test_has_acl)} {(tmpfile0)} {(no)}) (C {(mkdir)} {(tmpdir0)}) (C {(func_test_has_acl)} {(tmpdir0)} {(no)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(test)} {($ Id.VSub_DollarName '$acl_flavor')} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(none)} ) terminator: (Token id:Id.Op_Semi val:';' span_id:1283) ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(test)} {(-f)} {(/usr/xpg4/bin/id)}) terminator: (Token id:Id.Op_Semi val:';' span_id:1299) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ID) op: assign_op.Equal rhs: {(/usr/xpg4/bin/id)} spids: [1304] ) ] ) ] spids: [1292 1301] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ID) op: assign_op.Equal rhs: {(id)} spids: [1311] ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:myuid) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:1327) command_list: (command.CommandList children: [(C {($ Id.VSub_DollarName '$ID')} {(-u)})] ) ) } spids: [1326] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:mygid) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:1337) command_list: (command.CommandList children: [(C {($ Id.VSub_DollarName '$ID')} {(-g)})] ) ) } spids: [1336] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:auid) op: assign_op.Equal rhs: {(1)} spids: [1346] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(test)} {(DQ ($ Id.VSub_DollarName '$auid'))} {(Id.Lit_Equals '=')} {(DQ ($ Id.VSub_DollarName '$myuid'))} ) terminator: (Token id:Id.Op_Semi val:';' span_id:1363) ) ] action: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:auid) op: assign_op.Equal rhs: {(2)} spids: [1367] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:1369) ) ] spids: [1350 1365] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:agid) op: assign_op.Equal rhs: {(1)} spids: [1374] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(test)} {(DQ ($ Id.VSub_DollarName '$agid'))} {(Id.Lit_Equals '=')} {(DQ ($ Id.VSub_DollarName '$mygid'))} ) terminator: (Token id:Id.Op_Semi val:';' span_id:1391) ) ] action: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:agid) op: assign_op.Equal rhs: {(2)} spids: [1395] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:1397) ) ] spids: [1378 1393] ) ] ) (command.Case to_match: {($ Id.VSub_DollarName '$acl_flavor')} arms: [ (case_arm pat_list: [{(linux)} {(freebsd)} {(solaris)}] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(setfacl)} {(-m)} {(user) (Id.Lit_Other ':') ($ Id.VSub_DollarName '$auid') (Id.Lit_Other ':') (1) } {(tmpfile0)} ) terminator: (Token id:Id.Op_Semi val:';' span_id:1440) ) ] action: [ (C {(func_test_has_acl)} {(tmpfile0)} {(yes)}) (command.Case to_match: {($ Id.VSub_DollarName '$acl_flavor')} arms: [ (case_arm pat_list: [{(linux)}] action: [ (C {(setfacl)} {(-x)} {(user) (Id.Lit_Other ':') ($ Id.VSub_DollarName '$auid') } {(tmpfile0)} ) ] spids: [1465 1466 1478 -1] ) (case_arm pat_list: [{(freebsd)}] action: [ (C {(setfacl)} {(-x)} {(user) (Id.Lit_Other ':') ($ Id.VSub_DollarName '$auid') (Id.Lit_Other ':') (1) } {(tmpfile0)} ) ] spids: [1481 1482 1496 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (C {(setfacl)} {(-d)} {(user) (Id.Lit_Other ':') ($ Id.VSub_DollarName '$auid') (Id.Lit_Other ':') (1) } {(tmpfile0)} ) ] spids: [1499 1500 1514 -1] ) ] ) (command.Case to_match: {($ Id.VSub_DollarName '$acl_flavor')} arms: [ (case_arm pat_list: [{(linux)} {(freebsd)}] action: [(C {(func_test_has_acl)} {(tmpfile0)} {(yes)})] spids: [1536 1541 1549 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [(C {(func_test_has_acl)} {(tmpfile0)} {(no)})] spids: [1552 1553 1561 -1] ) ] ) (command.Case to_match: {($ Id.VSub_DollarName '$acl_flavor')} arms: [ (case_arm pat_list: [{(linux)} {(freebsd)}] action: [ (C {(setfacl)} {(-x)} {(mask) (Id.Lit_Other ':')} {(tmpfile0)} ) ] spids: [1579 1584 1595 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (C {(setfacl)} {(-d)} {(mask) (Id.Lit_Other ':')} {(tmpfile0)} ) ] spids: [1598 1599 1610 -1] ) ] ) (C {(func_test_has_acl)} {(tmpfile0)} {(no)}) ] spids: [1427 1442] ) ] ) ] spids: [1410 1419 1628 -1] ) (case_arm pat_list: [{(cygwin)}] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(setfacl)} {(-m)} {(group) (Id.Lit_Other ':') (0) (Id.Lit_Other ':') (1)} {(tmpfile0)} ) terminator: (Token id:Id.Op_Semi val:';' span_id:1654) ) ] action: [ (C {(func_test_has_acl)} {(tmpfile0)} {(yes)}) (C {(setfacl)} {(-d)} {(group) (Id.Lit_Other ':') (0)} {(tmpfile0)} ) (C {(func_test_has_acl)} {(tmpfile0)} {(no)}) ] spids: [1641 1656] ) ] ) ] spids: [1632 1633 1695 -1] ) (case_arm pat_list: [{(hpux)} {(hpuxjfs)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:orig) op: assign_op.Equal rhs: { (command_sub left_token: (Token id: Id.Left_Backtick val: '`' span_id: 1713 ) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(lsacl)} {(tmpfile0)}) (C {(sed)} {(-e)} { (SQ (Token id: Id.Lit_Chars val: 's/ tmpfile0$//' span_id: 1727 ) ) } ) ] negated: F ) ] ) ) } spids: [1712] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(chacl)} {(-r)} { (DQ (${ Id.VSub_Name orig) ('(') ($ Id.VSub_DollarName '$auid') ('.%,--x)') ) } {(tmpfile0)} ) terminator: (Token id:Id.Op_Semi val:';' span_id:1748) ) ] action: [ (C {(func_test_has_acl)} {(tmpfile0)} {(yes)}) (C {(chacl)} {(-d)} {(DQ ('(') ($ Id.VSub_DollarName '$auid') ('.%,--x)'))} {(tmpfile0)} ) (C {(func_test_has_acl)} {(tmpfile0)} {(no)}) ] spids: [1732 1750] ) ] else_action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(test)} {($ Id.VSub_DollarName '$acl_flavor')} {(Id.Lit_Equals '=')} {(hpuxjfs)} ) terminator: (Token id:Id.Op_Semi val:';' span_id:1800) ) ] action: [ (C {(setacl)} {(-m)} {(user) (Id.Lit_Other ':') ($ Id.VSub_DollarName '$auid') (Id.Lit_Other ':') (1) } {(tmpfile0)} ) (C {(func_test_has_acl)} {(tmpfile0)} {(yes)}) (C {(setacl)} {(-d)} {(user) (Id.Lit_Other ':') ($ Id.VSub_DollarName '$auid') } {(tmpfile0)} ) (C {(func_test_has_acl)} {(tmpfile0)} {(no)}) ] spids: [1791 1802] ) ] ) ] ) ] spids: [1699 1704 1862 -1] ) (case_arm pat_list: [{(osf1)}] action: [ (command.Simple words: [ {(setacl)} {(-u)} {(user) (Id.Lit_Other ':') ($ Id.VSub_DollarName '$auid') (Id.Lit_Other ':') (1) } {(tmpfile0)} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:1887) fd: 2 arg_word: {(tmp.err)} ) ] ) (command.Simple words: [{(cat)} {(tmp.err)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'1>&' span_id:1896) fd: 1 arg_word: {(2)} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Simple words: [ {(grep)} { (SQ (Token id: Id.Lit_Chars val: 'Error:' span_id: 1905 ) ) } {(tmp.err)} ] redirects: [ (redir.Redir op: (Token id: Id.Redir_Great val: '>' span_id: 1910 ) fd: -1 arg_word: {(/dev/null)} ) ] ) (command.Simple words: [ {(grep)} { (SQ (Token id: Id.Lit_Chars val: 'Operation not supported' span_id: 1921 ) ) } {(tmp.err)} ] redirects: [ (redir.Redir op: (Token id: Id.Redir_Great val: '>' span_id: 1926 ) fd: -1 arg_word: {(/dev/null)} ) ] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:1929) ) ] action: [(C {(Id.Lit_Other ':')})] spids: [1900 1931] ) ] else_action: [ (C {(func_test_has_acl)} {(tmpfile0)} {(yes)}) (C {(setacl)} {(-x)} {(user) (Id.Lit_Other ':') ($ Id.VSub_DollarName '$auid') (Id.Lit_Other ':') (1) } {(tmpfile0)} ) (C {(func_test_has_acl)} {(tmpfile0)} {(no)}) ] ) ] spids: [1866 1867 1978 -1] ) (case_arm pat_list: [{(nsk)}] action: [ (C {(setacl)} {(-m)} {(user) (Id.Lit_Other ':') ($ Id.VSub_DollarName '$auid') (Id.Lit_Other ':') (1) } {(tmpfile0)} ) (C {(func_test_has_acl)} {(tmpfile0)} {(yes)}) (C {(setacl)} {(-d)} {(user) (Id.Lit_Other ':') ($ Id.VSub_DollarName '$auid')} {(tmpfile0)} ) (C {(func_test_has_acl)} {(tmpfile0)} {(no)}) ] spids: [1982 1983 2037 -1] ) (case_arm pat_list: [{(aix)}] action: [ (command.Pipeline children: [ (command.BraceGroup children: [ (command.Sentence child: (command.Pipeline children: [ (C {(aclget)} {(tmpfile0)}) (C {(sed)} {(-e)} { (SQ (Token id: Id.Lit_Chars val: 's/disabled$/enabled/' span_id: 2063 ) ) } ) ] negated: F ) terminator: (Token id:Id.Op_Semi val:';' span_id:2065) ) (command.Sentence child: (C {(echo)} { (DQ (' permit --x u:') ($ Id.VSub_DollarName '$auid') ) } ) terminator: (Token id:Id.Op_Semi val:';' span_id:2073) ) ] ) (C {(aclput)} {(tmpfile0)}) ] negated: F ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [ (C {(aclget)} {(tmpfile0)}) (command.Simple words: [{(grep)} {(enabled)}] redirects: [ (redir.Redir op: (Token id: Id.Redir_Great val: '>' span_id: 2096 ) fd: -1 arg_word: {(/dev/null)} ) ] ) ] negated: F ) terminator: (Token id:Id.Op_Semi val:';' span_id:2099) ) ] action: [ (C {(func_test_has_acl)} {(tmpfile0)} {(yes)}) (command.Pipeline children: [ (C {(aclget)} {(tmpfile0)}) (C {(grep)} {(-v)} { (SQ (Token id: Id.Lit_Chars val: ' u:[^ ]*$' span_id: 2128 ) ) } ) (C {(aclput)} {(tmpfile0)}) ] negated: F ) (C {(func_test_has_acl)} {(tmpfile0)} {(no)}) ] spids: [2084 2101] ) ] ) ] spids: [2041 2042 2150 -1] ) (case_arm pat_list: [{(macosx)}] action: [ (C {(/bin/chmod)} {(Id.Lit_Other '+') (a)} {(DQ ('user:daemon allow execute'))} {(tmpfile0)} ) (C {(func_test_has_acl)} {(tmpfile0)} {(yes)}) (C {(/bin/chmod)} {(-a)} {(DQ ('user:daemon allow execute'))} {(tmpfile0)} ) (C {(func_test_has_acl)} {(tmpfile0)} {(no)}) ] spids: [2154 2155 2208 -1] ) (case_arm pat_list: [{(irix)}] action: [ (command.Simple words: [ {(/sbin/chacl)} {(user) (Id.Lit_Other ':') (Id.Lit_Other ':') (rw-) (Id.Lit_Comma ',') (group) (Id.Lit_Other ':') (Id.Lit_Other ':') (---) (Id.Lit_Comma ',') (other) (Id.Lit_Other ':') (Id.Lit_Other ':') (---) (Id.Lit_Comma ',') (user) (Id.Lit_Other ':') ($ Id.VSub_DollarName '$auid') (Id.Lit_Other ':') (--x) } {(tmpfile0)} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:2246) fd: 2 arg_word: {(tmp.err)} ) ] ) (command.Simple words: [{(cat)} {(tmp.err)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'1>&' span_id:2255) fd: 1 arg_word: {(2)} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(test)} {(-s)} {(tmp.err)}) terminator: (Token id:Id.Op_Semi val:';' span_id:2266) ) ] action: [ (command.Sentence child: (C {(Id.Lit_Other ':')}) terminator: (Token id:Id.Op_Semi val:';' span_id:2271) ) ] spids: [2259 2268] ) ] else_action: [ (C {(func_test_has_acl)} {(tmpfile0)} {(yes)}) (C {(/sbin/chacl)} {(user) (Id.Lit_Other ':') (Id.Lit_Other ':') (rw-) (Id.Lit_Comma ',') (group) (Id.Lit_Other ':') (Id.Lit_Other ':') (---) (Id.Lit_Comma ',') (other) (Id.Lit_Other ':') (Id.Lit_Other ':') (---) } {(tmpfile0)} ) (C {(func_test_has_acl)} {(tmpfile0)} {(no)}) ] ) ] spids: [2212 2213 2321 -1] ) ] ) ] spids: [1273 1285] ) ] ) (C {(rm)} {(-f)} {(Id.Lit_ArrayLhsOpen 'tmpfile[') (0-9) (Id.Lit_RBracket ']')} {(tmp.err)} ) (C {(rm)} {(-rf)} {(tmpdir0)}) ] ) ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:2353) arg_word: {(1)} ) ] ) (C {(rm)} {(-rf)} {(DQ ($ Id.VSub_DollarName '$tmp'))}) (command.ControlFlow token:(Token id:Id.ControlFlow_Exit val:exit span_id:2366) arg_word:{(0)}) ] )