/usr/lib/python3.9/site-packages/isc/__pycache__
NameSizeModeActions
checkds.cpython-39.opt-1.pyc41760644editdlrm
checkds.cpython-39.pyc41760644editdlrm
coverage.cpython-39.opt-1.pyc63750644editdlrm
coverage.cpython-39.pyc63750644editdlrm
dnskey.cpython-39.opt-1.pyc134170644editdlrm
dnskey.cpython-39.pyc134170644editdlrm
eventlist.cpython-39.opt-1.pyc38360644editdlrm
eventlist.cpython-39.pyc38360644editdlrm
keydict.cpython-39.opt-1.pyc26130644editdlrm
keydict.cpython-39.pyc26130644editdlrm
keyevent.cpython-39.opt-1.pyc19140644editdlrm
keyevent.cpython-39.pyc19140644editdlrm
keymgr.cpython-39.opt-1.pyc41500644editdlrm
keymgr.cpython-39.pyc41500644editdlrm
keyseries.cpython-39.opt-1.pyc46690644editdlrm
keyseries.cpython-39.pyc46690644editdlrm
keyzone.cpython-39.opt-1.pyc12820644editdlrm
keyzone.cpython-39.pyc12820644editdlrm
parsetab.cpython-39.opt-1.pyc97530644editdlrm
parsetab.cpython-39.pyc97530644editdlrm
policy.cpython-39.opt-1.pyc186200644editdlrm
policy.cpython-39.pyc186200644editdlrm
rndc.cpython-39.opt-1.pyc51720644editdlrm
rndc.cpython-39.pyc51720644editdlrm
utils.cpython-39.opt-1.pyc12290644editdlrm
utils.cpython-39.pyc12290644editdlrm
__init__.cpython-39.opt-1.pyc4860644editdlrm
__init__.cpython-39.pyc4860644editdlrm
Edit: /usr/lib/python3.9/site-packages/isc/__pycache__/keymgr.cpython-39.pyc (4150B)
a ŠÀªj†ã@s¢ddlmZddlZddlZddlZddlZddlZddlZddlZddl Z ddl m Z dZ ddl mZmZmZmZmZmZdd„Zddd „Zd d „Zd d „ZdS)é)Úprint_functionN)Ú defaultdictz dnssec-keymgr)ÚdnskeyÚkeydictÚ keyseriesÚpolicyÚparsetabÚutilscOst|i|¤Žt d¡dS)Né)ÚprintÚsysÚexit)ÚargsÚkwargs©rú./usr/lib/python3.9/site-packages/isc/keymgr.pyÚfatalsrcCs~|}|r"tj |¡r"t |tj¡sztjd}|s8tjj}| tj¡D]4}|tj |}tj |¡rtt |tj¡rtqzd}qD|S)a2 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 ÚPATHN) ÚosÚpathÚisfileÚaccessÚX_OKÚenvironÚdefpathÚsplitÚpathsepÚsep)ZcommandÚdefaultZfpathrZ directoryrrrÚset_paths rcCsÚtdtj t d¡d¡ƒ}tdtj t d¡d¡ƒ}tjtdd�}|j dt ddd d �|j d d t d dd�|j ddt ddd�|j dd|t dd d�|j ddt ddd d�|j dd|t dd d�|j dd d!d"d#d$�|j d%d&d!d"d'd$�|j d(d)d*d!d"d+d$�|j d,d-d.d!d"d/d$�|j d0d1d2tj d3�|  ¡}|j �rBtd4ƒ|j�rZ|j�rZtd5ƒ|jdu�rntd6ƒ|jdu�r‚td7ƒ|jdu�r®tj |j¡�sÖtd8|jƒn(tj tjd9¡|_tj |j¡�sÖd|_|S):zc Read command line arguments, returns 'args' object :return: args object properly prepared z dnssec-keygenZsbinzdnssec-settimezA: schedule DNSSEC key rollovers according to a pre-defined policy)Ú descriptionÚzoneÚ*NzSZone(s) to which the policy should be applied (default: all zones in the directory))ÚtypeÚnargsrÚhelpz-KrzDirectory containing keysÚdir)Údestr#r%Úmetavarz-cÚ policyfilezPolicy definition fileÚfilez-gÚkeygenzPath to 'dnssec-keygen')r'rr#r%r(z-rÚ randomdevZ DEPRECATED)r'r#rr%r(z-sÚsettimezPath to 'dnssec-settime'z-kÚno_zskÚ store_trueFz,Only apply policy to key-signing keys (KSKs))r'Úactionrr%z-zÚno_kskz-Only apply policy to zone-signing keys (ZSKs)z-fz--forceÚforcez8Force updates to key events even if they are in the pastz-qz--quietÚquietzUpdate keys silentlyz-vz --versionÚversion)r0r4z%ERROR: -r option has been deprecated.z)ERROR: -z and -k cannot be used together.zERROR: dnssec-keygen not foundzERROR: dnssec-settime not foundz!ERROR: Policy file "%s" not foundzdnssec-policy.conf)rrrÚjoinr ÚprefixÚargparseÚArgumentParserÚprogÚ add_argumentÚstrr4Ú parse_argsr,rr.r1r+r-r)ÚexistsZ sysconfdir)r+r-Úparserrrrrr<6s~ÿÿ ÿ ÿ ÿ þ þ þþþ ÿ ÿ ÿ    ÿr<c CsPtƒ}|j|j|j|jdœ}zt |j¡}Wn4ty`}zt dt |ƒƒWYd}~n d}~00zt ||j|j d�}Wn4ty¬}zt dt |ƒƒWYd}~n d}~00zt ||d�}Wn4tyò}zt dt |ƒƒWYd}~n d}~00z |j||j|j|j|jd�Wn6t�yJ}zt dt |ƒƒWYd}~n d}~00dS) N)Z keygen_pathZ settime_pathZ keys_pathr,zUnable to load DNSSEC policy: )rZzonesz Unable to build key dictionary: )ÚcontextzUnable to build key series: )ZkskZzskr2r3zUnable to apply policy: )r<r+r-rr,rZ dnssec_policyr)Ú Exceptionrr;rr!rZenforce_policyr.r1r2r3)rr?ZdpÚeZkdÚksrrrÚmain€s0ý&&&ÿ rC)N)Z __future__rrr r7ÚglobÚreÚtimeZcalendarZpprintÚ collectionsrr9Ziscrrrrrr rrr<rCrrrrÚ s @   J