Bug 475

Summary: Sudo -n option no longer work
Product: Mageia Reporter: Michael Scherer <misc>
Component: RPM PackagesAssignee: Mageia Bug Squad <bugsquad>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: Normal CC: dmorganec, yleny
Version: Cauldron   
Target Milestone: ---   
Hardware: i586   
OS: Linux   
Whiteboard:
Source RPM: sudo CVE:
Status comment:
Attachments: Patch from upstream to fix the issue

Description Michael Scherer 2011-03-20 15:31:10 CET
Usig previous sudo :
$ sudo -n /bin/ls
sudo: sorry, a password is required to run sudo

on the new one :
$ sudo -n /bin/ls
[sudo] password for misc: 

this break iurt, who check for sudo usage using -n option.


Reproducible: 

Steps to Reproduce:
Comment 1 Y.LE_NY 2011-03-20 15:57:55 CET
$ rpm -qa sudo
sudo-1.8.0-1.mga1

It's strange that there is nothing in sudo's changelog about this change in sudo -n behaviour. 

http://www.sudo.ws/sudo/current.html
Extract :
Major changes between version 1.6.9p19 and 1.7.0: 
A new -n flag is available which may be used to indicate that sudo should not prompt the user for a password and, instead, exit with an error if authentication is required. 

http://www.sudo.ws/sudo/changes.html
2008-03-18 
Add -n (non-interactive) flag.

CC: (none) => yleny

Comment 2 Michael Scherer 2011-03-20 16:03:19 CET
Ok, after debugging and writing a patch ( and testing it ), I found it was already corrected upstream : 
http://www.sudo.ws/repos/sudo/rev/172f29597bd2

We can either wait on sudo 1.8.1 , or backport the patch ( attached  )
Comment 3 Michael Scherer 2011-03-20 16:03:48 CET
Created attachment 155 [details]
Patch from upstream to fix the issue
Comment 4 D Morgan 2011-03-21 01:28:09 CET
Patch applied on cauldron.

Status: NEW => RESOLVED
CC: (none) => dmorganec
Resolution: (none) => FIXED