Properly initialize the capability rights for vnodes exported to procstat

that aren't for file descriptors (cwd, jdir, tracevp, etc.).

Submitted by:	Mikhail <mp@lenta.ru>
This commit is contained in:
John Baldwin 2014-11-24 18:34:11 +00:00
parent e56e554106
commit 20abb66ede
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=274970

View File

@ -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;