From: yoe Date: Wed, 25 Oct 2006 12:41:54 +0000 (+0000) Subject: r209: Sync documentation with what the code turned out to be, and add a few simple X-Git-Url: http://git.alex.org.uk r209: Sync documentation with what the code turned out to be, and add a few simple examples --- diff --git a/nbd-server.5.sgml b/nbd-server.5.sgml index 52378f3..d44abd0 100644 --- a/nbd-server.5.sgml +++ b/nbd-server.5.sgml @@ -64,7 +64,7 @@ manpage.1: manpage.sgml nbd-server. The default configuration file is - @SCD@/nbd-server/config, but this + @sysconfdir@/nbd-server/config, but this can be varied with the option to nbd-server(1). @@ -154,12 +154,14 @@ manpage.1: manpage.sgml Optional; string; default - @SCD@/nbd-server/allow. + @sysconfdir@/nbd-server/allow. The name of the authorization file for this export. This - file should contain one line per IP-address, and must not - contain wildcards of any kind or empty lines. If the file + file should contain one line per IP-address, or per + network (which must be specified in CIDR-style + ) + and must not contain empty lines. If the file does not exist, everyone is allowed to connect. If the file exists but is empty, nobody is allowed to connect. Otherwise, nbd-server will @@ -457,6 +459,34 @@ manpage.1: manpage.sgml version 2, as published by the Free Software Foundation. + + EXAMPLES + A simple nbd-server configuration file + would look like this: + + [generic] + [export] + exportname = /export/blkdev + port = 12345 + + For increased security, one might want to create an + authorization file, and set the UID and GID to run as: + + [generic] + user = nbd + group = nbd + [export] + exportname = /export/blkdev + port = 12345 + authfile = /etc/nbd-server/allow + + With /etc/nbd-server/allow containing the following: + + 127.0.0.1 + 192.168.0.0/8 + 192.168.1.1 + +