summaryrefslogtreecommitdiffstats
path: root/bin/ed
diff options
context:
space:
mode:
authorkeramida <keramida@FreeBSD.org>2002-06-24 22:06:47 +0000
committerkeramida <keramida@FreeBSD.org>2002-06-24 22:06:47 +0000
commita564153d5c8253884ca2dc7d3dd45b46ca8badc6 (patch)
tree8402afb342e6cdd1cf3c65ef0009bef2ff570dcf /bin/ed
parentb1ccf3cc04aa8ece51e741bf2431114f28a23ce8 (diff)
downloadFreeBSD-src-a564153d5c8253884ca2dc7d3dd45b46ca8badc6.zip
FreeBSD-src-a564153d5c8253884ca2dc7d3dd45b46ca8badc6.tar.gz
Add a description of the restrictions that red(1) imposes to users,
and a warning that this "restricted mode" can be bypassed easily by using symlinks, so that users don't depend too much on it. PR: docs/35940 Submitted by: Gary W. Swearingen <swear@blarg.net> Reviewed by: jmallett MFC after: 1 week
Diffstat (limited to 'bin/ed')
-rw-r--r--bin/ed/ed.131
1 files changed, 24 insertions, 7 deletions
diff --git a/bin/ed/ed.1 b/bin/ed/ed.1
index 5175924..8509c6e 100644
--- a/bin/ed/ed.1
+++ b/bin/ed/ed.1
@@ -12,19 +12,36 @@
.Op Fl sx
.Op Fl p Ar string
.Op Ar file
-.\" .LP
-.\" red [-] [-sx] [-p \fIstring\fR] [\fIfile\fR]
+.LP
+.Nm red
+.Op Fl
+.Op Fl sx
+.Op Fl p Ar string
+.Op Ar file
.Sh DESCRIPTION
The
.Nm
utility is a line-oriented text editor.
It is used to create, display, modify and otherwise manipulate text
files.
-.\" .B red
-.\" is a restricted
-.\" .BR ed :
-.\" it can only edit files in the current
-.\" directory and cannot execute shell commands.
+When invoked as
+.Nm red ,
+the editor runs in
+.Qq restricted
+mode, in which the only difference is that the editor restricts the
+use of filenames which start with
+.Ql \&!
+(interpreted as shell commands by
+.Nm ed )
+or contain a
+.Ql \&/ .
+Note that editing outside of the current directory is only prohibited
+if the user does not have write access to the current directory.
+If a user has write access to the current directory, then symbolic
+links can be created in the current directory, in which case
+.Nm red
+will not stop the user from editing the file that the symbolic link
+points to.
.Pp
If invoked with a
.Ar file
OpenPOWER on IntegriCloud