[sudo-workers] sudo ignores child return code -- oh?

Parker, Michael D. Michael.D.Parker at ga.com
Tue Aug 30 10:52:25 MDT 2016

Hmmm.....Your example seems to have a problem.

The first line should be:

#! /bin/abcde
# some useless script

The way it is written in the provided example will cause the currently defined shell to run the script.  Since there are only comments, the script should execute without error.


***** ***** *****
Michael D. Parker
General Atomics - EMS
Michael.d.parker at ga.com  <<<<< NOTE: Remember to include my middle initial >>>>>
+1 858 964 6675 / Office 86-1319
16969 Mesamint Street / San Diego / CA / 92127

CONFIDENTIALITY NOTICE: This communication is intended to be confidential to the 
person(s) to whom it is addressed.  If you are not the intended recipient or the agent of the 
intended recipient or if you are unable to deliver this communication to the intended 
recipient, you must not read, use or disseminate this information.  If you have received 
this communication in error,please advise the sender immediately by telephone and delete 
this message and any attachments without retaining a copy.

-----Original Message-----
From: sudo-workers [mailto:sudo-workers-bounces at sudo.ws] On Behalf Of Radovan Sroka
Sent: Tuesday, August 30, 2016 7:37 AM
To: sudo-workers at sudo.ws
Subject: --EXTERNAL--[sudo-workers] sudo ignores child return code

Hi Todd,

I found regression in sudo behavior, It's reproducible on recent sudo-1.8.18b2.

When you have a script which refers to non existing interpreter like:

$ cat test.sh
#useless script

$ chmod u+x test.sh

Sudo executes this command and it should fail.

$ sudo ./test.sh

But Sudo returns 0.


Radovan Sroka
Security Technologies | Red hat, Inc.

sudo-workers mailing list <sudo-workers at sudo.ws> For list information, options, or to unsubscribe, visit:

More information about the sudo-workers mailing list