Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp13789607ybl; Sun, 29 Dec 2019 20:58:21 -0800 (PST) X-Google-Smtp-Source: APXvYqw6ctPkL1S2kkWPQ7Nzf2gVs/gGKpd57Q52ZcYI3NTq0WvijhBJOmZaXxtq1vNadHU+4JNY X-Received: by 2002:a9d:6502:: with SMTP id i2mr44930282otl.206.1577681901864; Sun, 29 Dec 2019 20:58:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577681901; cv=none; d=google.com; s=arc-20160816; b=ODhh+l39z1PBSyl/7qoqmtevZB9tbCN2NRKJVfkPduBS5h6mVgPQV/2KabVCuUICNA WlQZcThrvTerA/5u78mTh6HP2MiptwD1VWgz6rRzc672K7i6XLHfxyCE+y2p1Ohob1a0 7Vin9o0x+5QRR9gjH8rw81lEV3s8zkXHTn+bUgDw6qM6mdEAfC7C0fuS9LqkqBKW6Pfr glw5pgBvc1aW2RhBkqw3NU4kpRL87PB9iOF+u4QaL04Pd5Q0DxP2p4Rnhe1WLPHrjxQ4 w4o5Vp19DqcB7TK8ovhQy98QOZz5XPs58ll8QBLKHrazX73UjgDvOMC+h6+EM/7n0+Fm HEuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=uR3f0Y5+qpw7GzuSpDtOazUC6VJQJeKwTwbFDTwTBCA=; b=uttb+TWAYpNZCUU/nYaglq3rSMgHk8S/+kJzl6Nqlm7Cjg7WSsXzLag2AkWyy5+X5Q kzrQBPRzgiQ2SJCNkJcWEs+69L7tO5vsZSWYeXIvcrQN7HFCB8w6wIRzbj5U/J2P3JhI 6h/Zv7113TxyLrxg/WED2WYfwH1NafC/CGv7owxgbrf1V3B5DvsMupNAyE57cSHxIGso iZlq8bH1Y/mY8Bg4Ce/ciQtmkBpKWARe+7YqEf94Rhod/1mc+lkKzD9/cBizawYv48W3 Prje7NvSiB77fNX1G8jMHq1iKkUufLqL7cenjV8hmoR8lpxohIK7XgLnarANyQNmPZq6 2PIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HwqnaEx5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g25si21935771otl.153.2019.12.29.20.58.11; Sun, 29 Dec 2019 20:58:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HwqnaEx5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727215AbfL3E4f (ORCPT + 99 others); Sun, 29 Dec 2019 23:56:35 -0500 Received: from mail-pj1-f48.google.com ([209.85.216.48]:37268 "EHLO mail-pj1-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727079AbfL3E4d (ORCPT ); Sun, 29 Dec 2019 23:56:33 -0500 Received: by mail-pj1-f48.google.com with SMTP id m13so7615853pjb.2; Sun, 29 Dec 2019 20:56:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uR3f0Y5+qpw7GzuSpDtOazUC6VJQJeKwTwbFDTwTBCA=; b=HwqnaEx5Oed746uNHaDbdB0lhTBpW8fy9FmMAJuCeWagTTz9H+T+AwTmYZsDZVQ6eL v3nh7acYh86xwxU1qg55GWpXfqwMbz0M9FkCcAtjAjYhj9WenaeTyyvjDFMrnd6zhXH/ mM8HgFu6sq+pqZkG/43PAbbwnm+SvIsHfzK81bbUty2GqzLt4I+XkLIcKznJD62jMZRw I0w2loPFqPwIKIudX5G+I1HJCXa3YKZD8YTwLbc1em7SlU+x5nodVK37aMe+hn6PEW8M drlOVuBs6DYy9zQY3CuaEYg6C2KPysBXtLLzj4eXzg9R9LbFP18FIMMjWv3O6bdqaVC3 l8uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uR3f0Y5+qpw7GzuSpDtOazUC6VJQJeKwTwbFDTwTBCA=; b=c6mTy2rgX1LXKfBVHVsCdhXGPLq6g8XE+MCqNe+rRCkkXtjuCgB6fpsMTcP9kR7FzY sVQn+lCtms+/uS4AG/STPKErXj3LdYnQpuWACA6UWBjdwk/ATqUcvZmN3mdwNqDDMMGQ wbdw9gWQazMIctwHucSa1niCwclaFL5D3+LKSLe8uVtdLTTLBJ9tc+dxGolLPzZl4wDD T2eCGG2MoIio49xbItmjeyg4en5rc2H8qKIZ9DVaI91HwBBqZcNUorhnhi6UHCVOjtKN s+VoLtOw1jBebgEUJQzz6cGOUGKXixCvUICPiXGrI4erqwJhhARxSOwCvaiYBNbOCQY1 RfjA== X-Gm-Message-State: APjAAAUtx6yQnvIBHatqW+U3+GomflpjkSC6sWlTQIOSkZbGdfQilHi+ y0NoIVOTqysxe/eT74R/SuE= X-Received: by 2002:a17:902:b408:: with SMTP id x8mr67131998plr.326.1577681792979; Sun, 29 Dec 2019 20:56:32 -0800 (PST) Received: from localhost.localdomain ([2804:14d:72b1:8920:da15:c0bd:33c1:e2ad]) by smtp.gmail.com with ESMTPSA id b1sm22373189pjw.4.2019.12.29.20.56.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Dec 2019 20:56:32 -0800 (PST) From: "Daniel W. S. Almeida" X-Google-Original-From: Daniel W. S. Almeida To: corbet@lwn.net, mchehab+samsung@kernel.org Cc: "Daniel W. S. Almeida" , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, skhan@linuxfoundation.org, linux-kernel-mentees@lists.linuxfoundation.org Subject: [PATCH v2 5/8] Documentation: nfs: idmapper: convert to ReST Date: Mon, 30 Dec 2019 01:55:59 -0300 Message-Id: <0063476e939087c87678a68dfd7fbab2e2d57bb9.1577681164.git.dwlsalmeida@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Daniel W. S. Almeida" Convert idmapper.txt to ReST and move it to admin-guide. Content remains mostly unchanged otherwise. Signed-off-by: Daniel W. S. Almeida --- Documentation/admin-guide/nfs/index.rst | 1 + .../nfs/nfs-idmapper.rst} | 31 ++++++++++--------- 2 files changed, 18 insertions(+), 14 deletions(-) rename Documentation/{filesystems/nfs/idmapper.txt => admin-guide/nfs/nfs-idmapper.rst} (81%) diff --git a/Documentation/admin-guide/nfs/index.rst b/Documentation/admin-guide/nfs/index.rst index c73ba9c16b77..c90fd5ebc640 100644 --- a/Documentation/admin-guide/nfs/index.rst +++ b/Documentation/admin-guide/nfs/index.rst @@ -9,4 +9,5 @@ NFS nfsroot nfs-rdma nfsd-admin-interfaces + nfs-idmapper diff --git a/Documentation/filesystems/nfs/idmapper.txt b/Documentation/admin-guide/nfs/nfs-idmapper.rst similarity index 81% rename from Documentation/filesystems/nfs/idmapper.txt rename to Documentation/admin-guide/nfs/nfs-idmapper.rst index b86831acd583..58b8e63412d5 100644 --- a/Documentation/filesystems/nfs/idmapper.txt +++ b/Documentation/admin-guide/nfs/nfs-idmapper.rst @@ -1,7 +1,7 @@ +============= +NFS ID Mapper +============= -========= -ID Mapper -========= Id mapper is used by NFS to translate user and group ids into names, and to translate user and group names into ids. Part of this translation involves performing an upcall to userspace to request the information. There are two @@ -20,22 +20,24 @@ legacy rpc.idmap daemon for the id mapping. This result will be stored in a custom NFS idmap cache. -=========== Configuring =========== + The file /etc/request-key.conf will need to be modified so /sbin/request-key can direct the upcall. The following line should be added: -#OP TYPE DESCRIPTION CALLOUT INFO PROGRAM ARG1 ARG2 ARG3 ... -#====== ======= =============== =============== =============================== -create id_resolver * * /usr/sbin/nfs.idmap %k %d 600 +``#OP TYPE DESCRIPTION CALLOUT INFO PROGRAM ARG1 ARG2 ARG3 ...`` +``#====== ======= =============== =============== ===============================`` +``create id_resolver * * /usr/sbin/nfs.idmap %k %d 600`` + This will direct all id_resolver requests to the program /usr/sbin/nfs.idmap. The last parameter, 600, defines how many seconds into the future the key will expire. This parameter is optional for /usr/sbin/nfs.idmap. When the timeout is not specified, nfs.idmap will default to 600 seconds. -id mapper uses for key descriptions: +id mapper uses for key descriptions:: + uid: Find the UID for the given user gid: Find the GID for the given group user: Find the user name for the given UID @@ -45,23 +47,24 @@ You can handle any of these individually, rather than using the generic upcall program. If you would like to use your own program for a uid lookup then you would edit your request-key.conf so it look similar to this: -#OP TYPE DESCRIPTION CALLOUT INFO PROGRAM ARG1 ARG2 ARG3 ... -#====== ======= =============== =============== =============================== -create id_resolver uid:* * /some/other/program %k %d 600 -create id_resolver * * /usr/sbin/nfs.idmap %k %d 600 +``#OP TYPE DESCRIPTION CALLOUT INFO PROGRAM ARG1 ARG2 ARG3 ...`` +``#====== ======= =============== =============== ===============================`` +``create id_resolver uid:* * /some/other/program %k %d 600`` +``create id_resolver * * /usr/sbin/nfs.idmap %k %d 600`` + Notice that the new line was added above the line for the generic program. request-key will find the first matching line and corresponding program. In this case, /some/other/program will handle all uid lookups and /usr/sbin/nfs.idmap will handle gid, user, and group lookups. -See for more information +See Documentation/security/keys/request-key.rst for more information about the request-key function. -========= nfs.idmap ========= + nfs.idmap is designed to be called by request-key, and should not be run "by hand". This program takes two arguments, a serialized key and a key description. The serialized key is first converted into a key_serial_t, and -- 2.24.1