Add support for the NFS over TLS exports to mountd.

Three new export flags are added to mountd that will restrict exported
file system mounts to use TLS.  Without these flags, TLS is allowed, but not
required.

The exports(5) man page will be updated in a future commit.
This commit is contained in:
rmacklem 2020-08-30 21:21:58 +00:00
parent edc82673f9
commit 146bc60fb0

View File

@ -2795,6 +2795,13 @@ do_opt(char **cpp, char **endcpp, struct exportlist *ep, struct grouplist *grp,
return (1);
opt_flags |= OP_SEC;
usedarg++;
} else if (!strcmp(cpopt, "tls")) {
*exflagsp |= MNT_EXTLS;
} else if (!strcmp(cpopt, "tlscert")) {
*exflagsp |= (MNT_EXTLS | MNT_EXTLSCERT);
} else if (!strcmp(cpopt, "tlscertuser")) {
*exflagsp |= (MNT_EXTLS | MNT_EXTLSCERT |
MNT_EXTLSCERTUSER);
} else {
syslog(LOG_ERR, "bad opt %s", cpopt);
return (1);