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: mas...@itc.naist.jp
  Tested by:    mas...@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,
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to