Linux server.edchosting.com 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
LiteSpeed
Server IP : 75.98.162.185 & Your IP : 216.73.216.163
Domains :
Cant Read [ /etc/named.conf ]
User : goons4good
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
lib /
python3.6 /
site-packages /
salt /
executors /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2022-10-11 05:09
__init__.py
28
B
-rw-r--r--
2022-05-16 09:16
direct_call.py
185
B
-rw-r--r--
2022-05-16 09:16
docker.py
1.42
KB
-rw-r--r--
2022-05-16 09:16
splay.py
2.35
KB
-rw-r--r--
2022-05-16 09:16
sudo.py
1.81
KB
-rw-r--r--
2022-05-16 09:16
transactional_update.py
3.67
KB
-rw-r--r--
2022-05-16 09:16
Save
Rename
""" Sudo executor module """ import shlex import salt.syspaths import salt.utils.json import salt.utils.path __virtualname__ = "sudo" def __virtual__(): if salt.utils.path.which("sudo") and __opts__.get("sudo_user"): return __virtualname__ return False def execute(opts, data, func, args, kwargs): """ Allow for the calling of execution modules via sudo. This module is invoked by the minion if the ``sudo_user`` minion config is present. Example minion config: .. code-block:: yaml sudo_user: saltdev Once this setting is made, any execution module call done by the minion will be run under ``sudo -u <sudo_user> salt-call``. For example, with the above minion config, .. code-block:: bash salt sudo_minion cmd.run 'cat /etc/sudoers' is equivalent to .. code-block:: bash sudo -u saltdev salt-call cmd.run 'cat /etc/sudoers' being run on ``sudo_minion``. """ cmd = [ "sudo", "-u", opts.get("sudo_user"), "salt-call", "--out", "json", "--metadata", "-c", opts.get("config_dir"), "--", data.get("fun"), ] if data["fun"] in ("state.sls", "state.highstate", "state.apply"): kwargs["concurrent"] = True for arg in args: cmd.append(shlex.quote(str(arg))) for key in kwargs: cmd.append(shlex.quote("{}={}".format(key, kwargs[key]))) cmd_ret = __salt__["cmd.run_all"](cmd, use_vt=True, python_shell=False) if cmd_ret["retcode"] == 0: cmd_meta = salt.utils.json.loads(cmd_ret["stdout"])["local"] ret = cmd_meta["return"] __context__["retcode"] = cmd_meta.get("retcode", 0) else: ret = cmd_ret["stderr"] __context__["retcode"] = cmd_ret["retcode"] return ret