diff options
author | Mattias Andrée <maandree@kth.se> | 2021-08-30 17:56:00 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-08-30 17:56:00 +0200 |
commit | 03b18525432fdc35c924940b6955395b8650093e (patch) | |
tree | e60daaeea3398973cb1ab0f84be902c0eae8bb60 | |
parent | Restore terminal attributes if interrupting asroot prompt (diff) | |
download | editasroot-3a90c48fab0112451568d0bd2333defa6d264cc8.tar.gz editasroot-3a90c48fab0112451568d0bd2333defa6d264cc8.tar.bz2 editasroot-3a90c48fab0112451568d0bd2333defa6d264cc8.tar.xz |
Add README and editasroot.81.0
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | README | 36 | ||||
-rw-r--r-- | editasroot.8 | 85 |
3 files changed, 124 insertions, 2 deletions
@@ -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: @@ -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 > |