From 20abb66ede73af231b18b2e86bae45bd71f30158 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Mon, 24 Nov 2014 18:34:11 +0000 Subject: [PATCH] Properly initialize the capability rights for vnodes exported to procstat that aren't for file descriptors (cwd, jdir, tracevp, etc.). Submitted by: Mikhail --- sys/kern/kern_descrip.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 5670d0027474..82ce56ddcaf3 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -3096,6 +3096,7 @@ export_vnode_to_kinfo(struct vnode *vp, int fd, int fflags, if (error == 0) kif->kf_status |= KF_ATTR_VALID; kif->kf_flags = xlate_fflags(fflags); + cap_rights_init(&kif->kf_cap_rights); kif->kf_fd = fd; kif->kf_ref_count = -1; kif->kf_offset = -1;