[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

New option --sandbox (disables r/w/e commands)

From: Assaf Gordon
Subject: New option --sandbox (disables r/w/e commands)
Date: Mon, 25 Apr 2016 01:55:38 +0000


I'd like to suggest a new option to sed: "sandbox" mode.
When used, programs containing the r/w/e commands are rejected without being 
This ensures that sed operates only on the file specified on the command-line, 
and cannot affect the system.

Some background:
This feature is useful (in fact, required) when sed is used as web-based 
service, in which users can specify the sed script they want to execute on a 
given file.
Such a scenario is available in a commonly-used bioinformatics web-based 
platform called "Galaxy" ( ).
Galaxy allows non-technically-savvy users to upload files, and run multitude of 
programs on these files.
Among these programs, 'sed' and 'awk' and 'grep':
or to see it in action, visit and enter 'sed/awk/grep' 
in the "search tools" box.

An identical option was added to GNU Awk in 2008
( in
  search the log message for "sandbox" from 30-Dec-2008 ).

I suggested this option to sed off-list back in the day, but did not follow-up 
on it (and sed's development has stalled for a while). So I've been maintaining 
a separate patch against sed-4.1.5 and sed-4.2.2 since then.

I hope the code changes are minimal enough to be weighted positively against 
the extra 'bloat'.

comments and suggestions welcomed.
 - assaf

This electronic message is intended for the use of the named recipient only, 
and may contain information that is confidential, privileged or protected from 
disclosure under applicable law. If you are not the intended recipient, or an 
employee or agent responsible for delivering this message to the intended 
recipient, you are hereby notified that any reading, disclosure, dissemination, 
distribution, copying or use of the contents of this message including any of 
its attachments is strictly prohibited. If you have received this message in 
error or are not the named recipient, please notify us immediately by 
contacting the sender at the electronic mail address noted above, and destroy 
all copies of this message. Please note, the recipient should check this email 
and any attachments for the presence of viruses. The organization accepts no 
liability for any damage caused by any virus transmitted by this email.

Attachment: 0001-sed-new-S-sandbox-option.patch
Description: 0001-sed-new-S-sandbox-option.patch

Attachment: ATT00001.txt
Description: ATT00001.txt

reply via email to

[Prev in Thread] Current Thread [Next in Thread]