Linux box325.rapidenet.ca 5.14.0-687.25.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jul 13 11:40:33 EDT 2026 x86_64
LiteSpeed
Server IP : 68.168.116.250 & Your IP : 216.73.216.215
Domains :
Cant Read [ /etc/named.conf ]
User : protectionrat
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
lib /
python3.9 /
site-packages /
rhn /
__pycache__ /
Delete
Unzip
Name
Size
Permission
Date
Action
__init__.cpython-39.opt-1.pyc
214
B
-rw-r--r--
2026-06-25 18:54
__init__.cpython-39.pyc
214
B
-rw-r--r--
2026-06-25 18:54
connections.cpython-39.opt-1.pyc
700
B
-rw-r--r--
2026-06-25 18:54
connections.cpython-39.pyc
700
B
-rw-r--r--
2026-06-25 18:54
i18n.cpython-39.opt-1.pyc
878
B
-rw-r--r--
2026-06-25 18:54
i18n.cpython-39.pyc
878
B
-rw-r--r--
2026-06-25 18:54
rhnLockfile.cpython-39.opt-1.pyc
3.14
KB
-rw-r--r--
2026-06-25 18:54
rhnLockfile.cpython-39.pyc
3.14
KB
-rw-r--r--
2026-06-25 18:54
rpclib.cpython-39.opt-1.pyc
4.06
KB
-rw-r--r--
2026-06-25 18:54
rpclib.cpython-39.pyc
4.06
KB
-rw-r--r--
2026-06-25 18:54
transports.cpython-39.opt-1.pyc
3.41
KB
-rw-r--r--
2026-06-25 18:54
transports.cpython-39.pyc
3.41
KB
-rw-r--r--
2026-06-25 18:54
Save
Rename
a 0Q=j. � @ s� d dl Z d dlZd dlZd dlZd dlmZmZ d dlmZ d dlZG dd� de �Z G dd� d�Zdd � Ze d kr�e�e� p~d � dS )� N)�EWOULDBLOCK�EEXIST)�bstrc @ s e Zd ZdZdS )�LockfileLockedExceptionz$thrown ONLY when pid file is locked.N)�__name__� __module__�__qualname__�__doc__� r r �3/usr/lib/python3.9/site-packages/rhn/rhnLockfile.pyr s r c @ s* e Zd ZdZd dd�Zdd� Zdd� ZdS ) �Lockfilez�class that provides simple access to a PID-style lockfile. methods: __init__(lockfile), acquire(), and release() NOTE: currently acquires upon init The *.pid file will be acquired, or an LockfileLockedException is raised. Nc C s t j�t j�t j�|���| _|| _| js4t �� | _t j�| j�}t j� |�s�zt � |� W n6 ty� t� � d }t|d�r�|jtkr�n� Y n0 t �| jt jt jB t jB t jB t jB d�| _t �| j�}t�|j�r�|jt �� k�rt �| j� td| jt �� |j|jf ��| �� dS )zlcreate (if need be), and acquire lock on lockfile lockfile example: '/var/run/up2date.pid' � �errnoi� zSrefusing to use lockfile %s: not a regular file owned by uid %d (mode 0o%o, uid %d)N) �os�path�abspath� expanduser� expandvars�lockfile�pid�getpid�dirname�exists�makedirs�OSError�sys�exc_info�hasattrr r �open�O_RDWR�O_CREAT�O_SYNC� O_NOFOLLOW� O_CLOEXEC�f�fstat�stat�S_ISREG�st_mode�st_uid�geteuid�close�acquire)�selfr r r �e�str r r �__init__% sD �� �����zLockfile.__init__c C s� zt �| jt jt jB � W nB ty\ t�� d jt krVt d| j dt�� d ��n� Y n0 t � | jt jd� t �| jd� t �| jtt| j�d �� dS )z5acquire the lock; else raise LockfileLockedException.r zcannot acquire lock on %s.N� r � )�fcntl�flockr$ ZLOCK_EXZLOCK_NB�IOErrorr r r r r r ZF_SETFDr � ftruncate�writer �strr )r- r r r r, ^ s �zLockfile.acquirec C s| z4t �| j�}t �| j�}|j|jko0|j|jk}W n tyJ d}Y n0 |r\t �| j� t � | jt j� t �| j� d S )NF) r r% r$ �lstatr �st_dev�st_inor �unlinkr3 r4 ZLOCK_UNr+ )r- Zfd_stZpath_stZ same_inoder r r �releaseo s � zLockfile.release)N)r r r r r0 r, r= r r r r r s 9r c C sx zt d�} W n4 ty@ tj�dt�� d � t�d� Y n40 td� td� ddl}|� d � | � � td � dS )z test codez ./test.pidz%s r ���zlock acquired z...sleeping for 10 secondsr N� zlock released )r r r �stderrr7 r �exit�print�time�sleepr= )�LrC r r r �main� s rF �__main__)r r r&