%PDF- %PDF-
Direktori : /lib/python3/dist-packages/cloudinit/__pycache__/ |
Current File : //lib/python3/dist-packages/cloudinit/__pycache__/temp_utils.cpython-312.pyc |
� �f� � �� � d dl Z d dlZd dlZd dlZd dlZd dlZd dlmZ ej e � Z dadZdZ ddefd�Zddefd�Zd� Ze j$ d d �� Zddefd �Zddefd�Zy)� N)�utilz/run/cloud-init/tmpz/var/tmp/cloud-init� needs_exec � � | �| S |rt S t rt S t j � dk( rt S t j j dd� S )Nr �TMPDIRz/tmp)�_EXE_ROOT_TMPDIR�_TMPDIR�os�getuid�_ROOT_TMPDIR�environ�get)�odirr s �6/usr/lib/python3/dist-packages/cloudinit/temp_utils.py�get_tmp_ancestorr sG � ����������� �y�y�{�a���� �:�:�>�>�(�F�+�+� c � � t | |� }t j j |� s+t j |� t j |d� |r,t j |d� rt j d|� | �|s|a |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�warningr )r r �tdirs r �_tempfile_dir_argr st � � �D�)�,�D� �7�7�=�=��� ���D�� ����v������d�H�-��K�K�%�� � �|�I����Kr c �� �� t | j dd � | j dd� � | d<