Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Documentation: nfs: idmapper: convert to ReST

Convert idmapper.txt to ReST and move it to admin-guide.
Content remains mostly unchanged otherwise.

Signed-off-by: Daniel W. S. Almeida <dwlsalmeida@gmail.com>
Link: https://lore.kernel.org/r/069e40cd551ea778538f8fe9ad15ee26e45fc748.1578697871.git.dwlsalmeida@gmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>

authored by

Daniel W. S. Almeida and committed by
Jonathan Corbet
fbdcd0b8 0f3456ba

+18 -14
+1
Documentation/admin-guide/nfs/index.rst
··· 9 9 nfsroot 10 10 nfs-rdma 11 11 nfsd-admin-interfaces 12 + nfs-idmapper
+17 -14
Documentation/filesystems/nfs/idmapper.txt Documentation/admin-guide/nfs/nfs-idmapper.rst
··· 1 + ============= 2 + NFS ID Mapper 3 + ============= 1 4 2 - ========= 3 - ID Mapper 4 - ========= 5 5 Id mapper is used by NFS to translate user and group ids into names, and to 6 6 translate user and group names into ids. Part of this translation involves 7 7 performing an upcall to userspace to request the information. There are two ··· 20 20 in a custom NFS idmap cache. 21 21 22 22 23 - =========== 24 23 Configuring 25 24 =========== 25 + 26 26 The file /etc/request-key.conf will need to be modified so /sbin/request-key can 27 27 direct the upcall. The following line should be added: 28 28 29 - #OP TYPE DESCRIPTION CALLOUT INFO PROGRAM ARG1 ARG2 ARG3 ... 30 - #====== ======= =============== =============== =============================== 31 - create id_resolver * * /usr/sbin/nfs.idmap %k %d 600 29 + ``#OP TYPE DESCRIPTION CALLOUT INFO PROGRAM ARG1 ARG2 ARG3 ...`` 30 + ``#====== ======= =============== =============== ===============================`` 31 + ``create id_resolver * * /usr/sbin/nfs.idmap %k %d 600`` 32 + 32 33 33 34 This will direct all id_resolver requests to the program /usr/sbin/nfs.idmap. 34 35 The last parameter, 600, defines how many seconds into the future the key will 35 36 expire. This parameter is optional for /usr/sbin/nfs.idmap. When the timeout 36 37 is not specified, nfs.idmap will default to 600 seconds. 37 38 38 - id mapper uses for key descriptions: 39 + id mapper uses for key descriptions:: 40 + 39 41 uid: Find the UID for the given user 40 42 gid: Find the GID for the given group 41 43 user: Find the user name for the given UID ··· 47 45 program. If you would like to use your own program for a uid lookup then you 48 46 would edit your request-key.conf so it look similar to this: 49 47 50 - #OP TYPE DESCRIPTION CALLOUT INFO PROGRAM ARG1 ARG2 ARG3 ... 51 - #====== ======= =============== =============== =============================== 52 - create id_resolver uid:* * /some/other/program %k %d 600 53 - create id_resolver * * /usr/sbin/nfs.idmap %k %d 600 48 + ``#OP TYPE DESCRIPTION CALLOUT INFO PROGRAM ARG1 ARG2 ARG3 ...`` 49 + ``#====== ======= =============== =============== ===============================`` 50 + ``create id_resolver uid:* * /some/other/program %k %d 600`` 51 + ``create id_resolver * * /usr/sbin/nfs.idmap %k %d 600`` 52 + 54 53 55 54 Notice that the new line was added above the line for the generic program. 56 55 request-key will find the first matching line and corresponding program. In 57 56 this case, /some/other/program will handle all uid lookups and 58 57 /usr/sbin/nfs.idmap will handle gid, user, and group lookups. 59 58 60 - See <file:Documentation/security/keys/request-key.rst> for more information 59 + See Documentation/security/keys/request-key.rst for more information 61 60 about the request-key function. 62 61 63 62 64 - ========= 65 63 nfs.idmap 66 64 ========= 65 + 67 66 nfs.idmap is designed to be called by request-key, and should not be run "by 68 67 hand". This program takes two arguments, a serialized key and a key 69 68 description. The serialized key is first converted into a key_serial_t, and