ok

Mini Shell

Direktori : /proc/self/root/proc/self/root/proc/self/root/lib/python2.7/site-packages/isc/
Upload File :
Current File : //proc/self/root/proc/self/root/proc/self/root/lib/python2.7/site-packages/isc/keymgr.pyc

�
���cc@s�ddlmZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZdZddl
mZmZmZmZmZmZd�Zdd�Zd�Zd	�ZdS(
i����(tprint_functionN(tdefaultdicts
dnssec-keymgr(tdnskeytkeydictt	keyseriestpolicytparsetabtutilscOst||�tjd�dS(Ni(tprinttsystexit(targstkwargs((s./usr/lib/python2.7/site-packages/isc/keymgr.pytfatals
cCs�|}|s6tjj|�s6tj|tj�r�tjd}|sXtjj}nx_|jtj�D]H}|tj	|}tjj|�r�tj|tj�r�Pnd}qkWn|S(s2 find the location of a specified command. If a default is supplied,
    exists and it's an executable, we use it; otherwise we search PATH
    for an alternative.
    :param command: command to look for
    :param default: default value to use
    :return: PATH with the location of a suitable binary
    tPATHN(tostpathtisfiletaccesstX_OKtenvirontdefpathtsplittpathseptseptNone(tcommandtdefaulttfpathRt	directory((s./usr/lib/python2.7/site-packages/isc/keymgr.pytset_paths0
'
cCs�tdtjjtjd�d��}tdtjjtjd�d��}tjdtd�}|j	ddt
dd	d
d:ddd
�|j	ddddt
dddd�|j	ddddt
dddd�|j	dddd
|dt
dddd�|j	ddddt
d
d:dddd�|j	dddd
|dt
dd dd�|j	d!dd"d#d$d
tdd%�|j	d&dd'd#d$d
tdd(�|j	d)d*dd+d#d$d
tdd,d-�|j	d.d/dd0d#d$d
tdd1�|j	d2d3d#d4d4tj
�|j�}|jr@|jr@td5�n|jd:kr\td6�n|jd:krxtd7�n|jd:k	r�tjj|j�s�td8|j�q�n<tjjtjd9�|_tjj|j�s�d:|_n|S(;sc Read command line arguments, returns 'args' object
    :return: args object properly prepared
    s
dnssec-keygentsbinsdnssec-settimetdescriptionsA: schedule DNSSEC key rollovers according to a pre-defined policytzonettypetnargst*Rthelps.Zone(s) to which the policy should be applied s%(default: all zones in the directory)s-KtdestRsDirectory containing keystmetavartdirs-ct
policyfilesPolicy definition filetfiles-gtkeygensPath to 'dnssec-keygen's-rt	randomdevs@Path to a file containing random data to pass to 'dnssec-keygen's-stsettimesPath to 'dnssec-settime's-ktno_zsktactiont
store_trues,Only apply policy to key-signing keys (KSKs)s-ztno_ksks-Only apply policy to zone-signing keys (ZSKs)s-fs--forcetforcesForce updates to key events seven if they are in the pasts-qs--quiettquietsUpdate keys silentlys-vs	--versiontversions)ERROR: -z and -k cannot be used together.sERROR: dnssec-keygen not foundsERROR: dnssec-settime not founds!ERROR: Policy file "%s" not foundsdnssec-policy.confN(RRRtjoinRtprefixtargparsetArgumentParsertprogtadd_argumenttstrRtFalseR4t
parse_argsR.R1R
R+R-R)texistst
sysconfdir(R+R-tparserR((s./usr/lib/python2.7/site-packages/isc/keymgr.pyR=6sb!!

	




c
Csft�}i|jd6|jd6|jd6|jd6}ytj|j�}Wn'tk
rv}t	dt
|��nXy"t|d|jd|j�}Wn'tk
r�}t	dt
|��nXyt
|d	|�}Wn'tk
r}t	d
t
|��nXy5|j|d|jd|jd
|jd|j�Wn'tk
ra}t	dt
|��nXdS(Ntkeygen_pathtsettime_patht	keys_pathR,sUnable to load DNSSEC policy: Rtzoness Unable to build key dictionary: tcontextsUnable to build key series: tksktzskR2R3sUnable to apply policy: (R=R+R-RR,Rt
dnssec_policyR)t	ExceptionR
R;RR!Rtenforce_policyR.R1R2R3(RREtdptetkdtks((s./usr/lib/python2.7/site-packages/isc/keymgr.pytmain}s,	



"(t
__future__RRR	R7tglobtrettimetcalendartpprinttcollectionsRR9tiscRRRRRRR
RRR=RO(((s./usr/lib/python2.7/site-packages/isc/keymgr.pyt<module>s`.		G

Zerion Mini Shell 1.0