bugfindutils - Bugs: bug #16579, select_shell() uses incorrect...

 
 

bug #16579: select_shell() uses incorrect syntax for su

Submitter:  Andreas Metzler <ametzler>
Submitted:  Sat 13 May 2006 12:24:46 PM UTC
   
 
Category:  updatedb Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  jay
Originator Name:  Chronos Tachyon Open/Closed:  Closed
Release:  4.2.27 Fixed Release:  4.2.28
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 14 Jun 2006 09:22:05 PM UTC, comment #1: 

Fixed in findutils 4.3.x and 4.2.x.  The fix will be included in the next releases of each.

James Youngman <jay>
Group administrator
Sat 13 May 2006 12:24:46 PM UTC, original submission:  

Chronos Tachyon writes in http://bugs.debian.org/366269

The select_shell() function in /usr/bin/updatedb has a bug in the way it calls /bin/su; specifically, it attempts 'su "$LOCALUSER" -s $SHELL false', which runs '/bin/bash false', thus attempting to execute /bin/false as a shellscript.  (The exit code 126 and error message 'cannot execute binary file' are ignored entirely by updatedb.)

The correct usage of su would be to add "-c" after "-s $SHELL" on lines 87 and 91.  This is important if, for instance, the administrator has set $LOCALUSER's shell to /bin/false (which is how I discovered this bug).

----------------------------

Older versions of su as found on Debian (e.g. in sarge) accepted this syntax, but this is consideerd a bug.
cu andreas

Andreas Metzler <ametzler>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 4 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-08-05 jay Open/ClosedOpen Closed
    Fixed ReleaseNone 4.2.28
2006-06-14 jay StatusNone Fixed
    Assigned toNone jay

Back to the top

Powered by Savane 3.13-f8d8.
Corresponding source code