Blame


1 09a12e37 2016-09-08 martijn .\"
2 7df505fb 2025-01-27 martijn .\"Copyright (c) 2016 Martijn van Duren <martijn@openbsd.org>
3 09a12e37 2016-09-08 martijn .\"Copyright (c) 2015 Ted Unangst <tedu@openbsd.org>
4 09a12e37 2016-09-08 martijn .\"
5 09a12e37 2016-09-08 martijn .\"Permission to use, copy, modify, and distribute this software for any
6 09a12e37 2016-09-08 martijn .\"purpose with or without fee is hereby granted, provided that the above
7 09a12e37 2016-09-08 martijn .\"copyright notice and this permission notice appear in all copies.
8 09a12e37 2016-09-08 martijn .\"
9 09a12e37 2016-09-08 martijn .\"THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 09a12e37 2016-09-08 martijn .\"WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 09a12e37 2016-09-08 martijn .\"MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 09a12e37 2016-09-08 martijn .\"ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 09a12e37 2016-09-08 martijn .\"WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 09a12e37 2016-09-08 martijn .\"ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 09a12e37 2016-09-08 martijn .\"OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 09a12e37 2016-09-08 martijn .Dd $Mdocdate: September 2 2016 $
17 09a12e37 2016-09-08 martijn .Dt VIAS.CONF 5
18 09a12e37 2016-09-08 martijn .Os
19 09a12e37 2016-09-08 martijn .Sh NAME
20 09a12e37 2016-09-08 martijn .Nm vias.conf
21 09a12e37 2016-09-08 martijn .Nd vias configuration file
22 09a12e37 2016-09-08 martijn .Sh SYNOPSIS
23 09a12e37 2016-09-08 martijn .Nm /etc/vias.conf
24 09a12e37 2016-09-08 martijn .Sh DESCRIPTION
25 09a12e37 2016-09-08 martijn The
26 09a12e37 2016-09-08 martijn .Xr vias 1
27 09a12e37 2016-09-08 martijn utility allows a user to edit any file as their own user according to the rules
28 09a12e37 2016-09-08 martijn in the
29 09a12e37 2016-09-08 martijn .Nm
30 09a12e37 2016-09-08 martijn configuration file.
31 09a12e37 2016-09-08 martijn .Pp
32 09a12e37 2016-09-08 martijn The rules have the following format:
33 09a12e37 2016-09-08 martijn .Bd -ragged -offset indent
34 09a12e37 2016-09-08 martijn .Ic permit Ns | Ns Ic deny
35 09a12e37 2016-09-08 martijn .Op Ar options
36 09a12e37 2016-09-08 martijn .Ar identity
37 09a12e37 2016-09-08 martijn .Op Ic as Ar target
38 09a12e37 2016-09-08 martijn .Op Ic edit Op ...
39 09a12e37 2016-09-08 martijn .Ed
40 09a12e37 2016-09-08 martijn .Pp
41 09a12e37 2016-09-08 martijn Rules consist of the following parts:
42 09a12e37 2016-09-08 martijn .Bl -tag -width 11n
43 09a12e37 2016-09-08 martijn .It Ic permit Ns | Ns Ic deny
44 09a12e37 2016-09-08 martijn The action to be taken if this rule matches.
45 09a12e37 2016-09-08 martijn .It Ar options
46 09a12e37 2016-09-08 martijn Options are:
47 09a12e37 2016-09-08 martijn .Bl -tag -width keepenv
48 09a12e37 2016-09-08 martijn .It Ic nopass
49 09a12e37 2016-09-08 martijn The user is not required to enter a password.
50 2b56e694 2018-01-11 martijn .It Ic persist
51 2b56e694 2018-01-11 martijn After the user successfully authenticates, do not ask for a password
52 2b56e694 2018-01-11 martijn again for some time.
53 09a12e37 2016-09-08 martijn .El
54 09a12e37 2016-09-08 martijn .It Ar identity
55 09a12e37 2016-09-08 martijn The username to match.
56 09a12e37 2016-09-08 martijn Groups may be specified by prepending a colon
57 09a12e37 2016-09-08 martijn .Pq Sq \&: .
58 09a12e37 2016-09-08 martijn Numeric IDs are also accepted.
59 09a12e37 2016-09-08 martijn .It Ic as Ar target
60 09a12e37 2016-09-08 martijn The
61 09a12e37 2016-09-08 martijn .Ar target
62 09a12e37 2016-09-08 martijn user who opens the file.
63 1cb97d7a 2018-01-11 martijn This can be used as an extra restriction on the rule.
64 1cb97d7a 2018-01-11 martijn If no
65 1cb97d7a 2018-01-11 martijn .Ar target
66 1cb97d7a 2018-01-11 martijn is specified the file will be opened as root.
67 09a12e37 2016-09-08 martijn .It Ic edit Op ...
68 09a12e37 2016-09-08 martijn A space separated list of files to be matched.
69 09a12e37 2016-09-08 martijn A file needs to be the full pathname without symlinks as produced by
70 09a12e37 2016-09-08 martijn .Xr realpath 3 .
71 09a12e37 2016-09-08 martijn If the filename ends in a slash it allows access on that entire subtree.
72 09a12e37 2016-09-08 martijn When using the directory syntax it is advised to set
73 09a12e37 2016-09-08 martijn .Ar target .
74 09a12e37 2016-09-08 martijn .El
75 09a12e37 2016-09-08 martijn .Pp
76 09a12e37 2016-09-08 martijn The last matching rule determines the action taken.
77 09a12e37 2016-09-08 martijn If no rule matches, the action is denied.
78 09a12e37 2016-09-08 martijn .Pp
79 09a12e37 2016-09-08 martijn Comments can be put anywhere in the file using a hash mark
80 09a12e37 2016-09-08 martijn .Pq Sq # ,
81 09a12e37 2016-09-08 martijn and extend to the end of the current line.
82 09a12e37 2016-09-08 martijn .Pp
83 09a12e37 2016-09-08 martijn The following quoting rules apply:
84 09a12e37 2016-09-08 martijn .Bl -dash
85 09a12e37 2016-09-08 martijn .It
86 09a12e37 2016-09-08 martijn The text between a pair of double quotes
87 09a12e37 2016-09-08 martijn .Pq Sq \&"
88 09a12e37 2016-09-08 martijn is taken as is.
89 09a12e37 2016-09-08 martijn .It
90 09a12e37 2016-09-08 martijn The backslash character
91 09a12e37 2016-09-08 martijn .Pq Sq \e
92 09a12e37 2016-09-08 martijn escapes the next character, including new line characters, outside comments;
93 09a12e37 2016-09-08 martijn as a result, comments may not be extended over multiple lines.
94 09a12e37 2016-09-08 martijn .It
95 09a12e37 2016-09-08 martijn If quotes or backslashes are used in a word,
96 09a12e37 2016-09-08 martijn it is not considered a keyword.
97 09a12e37 2016-09-08 martijn .El
98 09a12e37 2016-09-08 martijn .Sh SEE ALSO
99 09a12e37 2016-09-08 martijn .Xr vias 1
100 09a12e37 2016-09-08 martijn .Sh AUTHORS
101 7df505fb 2025-01-27 martijn .An Martijn van Duren Aq Mt martijn@openbsd.org