mainThe GNU Bourne-Again SHell - Support: sr #109375, Request to deprecate restricted...

 
 

sr #109375: Request to deprecate restricted mode

Submitter:  None
Submitted:  Wed 30 Aug 2017 02:29:36 AM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Wont Do
Privacy:  Public Assigned to:  None
Originator Email:  -email is unavailable- Open/Closed:  Open
Operating System:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 30 Aug 2017 08:02:34 PM UTC, comment #2: 

Running `bash -r' without doing anything else is not responsible systems administration. The usual way is to run it as a login shell with a special (read-only) startup file that sets PATH and a few other variables to fixed values (e.g., set PATH to a directory that holds the executables you have deemed safe; set HOME to something other than the user's true home directory), cd to some scratch directory, and proceed.

Using it in the way it's not intended and saying "it's not a security measure" is silly.

But if you don't like it, it's easy to compile out of the shell when you configure it.

Chet Ramey <chet>
Group administrator
Wed 30 Aug 2017 02:32:07 AM UTC, comment #1: 

Forgot to sign in before posting :P

Andrew Pennebaker <mcandre>
Wed 30 Aug 2017 02:29:36 AM UTC, original submission:  

$ bash -r -c "sh -c 'cd /; pwd'"
/

Or:

$ bash -r
$ bash
$ cd /
$ pwd
/

Or:

$ bash -r -c "bash -c 'cd /; pwd'"
/

I mean, what's the point? Does restricted mode seriously offer some kind of safety switch for accidental programming? Because this clearly isn't a security measure.

Anonymous

 

(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

 

Carbon-Copy List
  • -email is unavailable- added by chet (Posted a comment)
  • -email is unavailable- added by mcandre (Posted a comment)
  •  

    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.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-08-30 chet StatusNone Wont Do

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code