From c1787d3b7515c790b98df7a0895c33020696cd39 Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Wed, 24 Oct 2001 02:48:38 +0000 Subject: [PATCH] o Note an additional potential problem here: LOCKD_MSG directly exports struct ucred to userland. In 5.0-CURRENT, it is desirable to instead export struct xucred, as ucred contains mutexes, pointers, and other kernel evil. I'll add it to my work queue. --- sys/nfsclient/nfs_lock.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/nfsclient/nfs_lock.c b/sys/nfsclient/nfs_lock.c index dfca164a4358..f8ebb095c2ca 100644 --- a/sys/nfsclient/nfs_lock.c +++ b/sys/nfsclient/nfs_lock.c @@ -132,6 +132,10 @@ nfs_dolock(struct vop_advlock_args *ap) msg.lm_getlk = ap->a_op == F_GETLK; /* * XXX -- I think this is wrong for anything other AF_INET. + * + * XXX: the lm_cred assignment below directly exports a ucred + * structure to userland. This is probably wrong, and should at + * least be xucred. */ msg.lm_addr = *(VFSTONFS(vp->v_mount)->nm_nam); msg.lm_fh_len = NFS_ISV3(vp) ? VTONFS(vp)->n_fhsize : NFSX_V2FH;