U
    -Ø_gª  ã                   @   s&   d dl mZmZ G dd„ deeƒZdS )é    )ÚPluginÚRedHatPluginc                   @   s$   e Zd ZdZdZdZdZdd„ ZdS )ÚTigerVNCa‰  
    This plugin gathers information for VNC servers provided by the tigervnc
    package. This is explicitly for server-side collections, not clients.

    By default, this plugin will capture the contents of /etc/tigervnc, which
    may include usernames. If usernames are sensitive information for end
    users of sos, consider using the `--clean` option to obfuscate these
    names.
    zTigerVNC server configurationZtigervnc)ztigervnc-serverc                 C   sj   |   d¡ |  d¡}|d dkr\|d  ¡ D ].}| ¡ }|s>q,|  |d ¡ |  |d ¡ q,|  d¡ d S )Nz/etc/tigervnc/z:systemctl list-units --type=service --no-legend vncserver*Zstatusr   Úoutputzvncserver -list)Zadd_copy_specZexec_cmdÚ
splitlinesÚsplitZadd_service_statusZadd_journalZadd_cmd_output)ÚselfZvncsZservZvnc© r	   ú=/usr/lib/python3/dist-packages/sos/report/plugins/tigervnc.pyÚsetup   s    
ÿzTigerVNC.setupN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Z
short_descZplugin_nameZpackagesr   r	   r	   r	   r
   r      s
   
r   N)Zsos.report.pluginsr   r   r   r	   r	   r	   r
   Ú<module>   s   