aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-08-30 17:56:00 +0200
committerMattias Andrée <maandree@kth.se>2021-08-30 17:56:00 +0200
commit03b18525432fdc35c924940b6955395b8650093e (patch)
treee60daaeea3398973cb1ab0f84be902c0eae8bb60
parentRestore terminal attributes if interrupting asroot prompt (diff)
downloadeditasroot-03b18525432fdc35c924940b6955395b8650093e.tar.gz
editasroot-03b18525432fdc35c924940b6955395b8650093e.tar.bz2
editasroot-03b18525432fdc35c924940b6955395b8650093e.tar.xz
Add README and editasroot.81.0
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--Makefile5
-rw-r--r--README36
-rw-r--r--editasroot.885
3 files changed, 124 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 3b51433..eff2603 100644
--- a/Makefile
+++ b/Makefile
@@ -24,12 +24,13 @@ install: editasroot copier
mkdir -p -- "$(DESTDIR)$(LIBEXECDIR)"
mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man8/"
cp -- editasroot "$(DESTDIR)$(PREFIX)/bin/"
- cp -- editasroot.1 "$(DESTDIR)$(MANPREFIX)/man8/"
+ cp -- editasroot.8 "$(DESTDIR)$(MANPREFIX)/man8/"
cp -- copier "$(DESTDIR)$(LIBEXECDIR)/"
uninstall:
-rm -f -- "$(DESTDIR)$(PREFIX)/bin/editasroot"
- -rm -f -- "$(DESTDIR)$(LIBEXECDIR)/editasroot-copier"
+ -rm -f -- "$(DESTDIR)$(LIBEXECDIR)/copier"
+ -rmdir -- "$(DESTDIR)$(LIBEXECDIR)"
-rm -f -- "$(DESTDIR)$(MANPREFIX)/man8/editasroot.8"
clean:
diff --git a/README b/README
new file mode 100644
index 0000000..fa9d2ff
--- /dev/null
+++ b/README
@@ -0,0 +1,36 @@
+NAME
+ editasroot - edit a file that requires root access
+
+SYNOPSIS
+ editasroot file
+
+DESCRIPTION
+ The editasroot utility uses asroot(8) to get access to the
+ specified file, creates a copy of the file and edits it with
+ the user's default editor, and then saves the new content to
+ the access restricted file.
+
+OPTIONS
+ The editasroot utility conforms to the Base Definitions volume
+ of POSIX.1-2017, Section 12.2, Utility Syntax Guidelines.
+
+ No option are supported.
+
+OPERANDS
+ The following operand is supported:
+
+ file
+ The file to edit.
+
+CAVEATS
+ The content of the file becomes accessible to the user and
+ can be read, and potentially edited (good timing is needed),
+ by malicious programs. If this is a security issue, do not
+ run this program!
+
+RATIONALE
+ This utility lets users edit a file that requires root access,
+ but with his own editor configurations.
+
+SEE ALSO
+ asroot(8), sudoedit(8)
diff --git a/editasroot.8 b/editasroot.8
new file mode 100644
index 0000000..d3940b5
--- /dev/null
+++ b/editasroot.8
@@ -0,0 +1,85 @@
+.TH EDITASROOT 8 editasroot
+
+.SH NAME
+editasroot - edit a file that requires root access
+
+.SH SYNOPSIS
+.B editasroot
+.I file
+
+.SH DESCRIPTION
+The
+.B editasroot
+utility uses
+.BR asroot(8)
+to get access to the specified
+.IR file ,
+creates a copy of the file and edits it with the
+user's default editor, and then saves the new
+content to the access restricted file.
+
+.SH OPTIONS
+The
+.B editasroot
+utility conforms to the Base Definitions volume of POSIX.1-2017,
+.IR "Section 12.2" ,
+.IR "Utility Syntax Guidelines" .
+.PP
+No option are supported.
+
+.SH OPERANDS
+The following operand is supported:
+.TP
+.I file
+The file to edit.
+
+.SH ENVIRONMENT VARIABLES
+The following environment variables affects the execution of
+.BR editasroot :
+.TP
+.SH EDITOR
+Filename of the editor to edit the file path if the
+program is started in the foreground or if
+.B VISUAL
+is unset. (Default is
+.BR vi )
+.TP
+.SH PATH
+Default. See to the Base Definitions volume of POSIX.1-2017, Section 8.3, Other Environment Variables.
+.TP
+.SH VISUAL
+Filename of the editor to edit the file path if the
+program is started in the background.
+
+.SH EXIT STATUS
+Default.
+
+.SH CONSEQUENCES OF ERRORS
+Default.
+
+.SH APPLICATION USAGE
+None.
+
+.SH EXAMPLES
+None.
+
+.SH CAVEATS
+The content of the file becomes accessible to the user and
+can be read, and potentially edited (good timing is needed),
+by malicious programs. If this is a security issue, do not
+run this program!
+
+.SH RATIONALE
+This utility lets users edit a file that requires root access,
+but with his own editor configurations.
+
+.SH FUTURE DIRECTIONS
+None.
+
+.SH SEE ALSO
+.BR asroot (8),
+.BR sudoedit (8)
+
+.SH AUTHORS
+Mattias Andrée
+.RI < maandree@kth.se >