| Server IP : 192.250.235.158 / Your IP : 216.73.216.4 Web Server : LiteSpeed System : Linux s4099.sgp1.stableserver.net 5.14.0-503.21.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Jan 12 09:45:05 EST 2025 x86_64 User : vmxfzbqj ( 1905) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib/python3.9/site-packages/cloudinit/__pycache__/ |
Upload File : |
a
'�Dg� � @ s� d dl Z d dlZd dlZd dlZd dlZd dlZd dlmZ e�e �Z
dZdZde
d�dd�Zde
d�d d
�Zdd� Ze jdd
d��Zde
d�dd�Zde
d�dd�ZdS )� N)�utilz/run/cloud-init/tmpz/var/tmp/cloud-initF)� needs_exec C s2 | d ur| S |rt S t�� dkr$tS tj�dd�S )Nr ZTMPDIRz/tmp)�_EXE_ROOT_TMPDIR�os�getuid�_ROOT_TMPDIR�environ�get)�odirr � r �8/usr/lib/python3.9/site-packages/cloudinit/temp_utils.py�get_tmp_ancestor s r
c C sL t | |�}tj�|�s,t�|� t�|d� |rHt�|d�rHt� d|� |S )a% Return the proper 'dir' argument for tempfile functions.
When root, cloud-init will use /run/cloud-init/tmp to avoid
any cleaning that a distro boot might do on /tmp (such as
systemd-tmpfiles-clean).
If the caller of this function (mkdtemp or mkstemp) was provided
with a 'dir' argument, then that is respected.
@param odir: original 'dir' arg to 'mkdtemp' or other.
@param needs_exe: Boolean specifying whether or not exe permissions are
needed for tempdir. This is needed because /run is mounted noexec.
i� ZnoexeczDRequested temporal dir with exe permission `%s` is mounted as noexec)
r
r �path�isdir�makedirs�chmodr Z
has_mount_opt�LOGZwarning)r
r �tdirr r r �_tempfile_dir_arg s
�r c sD t � | d<