summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient/nfs_lock.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2001-10-24 02:48:38 +0000
committerrwatson <rwatson@FreeBSD.org>2001-10-24 02:48:38 +0000
commit1704b54dc9c34a4c7add1c12724c66787df43868 (patch)
treef7c792863d6e6904a6a0de9022d0ff2a1a05a68d /sys/nfsclient/nfs_lock.c
parent016be1f136b003c5977295befc796d712cf358db (diff)
downloadFreeBSD-src-1704b54dc9c34a4c7add1c12724c66787df43868.zip
FreeBSD-src-1704b54dc9c34a4c7add1c12724c66787df43868.tar.gz
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.
Diffstat (limited to 'sys/nfsclient/nfs_lock.c')
-rw-r--r--sys/nfsclient/nfs_lock.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/nfsclient/nfs_lock.c b/sys/nfsclient/nfs_lock.c
index dfca164..f8ebb09 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;
OpenPOWER on IntegriCloud