1
0
mirror of https://github.com/slicer69/doas synced 2024-07-03 07:58:51 +00:00
doas/doasedit.8
2021-10-06 10:18:21 -07:00

55 lines
1.8 KiB
Groff

.\"
.\" Copyright (c) 2021 Jesse Smith <jessefrgsmith@yahoo.ca>
.\"
.\" Permission to use, copy, modify, and distribute this software for
.\" any purpose with or without fee is hereby granted, provided that
.\" the above copyright notice and this permission notice appear in all
.\" copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
.\" WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
.\" WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
.\" AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
.\" DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
.\" OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
.\" TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd September 13, 2021
.Dt DOASEDIT 1
.Os
.Sh NAME
.Nm doasedit
.Nd edit a text file and then write the file back to its original location with admin access
.Sh SYNOPSIS
.Nm
.Op Ar file
.Sh DESCRIPTION
The
.Nm
utility opens an editor on a temporary copy of a
text file. Once the file has been altered, it is written
back to the original location, using doas for elevated access.
This is intended for use in editing configuration files where
the user may need to be root to edit a file, but does not wish
to run their text editor as the super user.
.Pp
The doasedit utility accepts one argument, the file to
be edited. The text editor used during the editing process
is set using the VISUAL environment variable. If VISUAL fails
to run, EDITOR is tried instead.
.El
.Sh EXIT STATUS
.Ex -std
.Sh ENVIRONMENT
.Bl -tag -width EDITOR
.It Ev EDITOR
The editor command used for editing the target text file.
If no EDITOR variable is set, then the command vi is used.
.El
.Sh SEE ALSO
.Xr doas 1 ,
.Xr doas.conf 5
.Sh AUTHORS
.An Jesse Smith Aq Mt jessefrgsmith@yahoo.ca