Re: sudo ignores child return code -- oh?

"Parker, Michael D." <[email protected]>
Newsgroups gmane.comp.tools.sudo.devel
Message-ID <[email protected]>
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.

Regards

***** ***** *****
Michael D. Parker
General Atomics - EMS
[email protected]  <<<<< 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:[email protected]] On Behalf Of Radovan Sroka
Sent: Tuesday, August 30, 2016 7:37 AM
To: [email protected]
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
#/bin/asdsadsa
#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 <[email protected]> For list information, options, or to unsubscribe, visit:
https://www.sudo.ws/mailman/listinfo/sudo-workers

____________________________________________________________
sudo-workers mailing list <[email protected]>
For list information, options, or to unsubscribe, visit:
https://www.sudo.ws/mailman/listinfo/sudo-workers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.