diff options
author | dd <dd@FreeBSD.org> | 2002-03-03 06:07:57 +0000 |
---|---|---|
committer | dd <dd@FreeBSD.org> | 2002-03-03 06:07:57 +0000 |
commit | a9f1d1dab432f420a963a8f1958225aae22e113d (patch) | |
tree | a8d0b42ff80108743ba687e71653516410a90920 /sys/kern/vfs_export.c | |
parent | 35f67b85baedc84ddd5db244b05b702a0bdaa389 (diff) | |
download | FreeBSD-src-a9f1d1dab432f420a963a8f1958225aae22e113d.zip FreeBSD-src-a9f1d1dab432f420a963a8f1958225aae22e113d.tar.gz |
Check the version of ex_anon (a `struct xucred') before using it to
fill out netc_anon (a `struct ucred'), and add an XXX around the
entire operation since it isn't clear whether it's doing the right
thing with things like cr_uidinfo and cr_prison.
Diffstat (limited to 'sys/kern/vfs_export.c')
-rw-r--r-- | sys/kern/vfs_export.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index 722dca2..88b0081 100644 --- a/sys/kern/vfs_export.c +++ b/sys/kern/vfs_export.c @@ -93,6 +93,16 @@ vfs_hang_addrlist(mp, nep, argp) struct domain *dom; int error; + /* + * XXX: This routine converts from a `struct xucred' + * (argp->ex_anon) to a `struct ucred' (np->netc_anon). This + * operation is questionable; for example, what should be done + * with fields like cr_uidinfo and cr_prison? Currently, this + * routine does not touch them (leaves them as NULL). + */ + if (argp->ex_anon.cr_version != XUCRED_VERSION) + return (EINVAL); + if (argp->ex_addrlen == 0) { if (mp->mnt_flag & MNT_DEFEXPORTED) return (EPERM); |