[Bug]: saltutil.runner drops privileges to the salt-api eauth user during orchestration
What happened?
saltutil.runner drops privileges to the salt-api eauth user during orchestration. master_user_runas() reads opts["user"], which state.orchestrate overwrites with the publishing user. The pwd.getpwnam() guard added in #69600 only filters synthetic sudo values; PAM/LDAP eauth users are real local accounts, so master-side runners execute under the API caller's uid instead of the master daemon's. Repro: master running as root, orchestration invoked via salt-api as a PAM user, orch contains a salt.runner state. Symptom is obscured by a second bug: SyncClientMixin.low() references proc_fn in its finally block before it is assigned, so the real exception is replaced by UnboundLocalError: cannot access local variable 'proc_fn'.
Type of salt install
Official deb
Major version
3008.x
What supported OS are you seeing the problem on? Can select multiple. (If bug appears on an unsupported OS, please open a GitHub Discussion instead)
centos-stream-9, windows-2022, windows-2025, debian-13, amazonlinux-2023, rhel-9, ubuntu-22.04
salt --versions-report output
Salt Version:
Salt: 3008.2
Python Version:
Python: 3.14.6 (main, Jun 11 2026, 02:19:05) [GCC 11.2.0]
Dependency Versions:
cffi: 2.0.0
cherrypy: 18.10.0
cryptography: 48.0.0
dateutil: 2.9.0.post0
docker-py: Not Installed
gitdb: 4.0.12
gitpython: 3.1.50
Jinja2: 3.1.6
libgit2: Not Installed
looseversion: 1.3.0
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 1.1.2
msgpack-pure: Not Installed
mysql-python: Not Installed
packaging: 24.0
pycparser: 3.00
pycrypto: 3.23.0
pycryptodome: 3.23.0
pygit2: Not Installed
python-gnupg: 0.5.6
PyYAML: 6.0.3
PyZMQ: 27.1.0
relenv: 0.22.14
smmap: 5.0.2
timelib: 0.3.0
Tornado: 6.5.7
ZMQ: 4.3.5
Salt Extensions:
saltext.azurerm: 4.4.1
Salt Package Information:
Package Type: onedir
System Versions:
dist: ubuntu 22.04.5 jammy
locale: utf-8
machine: x86_64
release: 6.8.0-1053-aws
system: Linux
version: Ubuntu 22.04.5 jammySource: saltstack/salt