lib/nfs/Manager: add method MakeConnection()

This uses the libnfs function nfs_parse_url_dir() which means MPD
gains support for the libnfs arguments like "version".

Closes https://github.com/MusicPlayerDaemon/MPD/issues/2039
This commit is contained in:
Max Kellermann
2024-05-06 16:46:40 +02:00
parent 9947d3e67f
commit 9384bff6f9
9 changed files with 112 additions and 31 deletions

View File

@@ -102,7 +102,12 @@ nfs
Load music files from a NFS server. It is used when
:code:`music_directory` contains a ``nfs://`` URI according to
RFC2224, for example :samp:`nfs://servername/path`.
RFC2224, for example :samp:`nfs://servername/path`. MPD supports the
libnfs URL arguments as documented in the `libnfs README
<https://github.com/sahlberg/libnfs/blob/master/README>`__. For
example, you can use NFSv4 with the ``version`` argument::
music_directory "nfs://server/music?version=4"
See :ref:`input_nfs` for more information.
@@ -307,7 +312,7 @@ used according to RFC2224. Example:
mpc add nfs://servername/path/filename.ogg
This plugin uses :program:`libnfs`, which supports only NFS version 3.
This plugin uses :program:`libnfs`.
Since :program:`MPD` is not allowed to bind to so-called "privileged
ports", the NFS server needs to enable the ``insecure`` setting;
example :file:`/etc/exports`: