??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
σ ΰUdac@`sχddlmZmZmZeZdZddlZddlZddl Z ddl Z ddl m Z ddl mZddlmZddlmZddlmZmZdd lmZmZdd lmZeƒZd efd „ƒYZdS( i(tabsolute_importtdivisiontprint_functions author: Maykel Moya connection: chroot short_description: Interact with local chroot description: - Run commands or put/fetch files to an existing chroot on the Ansible controller. version_added: "1.1" options: remote_addr: description: - The path of the chroot you want to access. default: inventory_hostname vars: - name: ansible_host executable: description: - User specified executable shell ini: - section: defaults key: executable env: - name: ANSIBLE_EXECUTABLE vars: - name: ansible_executable default: /bin/sh chroot_exe: version_added: '2.8' description: - User specified chroot binary ini: - section: chroot_connection key: exe env: - name: ANSIBLE_CHROOT_EXE vars: - name: ansible_chroot_exe default: chroot N(t AnsibleError(t is_executable(t get_bin_path(t shlex_quote(tto_bytest to_native(tConnectionBasetBUFSIZE(tDisplayt ConnectioncB`szeZdZdZeZeZdZd„Z d„Z e j d„Z d ed„Zd„Zd„Zd „Zd „ZRS( s Local chroot based connections tchroottrootcO`sάtt|ƒj||||Ž|jj|_tjƒdkrOtdƒ‚ntj j |jƒsztd|jƒ‚ntj j |jdƒ}t |ƒpΏtj j |ƒoΏtj j|ƒsΨtd|jƒ‚ndS(Nis*chroot connection requires running as roots%s is not a directorysbin/shs8%s does not look like a chrootable dir (/bin/sh missing)(tsuperR t__init__t _play_contextt remote_addrR tostgeteuidRtpathtisdirtjoinRtlexiststislink(tselft play_contextt new_stdintargstkwargstchrootsh((sE/usr/lib/python2.7/site-packages/ansible/plugins/connection/chroot.pyRNs0cC`s΅tjj|jdƒƒr0|jdƒ|_nt|jdƒƒ|_|jsstdt|jdƒƒƒ‚ntt |ƒj ƒ|j s±t j dd|jƒt|_ ndS(s connect to the chroot t chroot_exes%chroot command (%s) not found in PATHsTHIS IS A LOCAL CHROOT DIRthostN(RRtisabst get_optiont chroot_cmdRRRRR t_connectt _connectedtdisplaytvvvR tTrue(R((sE/usr/lib/python2.7/site-packages/ansible/plugins/connection/chroot.pyR%cs " c C`sš|jdƒ}|j|j|d|g}tjd|d|jƒg|D]}t|ddƒ^qK}tj|dtd|d tj d tj ƒ}|S( s/ run a command on the chroot. This is only needed for implementing put_file() get_file() so that we don't have to read the whole file into memory. compared to exec_command() it looses some niceties like being able to return the process's exit code immediately. t executables-csEXEC %sR!terrorstsurrogate_or_stricttshelltstdintstdouttstderr( R#R$R R'R(Rt subprocesstPopentFalsetPIPE(RtcmdR.R*t local_cmdtitp((sE/usr/lib/python2.7/site-packages/ansible/plugins/connection/chroot.pyt_buffered_exec_commandrs%cC`sVtt|ƒj|d|d|ƒ|j|ƒ}|j|ƒ\}}|j||fS(s run a command on the chroot tin_datatsudoable(RR t exec_commandR9t communicatet returncode(RR5R:R;R8R/R0((sE/usr/lib/python2.7/site-packages/ansible/plugins/connection/chroot.pyR<„s"cC`sC|jtjjƒs3tjjtjj|ƒ}ntjj|ƒS(s˜ Make sure that we put files into a standard path If a path is relative, then we need to choose where to put it. ssh chooses $HOME but we aren't guaranteed that a home dir will exist in any given chroot. So for now we're choosing "/" instead. This also happens to be the former default. Can revisit using $HOME instead if it's a problem (t startswithRRtsepRtnormpath(Rt remote_path((sE/usr/lib/python2.7/site-packages/ansible/plugins/connection/chroot.pyt_prefix_login_paths c C`sƒtt|ƒj||ƒtjd||fd|jƒt|j|ƒƒ}y tt |ddƒdƒμ}t j |j ƒƒj sd}nd}y&|jd|t|fd |ƒ}Wntk rΫtd ƒ‚nXy|jƒ\}}Wn1tk r%tjƒtd ||fƒ‚nX|jd krTtd ||||fƒ‚nWdQXWn!tk r~td|ƒ‚nXdS(s& transfer a file from local to chroot s PUT %s TO %sR!R+R,trbs count=0tsdd of=%s bs=%s%sR.s3chroot connection requires dd command in the chroots failed to transfer file %s to %sis'failed to transfer file %s to %s: %s %sNs$file or module does not exist at: %s(RR tput_fileR'R(R RRCtopenRRtfstattfilenotst_sizeR9R tOSErrorRR=t Exceptiont tracebackt print_excR>tIOError(Rtin_pathtout_pathtin_filetcountR8R/R0((sE/usr/lib/python2.7/site-packages/ansible/plugins/connection/chroot.pyRF›s*  &   ) c C`sitt|ƒj||ƒtjd||fd|jƒt|j|ƒƒ}y|jd|t fƒ}Wnt k rŠt dƒ‚nXt t |ddƒdƒ½}yB|jjt ƒ}x)|rι|j|ƒ|jjt ƒ}qΑWWn1tk rtjƒt d||fƒ‚nX|jƒ\}}|jd kr_t d ||||fƒ‚nWd QXd S( s# fetch a file from chroot to local sFETCH %s TO %sR!sdd if=%s bs=%ss3chroot connection requires dd command in the chrootR+R,swb+s failed to transfer file %s to %sis'failed to transfer file %s to %s: %s %sN(RR t fetch_fileR'R(R RRCR9R RKRRGRR/treadtwriteRLRMRNR=R>(RRPRQR8tout_filetchunkR/R0((sE/usr/lib/python2.7/site-packages/ansible/plugins/connection/chroot.pyRT΅s&      cC`s tt|ƒjƒt|_dS(s. terminate the connection; nothing to do here N(RR tcloseR3R&(R((sE/usr/lib/python2.7/site-packages/ansible/plugins/connection/chroot.pyRYΝsN(t__name__t __module__t__doc__t transportR)thas_pipeliningR3thas_ttyt default_userRR%R1R4R9tNoneR<RCRFRTRY(((sE/usr/lib/python2.7/site-packages/ansible/plugins/connection/chroot.pyR Bs     (t __future__RRRttypet __metaclass__t DOCUMENTATIONRtos.pathR1RMtansible.errorsRtansible.module_utils.basicRt#ansible.module_utils.common.processRtansible.module_utils.six.movesRtansible.module_utils._textRRtansible.plugins.connectionR R tansible.utils.displayR R'R (((sE/usr/lib/python2.7/site-packages/ansible/plugins/connection/chroot.pyts'