(command.CommandList children: [ (command.ShAssignment left: <Id.Lit_VarLike 'PIDDIR='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'PIDDIR='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'PIDDIR='> name:PIDDIR) op: assign_op.Equal rhs: {<'/var/run/samba'>} ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'SAMBAPID='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'SAMBAPID='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SAMBAPID='> name:SAMBAPID) op: assign_op.Equal rhs: {($ Id.VSub_DollarName PIDDIR) <'/samba.pid'>} ) ] redirects: [] ) (command.Simple blame_tok: <unset> more_env: [] words: [{<unset>} {<TMPDIR>}] redirects: [] do_fork: T ) (command.AndOr children: [ (command.Simple blame_tok: <test> more_env: [] words: [{<test>} {<-x>} {<'/usr/sbin/samba'>} {<-a>} {<-r>} {<'/etc/samba/smb.conf'>}] redirects: [] do_fork: T ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<0>}) ] ops: [<Id.Op_DPipe _>] ) (command.Simple blame_tok: <.> more_env: [] words: [{<.>} {<'/lib/lsb/init-functions'>}] redirects: [] do_fork: T ) (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.ShAssignment left: <Id.Lit_VarLike 'SERVER_ROLE='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'SERVER_ROLE='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SERVER_ROLE='> name:SERVER_ROLE) op: assign_op.Equal rhs: { (CommandSub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (command.Simple blame_tok: <samba-tool> more_env: [] words: [ {<samba-tool>} {<testparm>} {<--parameter-name> <Id.Lit_Equals '='> (DQ <'server role'>)} ] redirects: [ (Redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (command.Simple blame_tok: <tail> more_env: [] words: [{<tail>} {<-1>}] redirects: [] do_fork: T ) ] ops: [<Id.Op_Pipe _>] ) right: <Id.Backtick_Right '`'> ) } ) ] 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 '['>} {(DQ ($ Id.VSub_DollarName SERVER_ROLE))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <'active directory domain controller'>)} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [(command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<0>})] spids: [123 141] ) ] 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: <init_is_upstart> more_env: [] words: [{<init_is_upstart>}] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [(command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>})] spids: [153 158] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'KEYFILE='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'KEYFILE='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'KEYFILE='> name:KEYFILE) op: assign_op.Equal rhs: {<'/var/lib/samba/private/tls/key.pem'>} ) ] redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<-e>} {($ Id.VSub_DollarName KEYFILE)} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) ] ) then_kw: <Id.KW_Then then> action: [ (command.ShAssignment left: <Id.Lit_VarLike 'KEYPERMS='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'KEYPERMS='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'KEYPERMS='> name:KEYPERMS) op: assign_op.Equal rhs: { (CommandSub left_token: <Id.Left_Backtick '`'> child: (command.Simple blame_tok: <stat> more_env: [] words: [ {<stat>} {<-c>} {<Id.Lit_Other '%'> <a>} {($ Id.VSub_DollarName KEYFILE)} ] redirects: [] do_fork: T ) right: <Id.Backtick_Right '`'> ) } ) ] redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName KEYPERMS))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <600>)} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} { (DQ <'wrong permission on '> ($ Id.VSub_DollarName KEYFILE) <', must be 600'> ) } ] redirects: [] do_fork: T ) (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(DQ <'samba will not start (CVE-2013-4475)'>)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} { (DQ < 'Removing all tls .pem files will cause an auto-regeneration with the correct permissions.' > ) } ] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [207 225] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) ] spids: [178 189] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.Simple blame_tok: <log_daemon_msg> more_env: [] words: [{<log_daemon_msg>} {(DQ <'Starting Samba AD DC daemon'>)} {(DQ <samba>)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <install> more_env: [] words: [ {<install>} {<-o>} {<root>} {<-g>} {<root>} {<-m>} {<755>} {<-d>} {($ Id.VSub_DollarName PIDDIR)} ] 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: <start-stop-daemon> more_env: [] words: [ {<start-stop-daemon>} {<--start>} {<--quiet>} {<--oknodo>} {<--exec>} {<'/usr/sbin/samba'>} {<-->} {<-D>} ] 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: [298 319] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.Simple blame_tok: <log_end_msg> more_env: [] words: [{<log_end_msg>} {<0>}] redirects: [] do_fork: T ) ] right: <Id.Op_DSemi _> ) (CaseArm left: <stop> pattern: (pat.Words words:[{<stop>}]) 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.Simple blame_tok: <init_is_upstart> more_env: [] words: [{<init_is_upstart>}] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [(command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<0>})] spids: [348 353] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.Simple blame_tok: <log_daemon_msg> more_env: [] words: [{<log_daemon_msg>} {(DQ <'Stopping Samba AD DC daemon'>)} {(DQ <samba>)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <start-stop-daemon> more_env: [] words: [ {<start-stop-daemon>} {<--stop>} {<--quiet>} {<--pidfile>} {($ Id.VSub_DollarName SAMBAPID)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <sleep> more_env: [] words: [{<sleep>} {<1>}] redirects: [] do_fork: T ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.AndOr children: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<-f>} {($ Id.VSub_DollarName SAMBAPID)} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) (command.Pipeline negated: <Id.KW_Bang '!'> children: [ (command.Simple blame_tok: <ps> more_env: [] words: [ {<ps>} {<h>} { (CommandSub left_token: <Id.Left_Backtick '`'> child: (command.Simple blame_tok: <cat> more_env: [] words: [{<cat>} {($ Id.VSub_DollarName SAMBAPID)}] redirects: [] do_fork: T ) right: <Id.Backtick_Right '`'> ) } ] redirects: [ (Redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) ] ops: [] ) ] ops: [<Id.Op_DAmp _>] ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <rm> more_env: [] words: [{<rm>} {<-f>} {($ Id.VSub_DollarName SAMBAPID)}] redirects: [] do_fork: T ) ] spids: [396 427] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.Simple blame_tok: <log_end_msg> more_env: [] words: [{<log_end_msg>} {<0>}] redirects: [] do_fork: T ) ] right: <Id.Op_DSemi _> ) (CaseArm left: <restart> pattern: (pat.Words words:[{<restart>} {<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.Simple blame_tok: <init_is_upstart> more_env: [] words: [{<init_is_upstart>}] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [(command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>})] spids: [464 469] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.Simple blame_tok: <Id.VSub_Number '$0'> more_env: [] words: [{($ Id.VSub_Number 0)} {<stop>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <sleep> more_env: [] words: [{<sleep>} {<1>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <Id.VSub_Number '$0'> more_env: [] words: [{($ Id.VSub_Number 0)} {<start>}] 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: <status_of_proc> more_env: [] words: [ {<status_of_proc>} {<-p>} {($ Id.VSub_DollarName SAMBAPID)} {<'/usr/sbin/samba'>} {<samba>} ] redirects: [] do_fork: T ) (command.ControlFlow keyword: <Id.ControlFlow_Exit exit> arg_word: {($ Id.VSub_QMark '?')} ) ] 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: <echo> more_env: [] words: [ {<echo>} {(DQ <'Usage: /etc/init.d/samba-ad-dc {start|stop|restart|force-reload|status}'>)} ] redirects: [] do_fork: T ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] right: <Id.Op_DSemi _> ) ] arms_end: <Id.KW_Esac esac> redirects: [] ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<0>}) ] )