From owner-svn-src-head@freebsd.org Tue Jul 7 23:41:26 2015 Return-Path: Delivered-To: svn-src-head@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 4ED969965DF; Tue, 7 Jul 2015 23:41:26 +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 3F0E018D1; Tue, 7 Jul 2015 23:41:26 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t67NfQHv099266; Tue, 7 Jul 2015 23:41:26 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t67NfQNW099265; Tue, 7 Jul 2015 23:41:26 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201507072341.t67NfQNW099265@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 7 Jul 2015 23:41:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285260 - head/sbin/mount_nfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2015 23:41:26 -0000 Author: rmacklem Date: Tue Jul 7 23:41:25 2015 New Revision: 285260 URL: https://svnweb.freebsd.org/changeset/base/285260 Log: 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. Requested by: masato@itc.naist.jp Tested by: masato@itc.naist.jp PR: 201073 MFC after: 1 month Modified: head/sbin/mount_nfs/mount_nfs.c Modified: head/sbin/mount_nfs/mount_nfs.c ============================================================================== --- head/sbin/mount_nfs/mount_nfs.c Tue Jul 7 23:37:16 2015 (r285259) +++ head/sbin/mount_nfs/mount_nfs.c Tue Jul 7 23:41:25 2015 (r285260) @@ -591,8 +591,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,