From patchwork Wed Feb 6 23:30:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 2108921 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id AA2BCDF2A1 for ; Wed, 6 Feb 2013 23:30:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757789Ab3BFXaK (ORCPT ); Wed, 6 Feb 2013 18:30:10 -0500 Received: from mail-ie0-f176.google.com ([209.85.223.176]:57330 "EHLO mail-ie0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757553Ab3BFXaJ (ORCPT ); Wed, 6 Feb 2013 18:30:09 -0500 Received: by mail-ie0-f176.google.com with SMTP id k13so2665730iea.7 for ; Wed, 06 Feb 2013 15:30:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:subject:to:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding; bh=OHMOkKAbBPYGFV0uv0Dq3/CZhPz7Vh1UYqxet68fVHM=; b=HoJ+JMuv3Mo9ahyjre/sa3QfO6dV4wm6Dt4hO6Dxpiv4+eZakm/P17AsypyJz3qAX5 0JJInZ2VE8aKvh+JhteCgqEHztyNKT25UL8GYqfavTNaud17gXlUVyugi13p3iVGwKJq PJWh+0XJQ1qseCKOh0oSXGFX3iC5LLtf9X3SKUXOzmnu4NqU/XsyVUVGOoaG6WhOb1rZ qTFXM8m2ExM98o3N9iCjfCPD6pwNEe83RIoRTmkWPeszElFwQrFPmk/6fszRratlPNVV NRQRwCyveQDvfGFQ/FZS1qJady16sGoLc+j13ic8gKilsm3CMO05E9Pn1NAqIfFTpt2k I7Qw== X-Received: by 10.43.8.200 with SMTP id ot8mr20444001icb.11.1360193408130; Wed, 06 Feb 2013 15:30:08 -0800 (PST) Received: from seurat.1015granger.net (adsl-99-26-161-222.dsl.sfldmi.sbcglobal.net. [99.26.161.222]) by mx.google.com with ESMTPS id xn10sm5693040igb.4.2013.02.06.15.30.06 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 06 Feb 2013 15:30:07 -0800 (PST) From: Chuck Lever Subject: [PATCH v1 1/4] NFS: Handle missing rpc.gssd when looking up root FH To: linux-nfs@vger.kernel.org Cc: Chuck Lever , Bryan Schumaker Date: Wed, 06 Feb 2013 18:30:06 -0500 Message-ID: <20130206233005.1535.33518.stgit@seurat.1015granger.net> In-Reply-To: <20130206230045.1535.48770.stgit@seurat.1015granger.net> References: <20130206230045.1535.48770.stgit@seurat.1015granger.net> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org When rpc.gssd is not running, any NFS operation that needs to use a GSS security flavor of course does not work. If looking up a server's root file handle results in an NFS4ERR_WRONGSEC, nfs4_find_root_sec() is called to try a bunch of security flavors until one works (or until all reasonable flavors are tried). But if rpc.gssd isn't running, it seems to fail immediately after rpcauth_create() craps out on the first GSS flavor. When the rpcauth_create() call in nfs4_lookup_root_sec() fails because rpc.gssd is not available, nfs4_lookup_root_sec() unconditionally returns -EIO. This prevents nfs4_find_root_sec() from retrying any other flavors; it drops out of its loop and fails immediately. Having nfs4_lookup_root_sec() return -EACCES instead allows nfs4_find_root_sec() to try all flavors in its list. Signed-off-by: Chuck Lever Cc: Bryan Schumaker --- fs/nfs/nfs4proc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index cf747ef..debeb2d 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -2408,7 +2408,7 @@ static int nfs4_lookup_root_sec(struct nfs_server *server, struct nfs_fh *fhandl auth = rpcauth_create(flavor, server->client); if (IS_ERR(auth)) { - ret = -EIO; + ret = -EACCES; goto out; } ret = nfs4_lookup_root(server, fhandle, info);