From a564153d5c8253884ca2dc7d3dd45b46ca8badc6 Mon Sep 17 00:00:00 2001 From: keramida Date: Mon, 24 Jun 2002 22:06:47 +0000 Subject: 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 Reviewed by: jmallett MFC after: 1 week --- bin/ed/ed.1 | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) (limited to 'bin/ed') 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 -- cgit v1.1