Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Jul 2015 23:41:26 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r285260 - head/sbin/mount_nfs
Message-ID:  <201507072341.t67NfQNW099265@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507072341.t67NfQNW099265>