�
i��dP
� �t � d dl mZmZmZmZ d dlmZmZ G d� de� Z G d� dee� Z G d� deee� Z
y )
� )�Plugin�RedHatPlugin�DebianPlugin�UbuntuPlugin)�join�normpathc �2 � e Zd ZdZdZdZdZeZd� Zd� Z d� Z
y) �NamedzBIND named server�named)�system�services�network�/etc/named.confc �> � | j ddg� | j D ]{ }| j |� s�| j || j |� g� | j t | j |� d� t | j |� d� g� �} y )Nz/etc/default/bindz/var/log/named*.logz
chroot/devzchroot/proc)�
add_copy_spec�config_files�path_exists�get_dns_dir�add_forbidden_pathr )�self�cfgs �:/usr/lib/python3/dist-packages/sos/report/plugins/named.py�setupzNamed.setup s� � �����!�
� � �$�$� �C�����$��"�"���$�$�S�)�$� � �'�'���)�)�#�.��=���)�)�#�.�
�>�)� �
� c �H � | j d|� }|rt |d � S y)z3 grab directory path from named{conf,boot}
zdirectory\s+\"(.*)\"r � )�do_regex_find_allr )r �config_file�directory_lists r r zNamed.get_dns_dir& |