HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux ip-10-0-8-47 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:31:58 UTC 2024 aarch64
User: ubuntu (1000)
PHP: 8.1.2-1ubuntu2.22
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/sos/cleaner/mappings/__pycache__/username_map.cpython-310.pyc
o

���b�@s ddlmZGdd�de�ZdS)�)�SoSMapc@s$eZdZdZdZdd�Zdd�ZdS)�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.
    rcCs*|D]}|r||j��vr|�|�qdS)N)�dataset�keys�add)�self�	opt_names�name�r
�C/usr/lib/python3/dist-packages/sos/cleaner/mappings/username_map.py�load_names_from_optionss

��z&SoSUsernameMap.load_names_from_optionscCs8d|j}|jd7_||j��vr|�|���S|S)z@Obfuscate a new username not currently found in the map
        zobfuscateduser%s�)�
name_countr�values�
sanitize_item�lower)r�username�ob_namer
r
rrs

zSoSUsernameMap.sanitize_itemN)�__name__�
__module__�__qualname__�__doc__rrrr
r
r
rrs
rN)�sos.cleaner.mappingsrrr
r
r
r�<module>s