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:  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

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'"


$ bash -r
$ bash
$ cd /
$ pwd


$ 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.



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

Attach Files:

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)

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

    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.4