diff options
author | Dima Dorfman <dd@FreeBSD.org> | 2002-03-03 06:07:57 +0000 |
---|---|---|
committer | Dima Dorfman <dd@FreeBSD.org> | 2002-03-03 06:07:57 +0000 |
commit | e74d48314085afb22eb6687e5f890ed8ebf58050 (patch) | |
tree | a8d0b42ff80108743ba687e71653516410a90920 /sys/kern/vfs_export.c | |
parent | 650df5c9345fa8c66426ee0e444655f0a41d75d4 (diff) | |
download | src-e74d48314085afb22eb6687e5f890ed8ebf58050.tar.gz src-e74d48314085afb22eb6687e5f890ed8ebf58050.zip |
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.
Notes
Notes:
svn path=/head/; revision=91581
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 722dca2b3fda..88b0081988e5 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); |