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.
This commit is contained in:
Rick Macklem 2015-08-08 22:06:07 +00:00
parent e766b59a8e
commit b170a4c9ac
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=286483

View File

@ -591,8 +591,8 @@ getnfsargs(char *spec, struct iovec **iov, int *iovlen)
* 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,