| Server IP : 198.38.94.13 / Your IP : 216.73.217.33 Web Server : Apache System : Linux d4744.dxb1.stableserver.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64 User : revivere ( 1140) PHP Version : 8.2.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib/python3.9/site-packages/ipapython/__pycache__/ |
Upload File : |
a
�ji6 � @ s� d Z ddlZddlZddlZddlZddlmZ ddlmZ ddlm Z ddl
mZ dZdZ
dZe�e�Zd d
� ZG dd� de�ZG d
d� d�ZdS )z�A common framework for command-line admin tools, e.g. install scripts
Handles common operations like option parsing and logging
� N)�osinfo)�version)�config)�standard_logging_setup� � c C s
ddl }ddl}z�|�|j�d��}|jdu r4W dS |�|j��|d�}t |�d }g }dt
| �v rn| �� }ndt
| �v r�| j}|D ]h}t
|dd �r�t
||j�} td|�D ]@}
|�||
|j�j�d
�}|| kr�|�||
td�t | �� q�q�W n t�y Y n0 dS )a� Takes option parser and generated options and scrubs sensitive arguments
from the global program arguments. Note that this only works for GNU GLIBC
as Python has no generic way to get access to the original argv values to
modify them in place.
The code assumes Python behavior, e.g. there are two additional args in the
list (/path/to/python -I ...) than what's passed as 'argv' here.
r N�cZ_dl_argvr �_get_all_options�_actionsZ sensitiveFzutf-8�X)�ctypesZctypes.utilZCDLL�utilZfind_library�_nameZPOINTERZc_voidpZin_dll�len�dirr r
�getattr�dest�range�castZc_char_p�value�decodeZmemset�ord� Exception)�
option_parser�options�argvr Z_cZ_argvZ_argcZall_options�opt�v�i�vi� r �7/usr/lib/python3.9/site-packages/ipapython/admintool.py�admin_cleanup_global_argv* s4
��"r"