runsas broken on Fedora29
See original GitHub issueThe runas
option isn’t effective on Fedora 29 with salt-2018.3.2-5.fc29.noarch
because getpass.getuser()
while running as root is returning the runas
username. This affects cmd.run,
git.latest,
etc. I am running salt from an interactive shell as user me
with sudo salt-call ...
exclusively, so it might be specific to that use case.
I’ve fixed it for myself with this patch:
--- utils/user.py.orig 2018-06-27 11:04:57.000000000 -0500
+++ utils/user.py 2019-01-04 07:45:21.322476941 -0600
@@ -222,7 +222,9 @@
Helper method for for subprocess.Popen to initialise uid/gid and umask
for the new process.
'''
- if runas is not None and runas != getpass.getuser():
+# if runas is not None and runas != getpass.getuser():
+ uinfo = pwd.getpwnam(runas)
+ if os.getuid() != uinfo.pw_uid:
chugid(runas)
if umask is not None:
os.umask(umask) # pylint: disable=blacklisted-function
Issue Analytics
- State:
- Created 5 years ago
- Comments:18 (9 by maintainers)
Top Results From Across the Web
Common F29 bugs - Fedora Project Wiki
This page documents common bugs in Fedora 29 and, if available, fixes or workarounds for these problems. If you find your problem in...
Read more >Fedoraproject Fedora version 29 : Security vulnerabilities
# CVE ID CWE ID Vulnerability Type(s) Publish Date Update Date Score Gai...
1 CVE‑2019‑1010319 908 2019‑07‑11 2021‑02‑09 4.3 None
2 CVE‑2019‑1010317 908 2019‑07‑11 2022‑10‑06...
Read more >Upgrading Fedora 29 to Fedora 30
1. Update software and back up your system. Before you do anything, you will want to make sure you have the latest software...
Read more >Printer stopped working after installation of Fedora 29
Apparently it's only the Fedora printer UI that's broken, not the underlying printer services. So until this bug is fixed, ...
Read more >How to Fix Display Issues in Fedora - YouTube
This video goes over fixing display issues with moving multi-monitors in display settings. It also fixes a black screen I was getting when ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Still a problem on Fedora 33, probably for the same reason (both ran as root):
Worked around by using
alias salt-call='LOGNAME=root salt-call'
.thanks for pointing that out @cdalvaro @c-wicklein does that look like a duplicate of your issue? If so i’ll close here and we can monitor in the other issue.