| Server IP : 195.114.193.97 / Your IP : 216.73.217.93 Web Server : LiteSpeed System : Linux host 5.15.0-126-generic #136-Ubuntu SMP Wed Nov 6 10:38:22 UTC 2024 x86_64 User : sembi4241 ( 1126) PHP Version : 8.1.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /proc/self/root/lib/python3/dist-packages/cloudinit/__pycache__/ |
Upload File : |
o
쑛h� � @ s� d dl Z d dlZd dlZd dlZd dlZd dlZd dlmZ e�e �Z
dZdZdde
fdd�Zdde
fd d
�Zdd� Ze jdd
d��Zdde
fdd�Zdde
fdd�ZdS )� N)�utilz/run/cloud-init/tmpz/var/tmp/cloud-initF� needs_exec C s2 | d ur| S |r
t S t�� dkrtS tj�dd�S )Nr �TMPDIRz/tmp)�_EXE_ROOT_TMPDIR�os�getuid�_ROOT_TMPDIR�environ�get)�odirr � r �6/usr/lib/python3/dist-packages/cloudinit/temp_utils.py�get_tmp_ancestor s r c C sL t | |�}tj�|�st�|� t�|d� |r$t�|d�r$t� 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� �noexeczDRequested temporal dir with exe permission `%s` is mounted as noexec)
r r �path�isdir�makedirs�chmodr �
has_mount_opt�LOG�warning)r r �tdirr r r
�_tempfile_dir_arg s
�r c sD t � | d<