HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //proc/self/root/lib/python3/dist-packages/sos/report/plugins/__pycache__/named.cpython-38.pyc
U

i��dP
�@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)�system�servicesZnetwork�/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/dist-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�matchZsubstrrr�postproc0szNamed.postprocN)�__name__�
__module__�__qualname__Z
short_descZplugin_nameZprofilesrr
rrrrrrrr
s
rcs0eZdZdZdZedfZdZ�fdd�Z�ZS)�RedHatNamedr)rz/etc/named.boot�/etc/sysconfig/named)Zbindcs:tt|���|�d�|�d�|�d�|�d�dS)Nz/etc/named/rzklist -ket /etc/named.keytabz/etc/named.keytab)�superrrrZadd_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$rrrrrrrPs
zDebianNamed.setup)	rrrr!r"rr
rr#rrrrr$Gs�r$N)Zsos.report.pluginsrrrr�os.pathrrrrr$rrrr�<module>	s)