o
    i©¹dX  ã                   @   s    d dl mZ G dd„ deƒZdS )é    )ÚSoSMapc                   @   s   e Zd ZdZdZdd„ ZdS )ÚSoSUsernameMapa  Mapping to store usernames matched from ``lastlog`` output.

    Usernames are obfuscated as ``obfuscateduserX`` where ``X`` is a counter
    that gets incremented for every new username found.

    Note that this specifically obfuscates user_names_ and not UIDs.
    r   c                 C   s8   d| j  }|  j d7  _ || j ¡ v r|  | ¡ ¡S |S )z@Obfuscate a new username not currently found in the map
        zobfuscateduser%sé   )Ú
name_countÚdatasetÚvaluesÚsanitize_itemÚlower)ÚselfÚusernameÚob_name© r   úC/usr/lib/python3/dist-packages/sos/cleaner/mappings/username_map.pyr      s
   
zSoSUsernameMap.sanitize_itemN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r      s    r   N)Úsos.cleaner.mappingsr   r   r   r   r   r   Ú<module>   s   
