(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:[24 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_id:Redir_GreatAnd fd:16777215 arg_word:{(2)} spids:[41])] ) (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_id: Redir_DLess fd: 16777215 body: {('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') } do_expansion: False here_end: EOF was_filled: T spids: [69] ) ] ) ] 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: [90] ) ] spids: [90] ) (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_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [134] ) ] ) ] ) left_token: <Left_Backtick '`'> spids: [127 136] ) } {(SQ )} {(SQ )} {(SQ )} {(SQ )} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:curmode) op: Equal rhs: {($ VSub_Number '$1')} spids: [151] ) (assign_pair lhs: (LhsName name:curowner) op: Equal rhs: {($ VSub_Number '$3')} spids: [154] ) (assign_pair lhs: (LhsName name:curgroup) op: Equal rhs: {($ VSub_Number '$4')} spids: [157] ) ] spids: [151] ) (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: [173] ) ] spids: [173] ) ] ) (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: [189] ) ] spids: [189] ) ] ) (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: [203 215] ) } {(KW_Bang '!') (Lit_Other '=')} {(x) (CommandSubPart command_list: (CommandList children: [ (C {(expr)} {(DQ ($ VSub_Name '$curmode'))} {(Lit_Other ':')} {(SQ <'\\\\(.\\\\)'>)} ) ] ) left_token: <Left_Backtick '`'> spids: [223 235] ) } {(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: [265] ) ] spids: [265] ) ] spids: [250 252 16777215 268] ) ] spids: [243 247 268] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:curmode) op: Equal rhs: {(EmptyPart)} spids: [271] ) (assign_pair lhs: (LhsName name:curowner) op: Equal rhs: {(EmptyPart)} spids: [273] ) (assign_pair lhs: (LhsName name:curgroup) op: Equal rhs: {(EmptyPart)} spids: [275] ) ] spids: [271] ) (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: [285 287 300 16777215] ) (case_arm pat_list: [{(-) (Lit_Other '*')}] action: [ (C {(echo)} { (DQ (${ VSub_Name banner) ('> ') ($ VSub_Name '$file') ) } ) ] spids: [303 305 318 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_id: Redir_GreatAnd fd: 16777215 arg_word: {(2)} spids: [335] ) ] ) (ControlFlow token: <ControlFlow_Exit exit> arg_word: {(1)} ) ] spids: [321 322 16777215 344] ) ] spids: [278 282 344] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:banner) op: Equal rhs: {(EmptyPart)} spids: [347] ) ] spids: [347] ) ] spids: [16777215 240] ) ] spids: [16777215 350] ) (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: [377] ) ] spids: [377] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:m) op: Equal rhs: {($ VSub_Name '$mode')} spids: [380] ) ] spids: [380] ) (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: [400] ) (assign_pair lhs: (LhsName name:w) op: Equal rhs: {(0)} spids: [403] ) (assign_pair lhs: (LhsName name:x) op: Equal rhs: {(0)} spids: [406] ) ] spids: [400] ) (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: [424] ) ] spids: [424] ) ] spids: [417 422 16777215 428] ) ] spids: [410 414 428] ) (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: [445] ) ] spids: [445] ) ] spids: [438 443 16777215 449] ) ] spids: [431 435 449] ) (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: [468] ) ] spids: [468] ) ] spids: [459 466 16777215 472] ) ] spids: [452 456 472] ) (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: [477 489] ) } spids: [475] ) ] spids: [475] ) (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: [493 503] ) } spids: [492] ) ] spids: [492] ) ] spids: [397 506] ) spids: [389 16777215] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:r) op: Equal rhs: {(0)} spids: [509] ) (assign_pair lhs: (LhsName name:w) op: Equal rhs: {(0)} spids: [512] ) (assign_pair lhs: (LhsName name:x) op: Equal rhs: {(0)} spids: [515] ) ] spids: [509] ) (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: [540] ) ] spids: [540] ) ] spids: [526 538 16777215 544] ) ] spids: [519 523 544] ) (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: [568] ) ] spids: [568] ) ] spids: [554 566 16777215 572] ) ] spids: [547 551 572] ) (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: [596] ) ] spids: [596] ) ] spids: [582 594 16777215 600] ) ] spids: [575 579 600] ) (Case to_match: {($ VSub_Name '$r') ($ VSub_Name '$w') ($ VSub_Name '$x')} arms: [ (case_arm pat_list: [{(000)}] spids: [612 613 615 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: [622 634] ) ($ VSub_Name '$octmode') } spids: [621] ) ] spids: [621] ) ] spids: [618 619 16777215 638] ) ] spids: [603 609 638] ) (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: [655] ) ] spids: [655] ) ] spids: [16777215 374] ) ] spids: [16777215 658] ) (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: [711] ) ] spids: [711] ) ] spids: [16777215 693] ) ] spids: [16777215 714] ) (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: [16777215 736 741 16777215] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (ControlFlow token: <ControlFlow_Exit exit> arg_word: {(0)} ) ] spids: [743 744 749 16777215] ) ] spids: [726 732 751] ) ] ) spids: [115 752] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:banner) op: Equal rhs: {(EmptyPart)} spids: [756] ) ] spids: [756] ) ] ) ] spids: [112 759] ) ) (Case to_match: {(DQ ($ VSub_Name '$banner'))} arms: [ (case_arm pat_list: [{(SQ )}] action: [(ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})] spids: [16777215 773 16777215 780] ) ] spids: [762 768 780] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] spids: [79] ) ] negated: F ) ] )