From patchwork Thu Sep 19 19:12:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "J. Bruce Fields" X-Patchwork-Id: 2913121 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A22489F1F1 for ; Thu, 19 Sep 2013 19:12:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 87C84203E9 for ; Thu, 19 Sep 2013 19:12:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4A0CC203EB for ; Thu, 19 Sep 2013 19:12:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752602Ab3ISTMG (ORCPT ); Thu, 19 Sep 2013 15:12:06 -0400 Received: from fieldses.org ([174.143.236.118]:57565 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752120Ab3ISTMF (ORCPT ); Thu, 19 Sep 2013 15:12:05 -0400 Received: from bfields by fieldses.org with local (Exim 4.76) (envelope-from ) id 1VMjdz-0007pl-E2; Thu, 19 Sep 2013 15:12:03 -0400 Date: Thu, 19 Sep 2013 15:12:03 -0400 To: steved@redhat.com Cc: linux-nfs@vger.kernel.org Subject: [PATCH] exportfs: test_export shouldn't use invalid uid/gid Message-ID: <20130919191203.GA29599@fieldses.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) From: "J. Bruce Fields" Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "J. Bruce Fields" Some newer kernels are rejecting -1 uid/gid. Actually, worse--they're silently ignoring any attempt to cache such exports, thus preventing test_export from getting back the errors it needs. And -1 wasn't a good choice anyway. Signed-off-by: J. Bruce Fields --- utils/exportfs/exportfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c index 9f79541..4331697 100644 --- a/utils/exportfs/exportfs.c +++ b/utils/exportfs/exportfs.c @@ -420,7 +420,7 @@ static int test_export(char *path, int with_fsid) char buf[1024]; int fd, n; - sprintf(buf, "-test-client- %s 3 %d -1 -1 0\n", + sprintf(buf, "-test-client- %s 3 %d 65534 65534 0\n", path, with_fsid ? NFSEXP_FSID : 0); fd = open("/proc/net/rpc/nfsd.export/channel", O_WRONLY);