HEX
Server: Apache
System: Linux insrv.serversdaddy.com 5.14.0-362.24.2.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Mar 30 14:11:54 EDT 2024 x86_64
User: jsaha (1066)
PHP: 8.3.6
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib/python3.9/site-packages/sos/report/plugins/__pycache__/named.cpython-39.opt-1.pyc
a

^��cP
�@sbddlmZmZmZmZddlmZmZGdd�de�ZGdd�dee�Z	Gdd�deee�Z
d	S)
�)�Plugin�RedHatPlugin�DebianPlugin�UbuntuPlugin)�join�normpathc@s8eZdZdZdZdZdZeZdd�Zdd�Z	d	d
�Z
dS)�NamedzBIND named serverZnamed)�systemZservicesZnetwork�/etc/named.confcCsb|�ddg�|jD]H}|�|�r|�||�|�g�|�t|�|�d�t|�|�d�g�qdS)Nz/etc/default/bindz/var/log/named*.logz
chroot/devzchroot/proc)�
add_copy_spec�config_filesZpath_exists�get_dns_dir�add_forbidden_pathr)�selfZcfg�r�</usr/lib/python3.9/site-packages/sos/report/plugins/named.py�setups�

��zNamed.setupcCs$|�d|�}|rt|d�SdSdS)z3 grab directory path from named{conf,boot}
        zdirectory\s+\"(.*)\"r�N)Zdo_regex_find_allr)rZconfig_fileZdirectory_listrrrr
&s�zNamed.get_dns_dircCsd}d}|�|j||�dS)Nz(\s*arg \"password )[^\"]*z\1******)Zdo_file_sub�
named_conf)r�match�substrrr�postproc0szNamed.postprocN)�__name__�
__module__�__qualname__Z
short_descZplugin_nameZprofilesrrrr
rrrrrr
s
rcs0eZdZdZdZedfZdZ�fdd�Z�ZS)�RedHatNamedr
)r
z/etc/named.boot�/etc/sysconfig/named)Zbindcs:tt|���|�d�|�d�|�d�|�d�dS)Nz/etc/named/rzklist -ket /etc/named.keytabz/etc/named.keytab)�superrrrZadd_cmd_outputr�r��	__class__rrr>s



zRedHatNamed.setup)	rrrrr�files�packagesr�
__classcell__rrrrr6s
rcs2eZdZdZdZdZeddfZ�fdd�Z�ZS)�DebianNamed)�/etc/bind/named.conf)Zbind9r%z/etc/bind/named.conf.optionsz/etc/bind/named.conf.localcstt|���|�d�dS)Nz
/etc/bind/)rr$rrrrrrrPs
zDebianNamed.setup)	rrrr!r"rrrr#rrrrr$Gs�r$N)Zsos.report.pluginsrrrrZos.pathrrrrr$rrrr�<module>	s)