summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2015-07-07 23:41:25 +0000
committerrmacklem <rmacklem@FreeBSD.org>2015-07-07 23:41:25 +0000
commit46b57cf01fac6726cd7e5fe17a69dee66f631ac8 (patch)
tree397f3a3a87db740559f0ae52a376b7b7adfc6c30
parent267e0f67617495c2e523a9499c4c81f1776b1238 (diff)
downloadFreeBSD-src-46b57cf01fac6726cd7e5fe17a69dee66f631ac8.zip
FreeBSD-src-46b57cf01fac6726cd7e5fe17a69dee66f631ac8.tar.gz
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
-rw-r--r--sbin/mount_nfs/mount_nfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/mount_nfs/mount_nfs.c b/sbin/mount_nfs/mount_nfs.c
index 7f53581..836bc87 100644
--- a/sbin/mount_nfs/mount_nfs.c
+++ b/sbin/mount_nfs/mount_nfs.c
@@ -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,
OpenPOWER on IntegriCloud