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
This commit is contained in:
Rick Macklem
2015-07-07 23:41:25 +00:00
parent 59856c7d26
commit c088e62e34
+2 -2
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,