Blob


1 .\"
2 .\"Copyright (c) 2016 Martijn van Duren <martijn@openbsd.org>
3 .\"Copyright (c) 2015 Ted Unangst <tedu@openbsd.org>
4 .\"
5 .\"Permission to use, copy, modify, and distribute this software for any
6 .\"purpose with or without fee is hereby granted, provided that the above
7 .\"copyright notice and this permission notice appear in all copies.
8 .\"
9 .\"THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 .\"WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 .\"MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 .\"ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 .\"WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 .\"ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 .\"OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 .Dd $Mdocdate: September 2 2016 $
17 .Dt VIAS 1
18 .Os
19 .Sh NAME
20 .Nm vias
21 .Nd edit a file owned by another user
22 .Sh SYNOPSIS
23 .Nm vias
24 .Op Fl a Ar style
25 .Op Fl C Ar config
26 .Ar file
27 .Op Ar editor flags
28 .Sh DESCRIPTION
29 The
30 .Nm
31 utility makes a temporary copy of
32 .Ar file
33 normaly not accessible by the user and allows the user to edit the temporary
34 .Ar file
35 with their own editor.
36 Upon exit the temporary file is copied back to the original file.
37 .Pp
38 The options are as follows:
39 .Bl -tag -width tenletters
40 .It Fl a Ar style
41 Use the specified authentication style when validating the user,
42 as allowed by
43 .Pa /etc/login.conf .
44 A list of doas-specific authentication methods may be configured by adding an
45 .Sq auth-doas
46 entry in
47 .Xr login.conf 5 .
48 .It Fl C Ar config
49 Parse and check the configuration file
50 .Ar config ,
51 then exit.
52 If
53 .Ar file
54 is supplied,
55 .Nm
56 will also try to open the
57 .Ar file .
58 In the latter case
59 either
60 .Sq permit ,
61 .Sq permit nopass
62 or
63 .Sq deny
64 will be printed on standard output, depending on file
65 matching results.
66 No copy will be made.
67 .El
68 .Sh EXIT STATUS
69 .Ex -std vias
70 It may fail for one of the following reasons:
71 .Pp
72 .Bl -bullet -compact
73 .It
74 The config file
75 .Pa /etc/vias.conf
76 could not be parsed.
77 .It
78 The user attempted to open a file which is not permitted.
79 .It
80 The password was incorrect.
81 .It
82 The
83 .Xr open 2
84 command failed.
85 .El
86 .Sh ENVIRONMENT
87 If the following environment variable exists it will be utilized by
88 .Nm :
89 .Bl -tag -width EDITOR
90 .It Ev EDITOR
91 The editor specified by the string
92 .Ev EDITOR
93 will be invoked instead of the default editor
94 .Xr vi 1 .
95 .El
97 .Sh SEE ALSO
98 .Xr doas 1 ,
99 .Xr vias.conf 5
100 .Sh AUTHORS
101 .An Martijn van Duren Aq Mt martijn@openbsd.org