(CommandList children: [ (Case to_match: { (DQ (CommandSubPart command_list: (CommandList children:[(C {(id)})]) left_token: <Left_Backtick '`'> spids: [16 18] ) ) } arms: [ (case_arm pat_list:[{(SQ <'uid=0('>) (Lit_Other '*')}] spids:[23 27 29 16777215]) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (SimpleCommand words: [{(echo)} {(DQ ($ VSub_Number '$0') (': must be run by root'))}] redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [31 32 16777215 49] ) ] spids: [13 21 49] ) (Pipeline children: [ (BraceGroup children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(SQ <EOF>)} here_end_span_id: 143 stdin_parts: [ ('drwxr-xr-x\troot\toperator\t/\n') ('drwxr-xr-x\tbin\toperator\t/bin\n') ('drwxr-xr-x\troot\toperator\t/dev\n') ('drwxr-xr-x\troot\toperator\t/etc\n') ('-rw-r--r--\troot\toperator\t/etc/fstab\n') ('-rw-r--r--\troot\toperator\t/etc/group\n') ('-rw-r--r--\troot\toperator\t/etc/hostname.file\n') ('-rw-r--r--\troot\toperator\t/etc/inet.conf\n') ('-rw-r--r--\troot\toperator\t/etc/motd\n') ('-rw-r--r--\troot\toperator\t/etc/mtab\n') ('-rw-r--r--\troot\toperator\t/etc/passwd\n') ('-rw-r--r--\troot\toperator\t/etc/profile\n') ('-rw-r--r--\troot\toperator\t/etc/protocols\n') ('-rw-r--r--\troot\toperator\t/etc/rc\n') ('-rw-r--r--\troot\toperator\t/etc/services\n') ('-rw-------\troot\toperator\t/etc/shadow\n') ('-rw-r--r--\troot\toperator\t/etc/termcap\n') ('-rw-r--r--\troot\toperator\t/etc/ttytab\n') ('-rw-r--r--\troot\toperator\t/etc/utmp\n') ('dr-xr-xr-x\troot\toperator\t/mnt\n') ('dr-xr-xr-x\troot\toperator\t/root\n') ('drwxrwxrwx\troot\toperator\t/tmp\n') ('drwxr-xr-x\troot\toperator\t/usr\n') ('drwxr-xr-x\troot\toperator\t/usr/adm\n') ('-rw-r--r--\troot\toperator\t/usr/adm/lastlog\n') ('-rw-r--r--\troot\toperator\t/usr/adm/wtmp\n') ('drwxr-xr-x\tast\tother\t\t/usr/ast\n') ('drwxr-xr-x\tbin\toperator\t/usr/bin\n') ('drwxr-xr-x\troot\toperator\t/usr/etc\n') ('drwxr-xr-x\tbin\toperator\t/usr/include\n') ('drwxr-xr-x\tbin\toperator\t/usr/lib\n') ('drwxrwxr-x\troot\toperator\t/usr/local\n') ('drwxrwxr-x\tbin\toperator\t/usr/local/bin\n') ('drwxrwxr-x\tbin\toperator\t/usr/local/include\n') ('drwxrwxr-x\tbin\toperator\t/usr/local/lib\n') ('drwxrwxr-x\tbin\toperator\t/usr/local/man\n') ('drwxrwxr-x\tbin\toperator\t/usr/local/src\n') ('drwxr-xr-x\tbin\toperator\t/usr/man\n') ('drwxr-xr-x\tbin\toperator\t/usr/mdec\n') ('drwx------\troot\toperator\t/usr/preserve\n') ('drwxr-xr-x\troot\toperator\t/usr/run\n') ('drwxr-xr-x\troot\toperator\t/usr/spool\n') ('drwx--x--x\troot\toperator\t/usr/spool/at\n') ('drwx--x--x\troot\toperator\t/usr/spool/at/past\n') ('drwx------\troot\toperator\t/usr/spool/crontabs\n') ('drwxrwxr-x\troot\tuucp\t\t/usr/spool/locks\n') ('drwx------\tdaemon\tdaemon\t\t/usr/spool/lpd\n') ('drwxr-xr-x\tbin\toperator\t/usr/src\n') ('drwxrwxrwx\troot\toperator\t/usr/tmp\n') ('-rwsr-xr-x\troot\t?\t\t/usr/bin/at\n') ('-rwsr-xr-x\troot\t?\t\t/usr/bin/chfn\n') ('-rwsr-xr-x\troot\t?\t\t/usr/bin/chsh\n') ('-rwsr-xr-x\troot\t?\t\t/usr/bin/df\n') ('-rwsr-xr-x\troot\t?\t\t/usr/bin/elvprsv\n') ('-rwsr-xr-x\troot\t?\t\t/usr/bin/elvrec\n') ('-rwsr-xr-x\troot\t?\t\t/usr/bin/format\n') ('-rwsr-xr-x\troot\t?\t\t/usr/bin/hostaddr\n') ('-rwsr-xr-x\troot\t?\t\t/usr/bin/install\n') ('-rwsr-xr-x\tdaemon\t?\t\t/usr/bin/lpd\n') ('-rwsr-xr-x\troot\t?\t\t/usr/bin/mail\n') ('-rwsr-xr-x\troot\t?\t\t/usr/bin/mount\n') ('-rwsr-xr-x\troot\t?\t\t/usr/bin/passwd\n') ('-rwsr-xr-x\troot\t?\t\t/usr/bin/ping\n') ('-rwxr-sr-x\t?\tkmem\t\t/usr/bin/ps\n') ('-rwsr-xr--\troot\t?\t\t/usr/bin/shutdown\n') ('-rwsr-xr-x\troot\t?\t\t/usr/bin/su\n') ('-rwxr-sr-x\t?\tuucp\t\t/usr/bin/term\n') ('-rwsr-xr-x\troot\t?\t\t/usr/bin/umount\n') ('-rwxr-sr-x\t?\ttty\t\t/usr/bin/write\n') ] ) ] ) ] spids: [64] ) (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:banner) op: Equal rhs: { (DQ ( '# List of commands to fix the top level hierarchy. Do not apply these\n' ) ('# commands blindly, but check and repair by hand.\n') ) } spids: [160] ) ] spids: [160] ) (WhileUntil keyword: <KW_While while> cond: [(C {(read)} {(mode)} {(owner)} {(group)} {(file)})] body: (DoGroup children: [ (AndOr ops: [Op_DPipe] children: [ (Subshell child: (CommandList children: [ (C {(set)} {(-) ($ VSub_Hyphen '$-')} { (CommandSubPart command_list: (CommandList children: [ (SimpleCommand words: [{(ls)} {(-ld)} {($ VSub_Name '$file')}] redirects: [ (Redir op: <Redir_Great '2>'> fd: 2 arg_word: {(/dev/null)} ) ] ) ] ) left_token: <Left_Backtick '`'> spids: [197 206] ) } {(SQ )} {(SQ )} {(SQ )} {(SQ )} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:curmode) op: Equal rhs: {($ VSub_Number '$1')} spids: [221] ) (assign_pair lhs: (LhsName name:curowner) op: Equal rhs: {($ VSub_Number '$3')} spids: [224] ) (assign_pair lhs: (LhsName name:curgroup) op: Equal rhs: {($ VSub_Number '$4')} spids: [227] ) ] spids: [221] ) (AndOr ops: [Op_DAmp] children: [ (C {(test)} {($ VSub_Name '$owner')} {(Lit_Other '=')} {(SQ <'?'>)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:curowner) op: Equal rhs: {($ VSub_Name '$owner')} spids: [243] ) ] spids: [243] ) ] ) (AndOr ops: [Op_DAmp] children: [ (C {(test)} {($ VSub_Name '$group')} {(Lit_Other '=')} {(SQ <'?'>)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:curgroup) op: Equal rhs: {($ VSub_Name '$group')} spids: [259] ) ] spids: [259] ) ] ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(x) (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {(DQ ($ VSub_Name '$mode'))} {(Lit_Other ':')} {(SQ <'\\\\(.\\\\)'>)} ) ] ) left_token: <Left_Backtick '`'> spids: [273 285] ) } {(KW_Bang '!') (Lit_Other '=')} {(x) (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {(DQ ($ VSub_Name '$curmode'))} {(Lit_Other ':')} {(SQ <'\\\\(.\\\\)'>)} ) ] ) left_token: <Left_Backtick '`'> spids: [293 305] ) } {(Lit_Other ']')} ) ] action: [ (Case to_match: {($ VSub_Name '$curmode')} arms: [ (case_arm pat_list: [{(Lit_Other '?') (Lit_Other '*')}] action: [ (C {(echo)} { (DQ (${ VSub_Name banner) ('rm -r ') ($ VSub_Name '$file') ) } ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:banner) op: Equal rhs: {(EmptyPart)} spids: [335] ) ] spids: [335] ) ] spids: [320 322 16777215 338] ) ] spids: [313 317 338] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:curmode) op: Equal rhs: {(EmptyPart)} spids: [341] ) (assign_pair lhs: (LhsName name:curowner) op: Equal rhs: {(EmptyPart)} spids: [343] ) (assign_pair lhs: (LhsName name:curgroup) op: Equal rhs: {(EmptyPart)} spids: [345] ) ] spids: [341] ) (Case to_match: {($ VSub_Name '$mode')} arms: [ (case_arm pat_list: [{(d) (Lit_Other '*')}] action: [ (C {(echo)} { (DQ (${ VSub_Name banner) ('mkdir ') ($ VSub_Name '$file') ) } ) ] spids: [355 357 370 16777215] ) (case_arm pat_list: [{(-) (Lit_Other '*')}] action: [ (C {(echo)} { (DQ (${ VSub_Name banner) ('> ') ($ VSub_Name '$file') ) } ) ] spids: [373 375 388 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (SimpleCommand words: [ {(echo)} { (DQ ($ VSub_Number '$0') (': ') ($ VSub_Name '$mode') (' ') ($ VSub_Name '$file') (': unknown filetype') ) } ] redirects: [ (Redir op: <Redir_GreatAnd '>&'> fd: 16777215 arg_word: {(2)} ) ] ) (ControlFlow token: <ControlFlow_Exit exit> arg_word: {(1)} ) ] spids: [391 392 16777215 414] ) ] spids: [348 352 414] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:banner) op: Equal rhs: {(EmptyPart)} spids: [417] ) ] spids: [417] ) ] spids: [16777215 310] ) ] spids: [16777215 420] ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(x) ($ VSub_Name '$mode')} {(KW_Bang '!') (Lit_Other '=')} {(x) ($ VSub_Name '$curmode')} {(Lit_Other ']')} ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:octmode) op: Equal rhs: {(EmptyPart)} spids: [447] ) ] spids: [447] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:m) op: Equal rhs: {($ VSub_Name '$mode')} spids: [450] ) ] spids: [450] ) (ForEach iter_name: i iter_words: [{(u)} {(g)} {(o)}] do_arg_iter: F body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:r) op: Equal rhs: {(0)} spids: [470] ) (assign_pair lhs: (LhsName name:w) op: Equal rhs: {(0)} spids: [473] ) (assign_pair lhs: (LhsName name:x) op: Equal rhs: {(0)} spids: [476] ) ] spids: [470] ) (Case to_match: {($ VSub_Name '$m')} arms: [ (case_arm pat_list: [ {(Lit_Other '?') (r) (Lit_Other '?') (Lit_Other '?') (Lit_Other '*') } ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:r) op: Equal rhs: {(4)} spids: [494] ) ] spids: [494] ) ] spids: [487 492 16777215 498] ) ] spids: [480 484 498] ) (Case to_match: {($ VSub_Name '$m')} arms: [ (case_arm pat_list: [ {(Lit_Other '?') (Lit_Other '?') (w) (Lit_Other '?') (Lit_Other '*') } ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:w) op: Equal rhs: {(2)} spids: [515] ) ] spids: [515] ) ] spids: [508 513 16777215 519] ) ] spids: [501 505 519] ) (Case to_match: {($ VSub_Name '$m')} arms: [ (case_arm pat_list: [ {(Lit_Other '?') (Lit_Other '?') (Lit_Other '?') (Lit_Other '[') (xst) (Lit_Other ']') (Lit_Other '*') } ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:x) op: Equal rhs: {(1)} spids: [538] ) ] spids: [538] ) ] spids: [529 536 16777215 542] ) ] spids: [522 526 542] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:octmode) op: Equal rhs: {($ VSub_Name '$octmode') (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {($ VSub_Name '$r')} {(Lit_Other '+')} {($ VSub_Name '$w')} {(Lit_Other '+')} {($ VSub_Name '$x')} ) ] ) left_token: <Left_Backtick '`'> spids: [547 559] ) } spids: [545] ) ] spids: [545] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:m) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {($ VSub_Name '$m')} {(Lit_Other ':')} {(SQ <'...\\\\(.*\\\\)'>)} ) ] ) left_token: <Left_Backtick '`'> spids: [563 573] ) } spids: [562] ) ] spids: [562] ) ] spids: [467 576] ) spids: [459 16777215] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:r) op: Equal rhs: {(0)} spids: [579] ) (assign_pair lhs: (LhsName name:w) op: Equal rhs: {(0)} spids: [582] ) (assign_pair lhs: (LhsName name:x) op: Equal rhs: {(0)} spids: [585] ) ] spids: [579] ) (Case to_match: {($ VSub_Name '$mode')} arms: [ (case_arm pat_list: [ {(Lit_Other '?') (Lit_Other '?') (Lit_Other '?') (Lit_Other '[') (Lit_VarLike 'sS=') (Lit_Other ']') (Lit_Other '?') (Lit_Other '?') (Lit_Other '?') (Lit_Other '?') (Lit_Other '?') (Lit_Other '?') } ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:r) op: Equal rhs: {(4)} spids: [610] ) ] spids: [610] ) ] spids: [596 608 16777215 614] ) ] spids: [589 593 614] ) (Case to_match: {($ VSub_Name '$mode')} arms: [ (case_arm pat_list: [ {(Lit_Other '?') (Lit_Other '?') (Lit_Other '?') (Lit_Other '?') (Lit_Other '?') (Lit_Other '?') (Lit_Other '[') (Lit_VarLike 'sS=') (Lit_Other ']') (Lit_Other '?') (Lit_Other '?') (Lit_Other '?') } ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:w) op: Equal rhs: {(2)} spids: [638] ) ] spids: [638] ) ] spids: [624 636 16777215 642] ) ] spids: [617 621 642] ) (Case to_match: {($ VSub_Name '$mode')} arms: [ (case_arm pat_list: [ {(Lit_Other '?') (Lit_Other '?') (Lit_Other '?') (Lit_Other '?') (Lit_Other '?') (Lit_Other '?') (Lit_Other '?') (Lit_Other '?') (Lit_Other '?') (Lit_Other '[') (Lit_VarLike 'tT=') (Lit_Other ']') } ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:x) op: Equal rhs: {(1)} spids: [666] ) ] spids: [666] ) ] spids: [652 664 16777215 670] ) ] spids: [645 649 670] ) (Case to_match: {($ VSub_Name '$r') ($ VSub_Name '$w') ($ VSub_Name '$x')} arms: [ (case_arm pat_list: [{(000)}] spids: [682 683 685 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:octmode) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {($ VSub_Name '$r')} {(Lit_Other '+')} {($ VSub_Name '$w')} {(Lit_Other '+')} {($ VSub_Name '$x')} ) ] ) left_token: <Left_Backtick '`'> spids: [692 704] ) ($ VSub_Name '$octmode') } spids: [691] ) ] spids: [691] ) ] spids: [688 689 16777215 708] ) ] spids: [673 679 708] ) (C {(echo)} { (DQ (${ VSub_Name banner) ('chmod ') ($ VSub_Name '$octmode') (' ') ($ VSub_Name '$file') ) } ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:banner) op: Equal rhs: {(EmptyPart)} spids: [725] ) ] spids: [725] ) ] spids: [16777215 444] ) ] spids: [16777215 728] ) (If arms: [ (if_arm cond: [ (C {(Lit_Other '[')} {(x) ($ VSub_Name '$owner')} {(KW_Bang '!') (Lit_Other '=')} {(x) ($ VSub_Name '$curowner')} {(-o)} {(x) ($ VSub_Name '$group')} {(KW_Bang '!') (Lit_Other '=')} {(x) ($ VSub_Name '$curgroup')} {(Lit_Other ']')} ) ] action: [ (C {(echo)} { (DQ (${ VSub_Name banner) ('chown ') ($ VSub_Name '$owner') (':') ($ VSub_Name '$group') (' ') ($ VSub_Name '$file') ) } ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:banner) op: Equal rhs: {(EmptyPart)} spids: [781] ) ] spids: [781] ) ] spids: [16777215 763] ) ] spids: [16777215 784] ) (C {(wait)}) (Case to_match: {(DQ ($ VSub_Name '$banner'))} arms: [ (case_arm pat_list: [{(SQ )}] action: [ (ControlFlow token: <ControlFlow_Exit exit> arg_word: {(1)} ) ] spids: [804 806 811 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (ControlFlow token: <ControlFlow_Exit exit> arg_word: {(0)} ) ] spids: [813 814 819 16777215] ) ] spids: [796 802 821] ) ] ) spids: [185 822] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:banner) op: Equal rhs: {(EmptyPart)} spids: [826] ) ] spids: [826] ) ] ) ] spids: [182 829] ) ) (Case to_match: {(DQ ($ VSub_Name '$banner'))} arms: [ (case_arm pat_list: [{(SQ )}] action: [(ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})] spids: [841 843 16777215 850] ) ] spids: [832 838 850] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] spids: [149] ) ] negated: F ) ] )