From owner-freebsd-fs@FreeBSD.ORG Thu May 14 13:24:27 2015 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 09B01E6F; Thu, 14 May 2015 13:24:27 +0000 (UTC) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id B3D8C1913; Thu, 14 May 2015 13:24:26 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2CmBABVoVRV/95baINchEeDGMFYhHuCUwKBdxIBAQEBAQEBgQqEIwEBBCNWGxgRGQIEVQaIP7AYpDYBAQEBAQEBAwEBAQEBAQEBGos6hDoXGRsHgmiBRQWUap9hI2GBKByBbiKBdoEBAQEB X-IronPort-AV: E=Sophos;i="5.13,427,1427774400"; d="scan'208";a="210739343" Received: from muskoka.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.222]) by esa-jnhn.mail.uoguelph.ca with ESMTP; 14 May 2015 09:24:25 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id AD5F3B3FD4; Thu, 14 May 2015 09:24:25 -0400 (EDT) Date: Thu, 14 May 2015 09:24:25 -0400 (EDT) From: Rick Macklem To: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= Cc: FreeBSD Filesystems Message-ID: <1693868675.37887047.1431609865698.JavaMail.root@uoguelph.ca> In-Reply-To: <20150512074602.GA93864@brick.home> Subject: Re: RFC: should automounted file systems be exportable? MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_37887045_646449297.1431609865694" X-Originating-IP: [172.17.95.12] X-Mailer: Zimbra 7.2.6_GA_2926 (ZimbraWebClient - FF3.0 (Win)/7.2.6_GA_2926) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 May 2015 13:24:27 -0000 ------=_Part_37887045_646449297.1431609865694 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Edward Tomasz Napierala wrote: > On 0511T2217, Rick Macklem wrote: > > A recent bug was reported related to mountd and the > > "automounted" flag. > > > > Loosely related to this is the question... > > Should automounted file systems be exportable? > > > > I haven't tested it, but I suspect that it would be > > broken and the NFS server will reply NFSERR_STALE > > after the file system has been dismounted. > > > > So, should I patch mountd so that it won't export > > automounted file systems? > > Exporting an automounted filesystem doesn't seem to make much sense, > I agree, but I'm not sure if adding code to prevent it is such > a good idea. If the user asks for it, by putting it into exports(5), > it's his fault; the only thing this code could add would be a more > friendly error message. > > So, how about having mountd generate a warning message in syslog(), but allow it to proceed? (Untested patch for this is attached.) rick ps: One other person emailed me suggesting that it should be doable and no one emailed that it should be restricted, so I figure that the "vote" favours a warning. ------=_Part_37887045_646449297.1431609865694 Content-Type: text/x-patch; name=mountd-automount.patch Content-Disposition: attachment; filename=mountd-automount.patch Content-Transfer-Encoding: base64 LS0tIG1vdW50ZC5jLm9yaWcJMjAxNS0wNS0wOSAyMjowNDoxNS4wMDAwMDAwMDAgLTA0MDAKKysr IG1vdW50ZC5jCTIwMTUtMDUtMTQgMDk6MTg6MDEuMDAwMDAwMDAwIC0wNDAwCkBAIC0xNDEwLDYg KzE0MTAsOSBAQCBnZXRfZXhwb3J0bGlzdF9vbmUodm9pZCkKIAkJCSAgICB9CiAJCQkgICAgaWYg KGNoZWNrX2RpcnBhdGgoY3ApICYmCiAJCQkJc3RhdGZzKGNwLCAmZnNiKSA+PSAwKSB7CisJCQkJ aWYgKChmc2IuZl9mbGFncyAmIE1OVF9BVVRPTU9VTlRFRCkgIT0gMCkKKwkJCQkgICAgc3lzbG9n KExPR19FUlIsICJXYXJuaW5nOiBleHBvcnRpbmcgb2YgIgorCQkJCQkiYXV0b21vdW50ZWQgZnMg JXMgbm90IHN1cHBvcnRlZCIsIGNwKTsKIAkJCQlpZiAoZ290X25vbmRpcikgewogCQkJCSAgICBz eXNsb2coTE9HX0VSUiwgImRpcnMgbXVzdCBiZSBmaXJzdCIpOwogCQkJCSAgICBnZXRleHBfZXJy KGVwLCB0Z3JwKTsK ------=_Part_37887045_646449297.1431609865694--