From owner-svn-src-stable-9@freebsd.org Mon Aug 10 22:30:14 2015 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C73899E442; Mon, 10 Aug 2015 22:30:14 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D05DAD0; Mon, 10 Aug 2015 22:30:14 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t7AMUEtO073715; Mon, 10 Aug 2015 22:30:14 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t7AMUE3K073714; Mon, 10 Aug 2015 22:30:14 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201508102230.t7AMUE3K073714@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 10 Aug 2015 22:30:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r286608 - stable/9/sbin/mount_nfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Aug 2015 22:30:14 -0000 Author: rmacklem Date: Mon Aug 10 22:30:13 2015 New Revision: 286608 URL: https://svnweb.freebsd.org/changeset/base/286608 Log: MFC: r285260 Since the case where secflavor < 0 indicates the security flavor is to be negotiated, it could be a Kerberized mount. As such, filling in the "principal" argument using the canonized host name makes sense. If it is negotiated as AUTH_SYS, the "principal" argument is meaningless but harmless. Modified: stable/9/sbin/mount_nfs/mount_nfs.c Directory Properties: stable/9/sbin/mount_nfs/ (props changed) Modified: stable/9/sbin/mount_nfs/mount_nfs.c ============================================================================== --- stable/9/sbin/mount_nfs/mount_nfs.c Mon Aug 10 22:26:14 2015 (r286607) +++ stable/9/sbin/mount_nfs/mount_nfs.c Mon Aug 10 22:30:13 2015 (r286608) @@ -801,8 +801,8 @@ getnfsargs(char *spec, struct iovec **io * For a Kerberized nfs mount where the "principal" * argument has not been set, add it here. */ - if (got_principal == 0 && secflavor >= 0 && - secflavor != AUTH_SYS && ai_nfs->ai_canonname != NULL) { + if (got_principal == 0 && secflavor != AUTH_SYS && + ai_nfs->ai_canonname != NULL) { snprintf(pname, sizeof (pname), "nfs@%s", ai_nfs->ai_canonname); build_iovec(iov, iovlen, "principal", pname,