404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@18.224.57.152: ~ $
3

\�me"�@s�UddlZddlZddlZddlZddlmZddlZddlmZm	Z	y,ddl
Z
e
jZej
e
j
e
je�d�ZeWnLeefk
r�yddlmZejZWnek
r�dd�ZYnXYnXeje�ZGdd	�d	ejjj�ZGd
d�de�ZdS)�N)�Any)�subp�util)�salt)�bcryptcCstd��dS)z�Raise when called so that importing this module doesn't throw
            ImportError when this module is not used. In this case, crypt
            and passlib are not needed.
            z/crypt and passlib not found, missing dependencyN)�ImportError)�_�r	�/usr/lib/python3.6/netbsd.py�
blowfish_hashsrcsneZdZdZdZdgZ�fdd�Zdd�Zdd	�Zddd�Z	d
d�Z
dd�Zddd�Zdd�Z
dd�Z�ZS)�NetBSDzS
    Distro subclass for NetBSD.

    (N.B. OpenBSD inherits from this class.)
    z*/usr/pkg/etc/sudoers.d/90-cloud-init-usersZgroupaddcsdt�j|||�tjjd�rNdddg|_dddg|_dddg|_dddg|_ndd	g|_d
g|_dS)Nz/usr/pkg/bin/pkginZpkginz-yZinstall�remove�updatezfull-upgradeZpkg_addz-UZ
pkg_delete)	�super�__init__�os�path�existsZpkg_cmd_install_prefixZpkg_cmd_remove_prefixZpkg_cmd_update_prefixZpkg_cmd_upgrade_prefix)�self�nameZcfg�paths)�	__class__r	r
r4s
zNetBSD.__init__cCsdd||gS)N�usermodz-Gr	)r�member_nameZ
group_namer	r	r
�_get_add_member_to_group_cmd?sz#NetBSD._get_add_member_to_group_cmdc

KsRtj|�rtjd|�dSdg}dg}dddddd	�}d
ddd
�}xf|j�D]Z\}}||kr~|r~t|t�r~|j|||g�qL||krL|rL|j||�|j||�qLWd|ks�d|kr�|dg7}|dg7}||g7}||g7}tjd|�yt	j	||d�Wn&t
k
�r&tjtd|��YnX|jdd�}	|	dk	�rN|j
||	dd�dS)Nz!User %s already exists, skipping.FZuseraddz-dz-cz-gz-Gz-s)ZhomedirZgecosZ
primary_group�groups�shellz--no-user-groupz--systemz
--no-log-init)Z
no_user_group�systemZno_log_initZno_create_homerz-mzAdding user %s)Z	logstringzFailed to create user %s�passwdT)�hashed)rZis_user�LOG�info�items�
isinstance�str�extend�appendr�	Exception�logexc�get�
set_passwd)
rr�kwargsZadduser_cmdZlog_adduser_cmdZadduser_optsZ
adduser_flags�key�valZ
passwd_valr	r	r
�add_userBsB





zNetBSD.add_userFcCs\|r
|}nt|�}ytjdd||g�Wn$tk
rLtjtd|��YnX|j|�dS)Nrz-pzFailed to set password for %s)rrr'rr(r �
unlock_passwd)r�userrrZ	hashed_pwr	r	r
r*sszNetBSD.set_passwdcCs@ytjddd|g�Wn$tk
r:tjtd|��YnXdS)Nrz-C�yeszFailed to lock user %s)rr'rr(r )rrr	r	r
�lock_passwd�s
zNetBSD.lock_passwdcCs@ytjddd|g�Wn$tk
r:tjtd|��YnXdS)Nrz-C�nozFailed to unlock user %s)rr'rr(r )rrr	r	r
r/�s
zNetBSD.unlock_passwdNcCstjd�dS)NzCannot set the locale.)r �debug)rZlocaleZout_fnr	r	r
�apply_locale�szNetBSD.apply_localecCs.tj�}tj�}tjj�}d||f|d<|S)z9Return env vars used in NetBSD package_command operationsz:http://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/%s/%s/AllZPKG_PATH)�platform�release�machiner�environ�copy)rZ
os_releaseZos_arch�er	r	r
�_get_pkg_cmd_environ�s
zNetBSD._get_pkg_cmd_environcCsdS)Nr	)rr	r	r
�update_package_sources�szNetBSD.update_package_sources)F)N)�__name__�
__module__�__qualname__�__doc__Z
ci_sudoers_fnZgroup_add_cmd_prefixrrr.r*r2r/r5r<r=�
__classcell__r	r	)rr
r*s1



rc@seZdZdS)�DistroN)r>r?r@r	r	r	r
rC�srC)�	functoolsZloggingrr6ZtypingrZcloudinit.distros.bsdZ	cloudinitrrZcryptZMETHOD_BLOWFISHr�partialZmksaltrr�AttributeErrorZpasslib.hashr�hashZ	getLoggerr>r ZdistrosZbsdZBSDrrCr	r	r	r
�<module>s,


x

Filemanager

