.\" .\"Copyright (c) 2016 Martijn van Duren .\"Copyright (c) 2015 Ted Unangst .\" .\"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 $Mdocdate: September 2 2016 $ .Dt VIAS 1 .Os .Sh NAME .Nm vias .Nd edit a file owned by another user .Sh SYNOPSIS .Nm vias .Op Fl a Ar style .Op Fl C Ar config .Ar file .Op Ar editor flags .Sh DESCRIPTION The .Nm utility makes a temporary copy of .Ar file normaly not accessible by the user and allows the user to edit the temporary .Ar file with their own editor. Upon exit the temporary file is copied back to the original file. .Pp The options are as follows: .Bl -tag -width tenletters .It Fl a Ar style Use the specified authentication style when validating the user, as allowed by .Pa /etc/login.conf . A list of doas-specific authentication methods may be configured by adding an .Sq auth-doas entry in .Xr login.conf 5 . .It Fl C Ar config Parse and check the configuration file .Ar config , then exit. If .Ar file is supplied, .Nm will also try to open the .Ar file . In the latter case either .Sq permit , .Sq permit nopass or .Sq deny will be printed on standard output, depending on file matching results. No copy will be made. .El .Sh EXIT STATUS .Ex -std doas It may fail for one of the following reasons: .Pp .Bl -bullet -compact .It The config file .Pa /etc/vias.conf could not be parsed. .It The user attempted to open a file which is not permitted. .It The password was incorrect. .It The .Xr open 2 command failed. .El .Sh ENVIRONMENT If the following environment variable exists it will be utilized by .Nm : .Bl -tag -width EDITOR .It Ev EDITOR The editor specified by the string .Ev EDITOR will be invoked instead of the default editor .Xr vi 1 . .El .Sh SEE ALSO .Xr doas 1 , .Xr vias.conf 5 .Sh AUTHORS .An Martijn van Duren Aq Mt vias@imperialat.at