KAMID.CONF(5) File Formats Manual KAMID.CONF(5)

kamid.conf9p file server daemon configuration file

kamid.conf is the configuration file for the 9p file server daemon kamid(8).

The format of the configuration file is fairly flexible. The current line can be extended over multiple lines using a backslash (‘\’). Comments can be put anywhere in the file using a hash mark (‘#’), and extend to the end of the current line. Care should be taken when commenting out multi-line text: the comment is effective until the end of the entire block. Arguments names not beginning with a letter, digit, or underscore, as well as reserved words (such as listen, pki and table) must be quoted. Arguments containing whitespace should be surrounded by double quotes (").

Macros can be defined that are later expanded in context. Macro names must start with a letter, digit, or underscore, and may contain any of those characters, but may not be reserved words. Macros are not expanded inside quotes. For example:

lan_addr = "192.168.0.1"
listen on $lan_addr prot 5640 tls auth <users>

Additional configuration files can be included with the include keyword, for example:

include "/etc/kamid.conf.local"

The syntax of kamid.conf is described below.

[options...]
The options are as follows:
address port number
Listen on the address for incoming connection on the given port number. address can be an IP address or a domain name.
pki name
Use the tls certificate name previously defined with the pki rule.
<table>
Use the given authentication table to authorize the clients.
<table>
Maps user (virtuals or not) to their exported tree. By default the user home directory obtained with getpwnam(3) is used.
<table>
Maps virtual users to local user.
pkiname cert certfile
Associate certificate file certfile with pki entry pkiname. The pki entry defines a keypair configuration that can be referenced in listener rules.
pkiname key keyfile
Associate the key located in keyfile with pki entry pkiname.
name {value => value [, ...]}
Tables provide additional configuration information for kamid(8) in the form of key-value mappings.

Declare a mapping table containing the given static key-value pairs.

A sample configuration file:

pki localhost cert "/etc/ssl/localhost.crt"
pki localhost key "/etc/ssl/private/localhost.key"

table users { "SHA256:..." => "op" }

listen on localhost port 5640 tls pki localhost auth <users>

kamictl(8), kamid(8)

December 14, 2021 OpenBSD 7.2