Name Type Size Permission Actions
OpenCloudOS.cpython-36.opt-1.pyc File 542 B 0644
OpenCloudOS.cpython-36.pyc File 542 B 0644
TencentOS.cpython-36.opt-1.pyc File 540 B 0644
TencentOS.cpython-36.pyc File 540 B 0644
__init__.cpython-36.opt-1.pyc File 35.6 KB 0644
__init__.cpython-36.pyc File 35.6 KB 0644
almalinux.cpython-36.opt-1.pyc File 313 B 0644
almalinux.cpython-36.pyc File 313 B 0644
alpine.cpython-36.opt-1.pyc File 6.78 KB 0644
alpine.cpython-36.pyc File 6.78 KB 0644
amazon.cpython-36.opt-1.pyc File 450 B 0644
amazon.cpython-36.pyc File 450 B 0644
arch.cpython-36.opt-1.pyc File 7.33 KB 0644
arch.cpython-36.pyc File 7.33 KB 0644
bsd.cpython-36.opt-1.pyc File 4.87 KB 0644
bsd.cpython-36.pyc File 4.87 KB 0644
bsd_utils.cpython-36.opt-1.pyc File 1.09 KB 0644
bsd_utils.cpython-36.pyc File 1.09 KB 0644
centos.cpython-36.opt-1.pyc File 310 B 0644
centos.cpython-36.pyc File 310 B 0644
cloudlinux.cpython-36.opt-1.pyc File 314 B 0644
cloudlinux.cpython-36.pyc File 314 B 0644
cos.cpython-36.opt-1.pyc File 309 B 0644
cos.cpython-36.pyc File 309 B 0644
debian.cpython-36.opt-1.pyc File 7.52 KB 0644
debian.cpython-36.pyc File 7.52 KB 0644
dragonflybsd.cpython-36.opt-1.pyc File 361 B 0644
dragonflybsd.cpython-36.pyc File 361 B 0644
eurolinux.cpython-36.opt-1.pyc File 313 B 0644
eurolinux.cpython-36.pyc File 313 B 0644
fedora.cpython-36.opt-1.pyc File 310 B 0644
fedora.cpython-36.pyc File 310 B 0644
freebsd.cpython-36.opt-1.pyc File 6.21 KB 0644
freebsd.cpython-36.pyc File 6.21 KB 0644
gentoo.cpython-36.opt-1.pyc File 6.91 KB 0644
gentoo.cpython-36.pyc File 6.91 KB 0644
mariner.cpython-36.opt-1.pyc File 1.54 KB 0644
mariner.cpython-36.pyc File 1.54 KB 0644
miraclelinux.cpython-36.opt-1.pyc File 316 B 0644
miraclelinux.cpython-36.pyc File 316 B 0644
net_util.cpython-36.opt-1.pyc File 1.84 KB 0644
net_util.cpython-36.pyc File 1.84 KB 0644
netbsd.cpython-36.opt-1.pyc File 4.58 KB 0644
netbsd.cpython-36.pyc File 4.58 KB 0644
networking.cpython-36.opt-1.pyc File 12.21 KB 0644
networking.cpython-36.pyc File 12.21 KB 0644
openbsd.cpython-36.opt-1.pyc File 2.26 KB 0644
openbsd.cpython-36.pyc File 2.26 KB 0644
openeuler.cpython-36.opt-1.pyc File 538 B 0644
openeuler.cpython-36.pyc File 538 B 0644
openmandriva.cpython-36.opt-1.pyc File 318 B 0644
openmandriva.cpython-36.pyc File 318 B 0644
opensuse-leap.cpython-36.opt-1.pyc File 321 B 0644
opensuse-leap.cpython-36.pyc File 321 B 0644
opensuse-microos.cpython-36.opt-1.pyc File 324 B 0644
opensuse-microos.cpython-36.pyc File 324 B 0644
opensuse-tumbleweed.cpython-36.opt-1.pyc File 327 B 0644
opensuse-tumbleweed.cpython-36.pyc File 327 B 0644
opensuse.cpython-36.opt-1.pyc File 6.28 KB 0644
opensuse.cpython-36.pyc File 6.28 KB 0644
photon.cpython-36.opt-1.pyc File 4.31 KB 0644
photon.cpython-36.pyc File 4.31 KB 0644
rhel.cpython-36.opt-1.pyc File 4.82 KB 0644
rhel.cpython-36.pyc File 4.82 KB 0644
rhel_util.cpython-36.opt-1.pyc File 969 B 0644
rhel_util.cpython-36.pyc File 969 B 0644
rocky.cpython-36.opt-1.pyc File 309 B 0644
rocky.cpython-36.pyc File 309 B 0644
sle-micro.cpython-36.opt-1.pyc File 317 B 0644
sle-micro.cpython-36.pyc File 317 B 0644
sle_hpc.cpython-36.opt-1.pyc File 315 B 0644
sle_hpc.cpython-36.pyc File 315 B 0644
sles.cpython-36.opt-1.pyc File 312 B 0644
sles.cpython-36.pyc File 312 B 0644
suse.cpython-36.opt-1.pyc File 312 B 0644
suse.cpython-36.pyc File 312 B 0644
ubuntu.cpython-36.opt-1.pyc File 1.45 KB 0644
ubuntu.cpython-36.pyc File 1.45 KB 0644
ug_util.cpython-36.opt-1.pyc File 3.91 KB 0644
ug_util.cpython-36.pyc File 3.91 KB 0644
virtuozzo.cpython-36.opt-1.pyc File 313 B 0644
virtuozzo.cpython-36.pyc File 313 B 0644