403Webshell
Server IP : 61.19.30.66  /  Your IP : 216.73.216.15
Web Server : Apache/2.2.22 (Ubuntu)
System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64
User : www-data ( 33)
PHP Version : 5.3.10-1ubuntu3.48
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python2.7/dist-packages/landscape/manager/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.7/dist-packages/landscape/manager/aptsources.pyc
ó
}9Rc@s¸ddlZddlZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZddlm
Z
defd„ƒYZdefd	„ƒYZdS(
iÿÿÿÿN(tsucceed(t
spawn_process(t
ManagerPlugin(tfind_reporter_commandtProcessErrorcBseZdZRS(s.Exception raised when running a process fails.(t__name__t
__module__t__doc__(((s@/usr/lib/python2.7/dist-packages/landscape/manager/aptsources.pyRst
AptSourcescBsheZdZdZdZd„Zddd„Zd„Zd„Z	d„Z
d„Zd	„Zd
„Z
RS(s'A plugin managing sources.list content.s/etc/apt/sources.lists/etc/apt/sources.list.dcCs-tt|ƒj|ƒ|jd|jƒdS(Nsapt-sources-replace(tsuperRtregistertregister_messaget_handle_repositories(tselftregistry((s@/usr/lib/python2.7/dist-packages/landscape/manager/aptsources.pyR
s	cCst||d|d|ƒS(sW
        Run the process in an asynchronous fashion, to be overriden in tests.
        tuidtgid(R(R
tcommandtargsRR((s@/usr/lib/python2.7/dist-packages/landscape/manager/aptsources.pyt_run_processscCs2|\}}}|r.td||fƒ‚ndS(sQ
        Turn a failed process command (code != 0) to a C{ProcessError}.
        s%s
%sN(R(R
tresulttoutterrtcode((s@/usr/lib/python2.7/dist-packages/landscape/manager/aptsources.pyt_handle_process_error%scCsB|jtƒs:|j\}}}td||fƒ‚n|SdS(sG
        Turn a signaled process command to a C{ProcessError}.
        s%s
%sN(tcheckRtvalue(R
tfailureRRtsignal((s@/usr/lib/python2.7/dist-packages/landscape/manager/aptsources.pyt_handle_process_failure-scCstj|ƒ|S(sd
        Remove the temporary file created for the process, and forward the
        result.
        (tostunlink(R
tpassthroughtpath((s@/usr/lib/python2.7/dist-packages/landscape/manager/aptsources.pyt_remove_and_continue7s
csâtdƒ‰x“|dD]‡}tjƒ\}}tj|ƒt|dƒ}|j|ƒ|jƒˆj|‡fd†ƒˆjˆj	ƒˆj
ˆj|ƒqWˆjˆj
ƒˆjˆj|dƒˆj|‡fd†ƒS(sE
        Handle a list of repositories to set on the machine.

        The format is the following:

        {"sources": [
          {"name": "repository-name",
           "content":
              "deb http://archive.ubuntu.com/ubuntu/ maverick main
              "deb-src http://archive.ubuntu.com/ubuntu/ maverick main"}
          {"name": "repository-name-dev",
           "content":
              "deb http://archive.ubuntu.com/ubuntu/ maverick universe
              "deb-src http://archive.ubuntu.com/ubuntu/ maverick universe"}],
         "gpg-keys": ["-----BEGIN PGP PUBLIC KEY BLOCK-----
                      XXXX
                      -----END PGP PUBLIC KEY BLOCK-----",
                      "-----BEGIN PGP PUBLIC KEY BLOCK-----
                      YYY
                      -----END PGP PUBLIC KEY BLOCK-----"]}
        sgpg-keystwcsˆjdd|gƒS(Ns/usr/bin/apt-keytadd(R(tignoreR!(R
(s@/usr/lib/python2.7/dist-packages/landscape/manager/aptsources.pyt<lambda>]stsourcescsˆS(N(((tdeferred(s@/usr/lib/python2.7/dist-packages/landscape/manager/aptsources.pyR&csN(RtNonettempfiletmkstempRtclosetfiletwritetaddCallbackRtaddBothR"t
addErrbackRt_handle_sourcestcall_with_operation_result(R
tmessagetkeytfdR!tkey_file((R
R(s@/usr/lib/python2.7/dist-packages/landscape/manager/aptsources.pyR?s


cCs­tjƒ\}}tj|ƒt|dƒ}xZt|jƒD]I}|jƒ}|sf|jdƒrv|j|ƒq>|jd|ƒq>W|jƒtj	|jƒ}t
j||jƒtj|j|j
ƒtj|j|j|jƒx=tjtjj|jdƒƒD]}	t
j|	d|	ƒqWxh|D]`}
tjj|jd|
dƒ}	t|	dƒ}|j|
dƒ|jƒtj|	d	ƒq3W|jƒjd
„ƒS(sHandle sources repositories.R#t#s#%ss*.lists%s.saveslandscape-%s.listtnametcontenti¤cSsdS(N(R)(tignored((s@/usr/lib/python2.7/dist-packages/landscape/manager/aptsources.pyR&s(R*R+RR,R-tSOURCES_LISTtstript
startswithR.tstattshutiltmovetchmodtst_modetchowntst_uidtst_gidtglobR!tjointSOURCES_LIST_Dt
_run_reporterR/(R
R;R'R6R!tnew_sourcestlinet
stripped_linet
original_stattfilenametsourcetsources_file((s@/usr/lib/python2.7/dist-packages/landscape/manager/aptsources.pyR2es.

(

cCs¥tƒ}dg}|jjjdk	rD|jd|jjjƒntjƒdkr}tjdƒj	}t
jdƒj}nd}d}|j
||d|d|ƒS(s;Once the repositories are modified, trigger a reporter run.s--force-apt-updates--config=%sit	landscapeRRN(RRtconfigR)tappendRtgetuidtpwdtgetpwnamtpw_uidtgrptgetgrnamtgr_gidR(R
treporterRRR((s@/usr/lib/python2.7/dist-packages/landscape/manager/aptsources.pyRJƒs		N(RRRR<RIR
R)RRRR"RR2RJ(((s@/usr/lib/python2.7/dist-packages/landscape/manager/aptsources.pyRs			
		&	(RGRRVRYR@R*ttwisted.internet.deferRtlandscape.lib.twisted_utilRtlandscape.manager.pluginRtlandscape.package.reporterRt	ExceptionRR(((s@/usr/lib/python2.7/dist-packages/landscape/manager/aptsources.pyt<module>s

Youez - 2016 - github.com/yon3zu
LinuXploit