| Summary: | sudo fails to report error correctly when exec fails | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Jakub Jelen <jjelen> |
| Component: | sudo | Assignee: | Daniel Kopeček <dkopecek> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 26 | CC: | dkopecek, kzak, rsroka, tosykora |
| Target Milestone: | --- | Keywords: | Triaged |
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | sudo-1.8.20-0.1.b1.fc26 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 828782 | Environment: | |
| Last Closed: | 2017-04-20 08:40:46 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Jakub Jelen
2016-09-05 13:14:15 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle. Changing version to '26'. Seems to work with the current version $ sudo ./script; echo $? sudo: unable to execute ./script: No such file or directory 1 Exit code 1 does not seem to equal to 126 as we can see from the script running without sudo. $ ./script; echo $? bash: ./script: /bin/some_nonexistent_shell: bad interpreter: No such file or directory 126 $ sudo ./script; echo $? sesh: unable to execute ./script: No such file or directory 1 And at Fedora 25 I am still getting `sesh` instead of `sudo`. That is also intentional? sudo-1.8.19p2-1.fc25.x86_64 (In reply to Jakub Jelen from comment #3) > Exit code 1 does not seem to equal to 126 as we can see from the script > running without sudo. This is documented behaviour. Please read the "EXIT VALUE" section in the sudo man page. |