U
    ÝÁ]`  ã                   @   sÐ   d Z ddlmZ ddlT ddlZddlZeje Z	e
eƒD ] Zee	eƒs:ee	eeeeƒƒ q:ddlmZ eejed < [	[[dd„ Zd	d
„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ ZdS )a$  
This compat modules is a wrapper of the core os module that forbids usage of specific operations
(e.g. chown, chmod, getuid) that would be harmful to the Windows file security model of Certbot.
This module is intended to replace standard os module throughout certbot projects (except acme).
é    )Úabsolute_import)Ú*N)Ú_pathz.pathc                  O   s   t dƒ‚dS )zMethod os.chmod() is forbiddenzPUsage of os.chmod() is forbidden. Use certbot.compat.filesystem.chmod() instead.N©ÚRuntimeError©Zunused_argsZunused_kwargs© r   ú3/usr/lib/python3/dist-packages/certbot/compat/os.pyÚchmod3   s    r
   c                  O   s   t dƒ‚dS )zMethod os.chown() is forbiddenzgUsage of os.chown() is forbidden.Use certbot.compat.filesystem.copy_ownership_and_apply_mode() instead.Nr   r   r   r   r	   Úchown<   s    r   c                  O   s   t dƒ‚dS )zMethod os.open() is forbiddenzNUsage of os.open() is forbidden. Use certbot.compat.filesystem.open() instead.Nr   r   r   r   r	   ÚopenG   s    r   c                  O   s   t dƒ‚dS )zMethod os.mkdir() is forbiddenzPUsage of os.mkdir() is forbidden. Use certbot.compat.filesystem.mkdir() instead.Nr   r   r   r   r	   ÚmkdirO   s    r   c                  O   s   t dƒ‚dS )z!Method os.makedirs() is forbiddenzVUsage of os.makedirs() is forbidden. Use certbot.compat.filesystem.makedirs() instead.Nr   r   r   r   r	   ÚmakedirsZ   s    r   c                  O   s   t dƒ‚dS )zMethod os.rename() is forbiddenzSUsage of os.rename() is forbidden. Use certbot.compat.filesystem.replace() instead.Nr   r   r   r   r	   Úrenameb   s    r   c                  O   s   t dƒ‚dS )z Method os.replace() is forbiddenzTUsage of os.replace() is forbidden. Use certbot.compat.filesystem.replace() instead.Nr   r   r   r   r	   Úreplacej   s    r   c                  O   s   t dƒ‚dS )zMethod os.access() is forbiddenzƒUsage of os.access() is forbidden. Use certbot.compat.filesystem.check_mode() or certbot.compat.filesystem.is_executable() instead.Nr   r   r   r   r	   Úaccessr   s    r   c                  O   s   t dƒ‚dS )úMethod os.stat() is forbiddenzUsage of os.stat() is forbidden. Use certbot.compat.filesystem functions instead (eg. has_min_permissions, has_same_ownership).Nr   r   r   r   r	   Ústat{   s    r   c                  O   s   t dƒ‚dS )r   z€Usage of os.fstat() is forbidden. Use certbot.compat.filesystem functions instead (eg. has_min_permissions, has_same_ownership).Nr   r   r   r   r	   Úfstat„   s    r   )Ú__doc__Z
__future__r   ÚosZstd_osÚsysZstd_sysÚmodulesÚ__name__Z	ourselvesÚdirZ	attributeÚhasattrÚsetattrÚgetattrZcertbot.compatr   Úpathr
   r   r   r   r   r   r   r   r   r   r   r   r   r	   Ú<module>   s*   

			