(command.CommandList children: [ (command.Simple blame_tok: <.> more_env: [] words: [{<.>} {<'/lib/apparmor/functions'>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <.> more_env: [] words: [{<.>} {<'/lib/lsb/init-functions'>}] redirects: [] do_fork: T ) (command.ShFunction name_tok: <usage> name: usage body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} { (DQ <'Usage: '> ($ Id.VSub_Number 0) <' {start|stop|restart|reload|force-reload|status|recache}'> ) } ] redirects: [] do_fork: T ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.AndOr children: [ (command.Simple blame_tok: <test> more_env: [] words: [{<test>} {<-x>} {(${ Id.VSub_Name PARSER)}] redirects: [] do_fork: T ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<0>}) ] ops: [<Id.Op_DPipe _>] ) (command.AndOr children: [ (command.Simple blame_tok: <test> more_env: [] words: [{<test>} {<-d>} {<'/sys/module/apparmor'>}] redirects: [] do_fork: T ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<0>}) ] ops: [<Id.Op_DPipe _>] ) (command.ShFunction name_tok: <securityfs> name: securityfs body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-d>} {(DQ (${ Id.VSub_Name AA_SFS))} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Pipeline children: [ (command.Simple blame_tok: <cut> more_env: [] words: [ {<cut>} {<-d> (DQ <' '>)} {<-f2> <Id.Lit_Comma ','> <3>} {<'/proc/mounts'>} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <grep> more_env: [] words: [ {<grep>} {<-q>} {(DQ <'^'> (${ Id.VSub_Name SECURITYFS) <' securityfs'>) (SQ <'$'>) } ] redirects: [] do_fork: T ) ] ops: [<Id.Op_Pipe _>] ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <log_action_msg> more_env: [] words: [ {<log_action_msg>} {(DQ <'AppArmor not available as kernel LSM.'>)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <log_end_msg> more_env: [] words: [{<log_end_msg>} {<1>}] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [191 225] ) ] else_kw: <Id.KW_Else else> else_action: [ (command.Simple blame_tok: <log_action_begin_msg> more_env: [] words: [ {<log_action_begin_msg>} {(DQ <'Mounting securityfs on '> (${ Id.VSub_Name SECURITYFS))} ] redirects: [] do_fork: T ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Pipeline negated: <Id.KW_Bang '!'> children: [ (command.Simple blame_tok: <mount> more_env: [] words: [ {<mount>} {<-t>} {<securityfs>} {<none>} {(DQ (${ Id.VSub_Name SECURITYFS))} ] redirects: [] do_fork: T ) ] ops: [] ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <log_action_end_msg> more_env: [] words: [{<log_action_end_msg>} {<1>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <log_end_msg> more_env: [] words: [{<log_end_msg>} {<1>}] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [258 277] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) ] fi_kw: <Id.KW_Fi fi> redirects: [] ) ] spids: [171 188] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-w>} {(DQ ($ Id.VSub_DollarName AA_SFS)) <'/.load'>} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <log_action_msg> more_env: [] words: [{<log_action_msg>} {(DQ <'Insufficient privileges to change profiles.'>)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <log_end_msg> more_env: [] words: [{<log_end_msg>} {<1>}] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [304 320] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name_tok: <handle_system_policy_package_updates> name: handle_system_policy_package_updates body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.ShAssignment left: <Id.Lit_VarLike 'apparmor_was_updated='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'apparmor_was_updated='> lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'apparmor_was_updated='> name: apparmor_was_updated ) op: assign_op.Equal rhs: {<0>} ) ] redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Pipeline negated: <Id.KW_Bang '!'> children: [ (command.Simple blame_tok: <compare_previous_version> more_env: [] words: [{<compare_previous_version>}] redirects: [] do_fork: T ) ] ops: [] ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <clear_cache_system> more_env: [] words: [{<clear_cache_system>}] redirects: [] do_fork: T ) (command.ShAssignment left: <Id.Lit_VarLike 'apparmor_was_updated='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'apparmor_was_updated='> lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'apparmor_was_updated='> name: apparmor_was_updated ) op: assign_op.Equal rhs: {<1>} ) ] redirects: [] ) ] spids: [357 365] ) (IfArm keyword: <Id.KW_Elif elif> cond: (condition.Shell commands: [ (command.Sentence child: (command.Pipeline negated: <Id.KW_Bang '!'> children: [ (command.Simple blame_tok: <compare_and_save_debsums> more_env: [] words: [{<compare_and_save_debsums>} {<apparmor>}] redirects: [] do_fork: T ) ] ops: [] ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <clear_cache> more_env: [] words: [{<clear_cache>}] redirects: [] do_fork: T ) (command.ShAssignment left: <Id.Lit_VarLike 'apparmor_was_updated='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'apparmor_was_updated='> lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'apparmor_was_updated='> name: apparmor_was_updated ) op: assign_op.Equal rhs: {<1>} ) ] redirects: [] ) ] spids: [395 405] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.AndOr children: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<-x>} {<'/usr/bin/aa-clickhook'>} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<-x>} {<'/usr/bin/aa-profile-hook'>} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) ] ops: [<Id.Op_DPipe _>] ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.ShAssignment left: <Id.Lit_VarLike 'force_clickhook='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'force_clickhook='> lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'force_clickhook='> name: force_clickhook ) op: assign_op.Equal rhs: {<0>} ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'force_profile_hook='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'force_profile_hook='> lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'force_profile_hook='> name: force_profile_hook ) op: assign_op.Equal rhs: {<0>} ) ] redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Pipeline negated: <Id.KW_Bang '!'> children: [ (command.Simple blame_tok: <compare_and_save_debsums> more_env: [] words: [ {<compare_and_save_debsums>} {<apparmor-easyprof-ubuntu>} ] redirects: [] do_fork: T ) ] ops: [] ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.ShAssignment left: <Id.Lit_VarLike 'force_clickhook='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'force_clickhook='> lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'force_clickhook='> name: force_clickhook ) op: assign_op.Equal rhs: {<1>} ) ] redirects: [] ) ] spids: [484 494] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Pipeline negated: <Id.KW_Bang '!'> children: [ (command.Simple blame_tok: <compare_and_save_debsums> more_env: [] words: [ {<compare_and_save_debsums>} {<apparmor-easyprof-ubuntu-snappy>} ] redirects: [] do_fork: T ) ] ops: [] ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.ShAssignment left: <Id.Lit_VarLike 'force_clickhook='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'force_clickhook='> lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'force_clickhook='> name: force_clickhook ) op: assign_op.Equal rhs: {<1>} ) ] redirects: [] ) ] spids: [504 514] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Pipeline negated: <Id.KW_Bang '!'> children: [ (command.Simple blame_tok: <compare_and_save_debsums> more_env: [] words: [{<compare_and_save_debsums>} {<click-apparmor>}] redirects: [] do_fork: T ) ] ops: [] ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.ShAssignment left: <Id.Lit_VarLike 'force_clickhook='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'force_clickhook='> lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'force_clickhook='> name: force_clickhook ) op: assign_op.Equal rhs: {<1>} ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'force_profile_hook='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'force_profile_hook='> lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'force_profile_hook='> name: force_profile_hook ) op: assign_op.Equal rhs: {<1>} ) ] redirects: [] ) ] spids: [524 534] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.AndOr children: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<-x>} {<'/usr/bin/aa-clickhook'>} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) (command.Subshell left: <Id.Op_LParen _> child: (command.AndOr children: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName force_clickhook)} {<-eq>} {<1>} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName apparmor_was_updated)} {<-eq>} {<1>} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) ] ops: [<Id.Op_DPipe _>] ) right: <Id.Right_Subshell _> redirects: [] ) ] ops: [<Id.Op_DAmp _>] ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <aa-clickhook> more_env: [] words: [{<aa-clickhook>} {<-f>}] redirects: [] do_fork: T ) ] spids: [548 586] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.AndOr children: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<-x>} {<'/usr/bin/aa-profile-hook'>} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) (command.Subshell left: <Id.Op_LParen _> child: (command.AndOr children: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName force_profile_hook)} {<-eq>} {<1>} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName apparmor_was_updated)} {<-eq>} {<1>} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) ] ops: [<Id.Op_DPipe _>] ) right: <Id.Right_Subshell _> redirects: [] ) ] ops: [<Id.Op_DAmp _>] ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <aa-profile-hook> more_env: [] words: [{<aa-profile-hook>} {<-f>}] redirects: [] do_fork: T ) ] spids: [597 635] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) ] spids: [443 465] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_Number 1))} {<Id.Lit_Equals '='>} {(DQ <recache>)} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <log_daemon_msg> more_env: [] words: [{<log_daemon_msg>} {(DQ <'Recaching AppArmor profiles'>)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <recache_profiles> more_env: [] words: [{<recache_profiles>}] redirects: [] do_fork: T ) (command.ShAssignment left: <Id.Lit_VarLike 'rc='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'rc='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'rc='> name:rc) op: assign_op.Equal rhs: {($ Id.VSub_QMark '?')} ) ] redirects: [] ) (command.Simple blame_tok: <log_end_msg> more_env: [] words: [{<log_end_msg>} {(DQ ($ Id.VSub_DollarName rc))}] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {($ Id.VSub_DollarName rc)} ) ] spids: [654 671] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.AndOr children: [ (command.Simple blame_tok: <test> more_env: [] words: [{<test>} {<-d>} {<'/rofs/etc/apparmor.d'>}] redirects: [] do_fork: T ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<0>}) ] ops: [<Id.Op_DAmp _>] ) (command.ShAssignment left: <Id.Lit_VarLike 'rc='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'rc='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'rc='> name:rc) op: assign_op.Equal rhs: {<255>} ) ] redirects: [] ) (command.Case case_kw: <Id.KW_Case case> to_match: (case_arg.Word w:{(DQ ($ Id.VSub_Number 1))}) arms_start: <Id.KW_In in> arms: [ (CaseArm left: <start> pattern: (pat.Words words:[{<start>}]) middle: <Id.Right_CasePat _> action: [ (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.AndOr children: [ (command.Simple blame_tok: <systemd-detect-virt> more_env: [] words: [{<systemd-detect-virt>} {<--quiet>} {<--container>}] redirects: [] do_fork: T ) (command.Pipeline negated: <Id.KW_Bang '!'> children: [ (command.Simple blame_tok: <is_container_with_internal_policy> more_env: [] words: [{<is_container_with_internal_policy>}] redirects: [] do_fork: T ) ] ops: [] ) ] ops: [<Id.Op_DAmp _>] ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <log_daemon_msg> more_env: [] words: [{<log_daemon_msg>} {(DQ <'Not starting AppArmor in container'>)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <log_end_msg> more_env: [] words: [{<log_end_msg>} {<0>}] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<0>} ) ] spids: [734 751] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.Simple blame_tok: <log_daemon_msg> more_env: [] words: [{<log_daemon_msg>} {(DQ <'Starting AppArmor profiles'>)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <securityfs> more_env: [] words: [{<securityfs>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <handle_system_policy_package_updates> more_env: [] words: [{<handle_system_policy_package_updates>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <load_configured_profiles> more_env: [] words: [{<load_configured_profiles>}] redirects: [] do_fork: T ) (command.ShAssignment left: <Id.Lit_VarLike 'rc='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'rc='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'rc='> name:rc) op: assign_op.Equal rhs: {($ Id.VSub_QMark '?')} ) ] redirects: [] ) (command.Simple blame_tok: <log_end_msg> more_env: [] words: [{<log_end_msg>} {(DQ ($ Id.VSub_DollarName rc))}] redirects: [] do_fork: T ) ] right: <Id.Op_DSemi _> ) (CaseArm left: <stop> pattern: (pat.Words words:[{<stop>}]) middle: <Id.Right_CasePat _> action: [ (command.Simple blame_tok: <log_daemon_msg> more_env: [] words: [{<log_daemon_msg>} {(DQ <'Clearing AppArmor profiles cache'>)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <clear_cache> more_env: [] words: [{<clear_cache>}] redirects: [] do_fork: T ) (command.ShAssignment left: <Id.Lit_VarLike 'rc='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'rc='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'rc='> name:rc) op: assign_op.Equal rhs: {($ Id.VSub_QMark '?')} ) ] redirects: [] ) (command.Simple blame_tok: <log_end_msg> more_env: [] words: [{<log_end_msg>} {(DQ ($ Id.VSub_DollarName rc))}] redirects: [] do_fork: T ) (command.Simple blame_tok: <cat> more_env: [] words: [{<cat>}] redirects: [ (Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>}) (Redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOM>} here_end_tok: <Id.Undefined_Tok ''> stdin_parts: [ < 'All profile caches have been cleared, but no profiles have been unloaded.\n' > <'Unloading profiles will leave already running processes permanently\n'> <'unconfined, which can lead to unexpected situations.\n'> <'\n'> <'To set a process to complain mode, use the command line tool\n'> <'\'aa-complain\'. To really tear down all profiles, run the init script\n'> <'with the \'teardown\' option.'> <Id.Right_DoubleQuote '"'> <'\n'> ] ) ) ] do_fork: T ) ] right: <Id.Op_DSemi _> ) (CaseArm left: <teardown> pattern: (pat.Words words:[{<teardown>}]) middle: <Id.Right_CasePat _> action: [ (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.AndOr children: [ (command.Simple blame_tok: <systemd-detect-virt> more_env: [] words: [{<systemd-detect-virt>} {<--quiet>} {<--container>}] redirects: [] do_fork: T ) (command.Pipeline negated: <Id.KW_Bang '!'> children: [ (command.Simple blame_tok: <is_container_with_internal_policy> more_env: [] words: [{<is_container_with_internal_policy>}] redirects: [] do_fork: T ) ] ops: [] ) ] ops: [<Id.Op_DAmp _>] ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <log_daemon_msg> more_env: [] words: [{<log_daemon_msg>} {(DQ <'Not tearing down AppArmor in container'>)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <log_end_msg> more_env: [] words: [{<log_end_msg>} {<0>}] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<0>} ) ] spids: [856 873] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.Simple blame_tok: <log_daemon_msg> more_env: [] words: [{<log_daemon_msg>} {(DQ <'Unloading AppArmor profiles'>)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <securityfs> more_env: [] words: [{<securityfs>}] redirects: [] do_fork: T ) (command.Pipeline children: [ (command.Simple blame_tok: <running_profile_names> more_env: [] words: [{<running_profile_names>}] redirects: [] do_fork: T ) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <read> more_env: [] words: [{<read>} {<profile>}] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) body: (command.DoGroup left: <Id.KW_Do do> children: [ (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Pipeline negated: <Id.KW_Bang '!'> children: [ (command.Simple blame_tok: <unload_profile> more_env: [] words: [ {<unload_profile>} {(DQ ($ Id.VSub_DollarName profile))} ] redirects: [] do_fork: T ) ] ops: [] ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <log_end_msg> more_env: [] words: [{<log_end_msg>} {<1>}] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [920 932] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) ] right: <Id.KW_Done done> ) redirects: [] ) ] ops: [<Id.Op_Pipe _>] ) (command.ShAssignment left: <Id.Lit_VarLike 'rc='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'rc='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'rc='> name:rc) op: assign_op.Equal rhs: {<0>} ) ] redirects: [] ) (command.Simple blame_tok: <log_end_msg> more_env: [] words: [{<log_end_msg>} {($ Id.VSub_DollarName rc)}] redirects: [] do_fork: T ) ] right: <Id.Op_DSemi _> ) (CaseArm left: <restart> pattern: (pat.Words words:[{<restart>} {<reload>} {<force-reload>}]) middle: <Id.Right_CasePat _> action: [ (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.AndOr children: [ (command.Simple blame_tok: <systemd-detect-virt> more_env: [] words: [{<systemd-detect-virt>} {<--quiet>} {<--container>}] redirects: [] do_fork: T ) (command.Pipeline negated: <Id.KW_Bang '!'> children: [ (command.Simple blame_tok: <is_container_with_internal_policy> more_env: [] words: [{<is_container_with_internal_policy>}] redirects: [] do_fork: T ) ] ops: [] ) ] ops: [<Id.Op_DAmp _>] ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <log_daemon_msg> more_env: [] words: [{<log_daemon_msg>} {(DQ <'Not reloading AppArmor in container'>)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <log_end_msg> more_env: [] words: [{<log_end_msg>} {<0>}] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<0>} ) ] spids: [971 988] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.Simple blame_tok: <log_daemon_msg> more_env: [] words: [{<log_daemon_msg>} {(DQ <'Reloading AppArmor profiles'>)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <securityfs> more_env: [] words: [{<securityfs>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <clear_cache> more_env: [] words: [{<clear_cache>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <load_configured_profiles> more_env: [] words: [{<load_configured_profiles>}] redirects: [] do_fork: T ) (command.ShAssignment left: <Id.Lit_VarLike 'rc='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'rc='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'rc='> name:rc) op: assign_op.Equal rhs: {($ Id.VSub_QMark '?')} ) ] redirects: [] ) (command.Simple blame_tok: <log_end_msg> more_env: [] words: [{<log_end_msg>} {(DQ ($ Id.VSub_DollarName rc))}] redirects: [] do_fork: T ) ] right: <Id.Op_DSemi _> ) (CaseArm left: <status> pattern: (pat.Words words:[{<status>}]) middle: <Id.Right_CasePat _> action: [ (command.Simple blame_tok: <securityfs> more_env: [] words: [{<securityfs>}] redirects: [] do_fork: T ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<-x>} {<'/usr/sbin/aa-status'>} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <aa-status> more_env: [] words: [{<aa-status>} {<--verbose>}] redirects: [] do_fork: T ) ] spids: [1049 1060] ) ] else_kw: <Id.KW_Else else> else_action: [ (command.Simple blame_tok: <cat> more_env: [] words: [{<cat>} {(DQ ($ Id.VSub_DollarName AA_SFS)) <'/profiles'>}] redirects: [] do_fork: T ) ] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'rc='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'rc='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'rc='> name:rc) op: assign_op.Equal rhs: {($ Id.VSub_QMark '?')} ) ] redirects: [] ) ] right: <Id.Op_DSemi _> ) (CaseArm left: <Id.Lit_Star '*'> pattern: (pat.Words words:[{<Id.Lit_Star '*'>}]) middle: <Id.Right_CasePat _> action: [ (command.Simple blame_tok: <usage> more_env: [] words: [{<usage>}] redirects: [] do_fork: T ) (command.ShAssignment left: <Id.Lit_VarLike 'rc='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'rc='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'rc='> name:rc) op: assign_op.Equal rhs: {<1>} ) ] redirects: [] ) ] right: <Id.Op_DSemi _> ) ] arms_end: <Id.KW_Esac esac> redirects: [] ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{($ Id.VSub_DollarName rc)}) ] )