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

 
 

sr #109375: Request to deprecate restricted mode

Submitted by:  None
Submitted on:  Wed 30 Aug 2017 02:29:36 AM UTC  
 
Category: NonePriority: 5 - Normal
Severity: 3 - NormalStatus: Wont Do
Privacy: PublicAssigned to: None
Originator Email: -unavailable-Open/Closed: Open
Operating System: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project 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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 30 Aug 2017 08:02:34 PM UTCchetStatusNone=>Wont Do

    Back to the top


    Powered by Savane 3.1-cleanup1