.\" .\"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.CONF 5 .Os .Sh NAME .Nm vias.conf .Nd vias configuration file .Sh SYNOPSIS .Nm /etc/vias.conf .Sh DESCRIPTION The .Xr vias 1 utility allows a user to edit any file as their own user according to the rules in the .Nm configuration file. .Pp The rules have the following format: .Bd -ragged -offset indent .Ic permit Ns | Ns Ic deny .Op Ar options .Ar identity .Op Ic as Ar target .Op Ic edit Op ... .Ed .Pp Rules consist of the following parts: .Bl -tag -width 11n .It Ic permit Ns | Ns Ic deny The action to be taken if this rule matches. .It Ar options Options are: .Bl -tag -width keepenv .It Ic nopass The user is not required to enter a password. .It Ic persist After the user successfully authenticates, do not ask for a password again for some time. .El .It Ar identity The username to match. Groups may be specified by prepending a colon .Pq Sq \&: . Numeric IDs are also accepted. .It Ic as Ar target The .Ar target user who opens the file. This can be used as an extra restriction on the rule. If no .Ar target is specified the file will be opened as root. .It Ic edit Op ... A space separated list of files to be matched. A file needs to be the full pathname without symlinks as produced by .Xr realpath 3 . If the filename ends in a slash it allows access on that entire subtree. When using the directory syntax it is advised to set .Ar target . .El .Pp The last matching rule determines the action taken. If no rule matches, the action is denied. .Pp Comments can be put anywhere in the file using a hash mark .Pq Sq # , and extend to the end of the current line. .Pp The following quoting rules apply: .Bl -dash .It The text between a pair of double quotes .Pq Sq \&" is taken as is. .It The backslash character .Pq Sq \e escapes the next character, including new line characters, outside comments; as a result, comments may not be extended over multiple lines. .It If quotes or backslashes are used in a word, it is not considered a keyword. .El .Sh SEE ALSO .Xr vias 1 .Sh AUTHORS .An Martijn van Duren Aq Mt vias@imperialat.at