2 79c9b1b2 2016-09-08 martijn .\"Copyright (c) 2016 Martijn van Duren <vias@imperialat.at>
3 09a12e37 2016-09-08 martijn .\"Copyright (c) 2015 Ted Unangst <tedu@openbsd.org>
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.
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
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
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
30 09a12e37 2016-09-08 martijn configuration file.
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 ...
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.
51 09a12e37 2016-09-08 martijn .It Ar identity
52 09a12e37 2016-09-08 martijn The username to match.
53 09a12e37 2016-09-08 martijn Groups may be specified by prepending a colon
54 09a12e37 2016-09-08 martijn .Pq Sq \&: .
55 09a12e37 2016-09-08 martijn Numeric IDs are also accepted.
56 09a12e37 2016-09-08 martijn .It Ic as Ar target
58 09a12e37 2016-09-08 martijn .Ar target
59 09a12e37 2016-09-08 martijn user who opens the file.
60 09a12e37 2016-09-08 martijn This can be used as an extra restriction on opening certain files.
61 09a12e37 2016-09-08 martijn The system will try to open the file as that user if all other checks match.
62 09a12e37 2016-09-08 martijn The default is root.
63 09a12e37 2016-09-08 martijn .It Ic edit Op ...
64 09a12e37 2016-09-08 martijn A space separated list of files to be matched.
65 09a12e37 2016-09-08 martijn A file needs to be the full pathname without symlinks as produced by
66 09a12e37 2016-09-08 martijn .Xr realpath 3 .
67 09a12e37 2016-09-08 martijn If the filename ends in a slash it allows access on that entire subtree.
68 09a12e37 2016-09-08 martijn When using the directory syntax it is advised to set
69 09a12e37 2016-09-08 martijn .Ar target .
72 09a12e37 2016-09-08 martijn The last matching rule determines the action taken.
73 09a12e37 2016-09-08 martijn If no rule matches, the action is denied.
75 09a12e37 2016-09-08 martijn Comments can be put anywhere in the file using a hash mark
76 09a12e37 2016-09-08 martijn .Pq Sq # ,
77 09a12e37 2016-09-08 martijn and extend to the end of the current line.
79 09a12e37 2016-09-08 martijn The following quoting rules apply:
80 09a12e37 2016-09-08 martijn .Bl -dash
82 09a12e37 2016-09-08 martijn The text between a pair of double quotes
83 09a12e37 2016-09-08 martijn .Pq Sq \&"
84 09a12e37 2016-09-08 martijn is taken as is.
86 09a12e37 2016-09-08 martijn The backslash character
87 09a12e37 2016-09-08 martijn .Pq Sq \e
88 09a12e37 2016-09-08 martijn escapes the next character, including new line characters, outside comments;
89 09a12e37 2016-09-08 martijn as a result, comments may not be extended over multiple lines.
91 09a12e37 2016-09-08 martijn If quotes or backslashes are used in a word,
92 09a12e37 2016-09-08 martijn it is not considered a keyword.
94 09a12e37 2016-09-08 martijn .Sh SEE ALSO
95 09a12e37 2016-09-08 martijn .Xr vias 1
96 09a12e37 2016-09-08 martijn .Sh AUTHORS
97 79c9b1b2 2016-09-08 martijn .An Martijn van Duren Aq Mt vias@imperialat.at