Print this page
XXXX adding PID information to netstat output

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/doorfs/door_sys.c
          +++ new/usr/src/uts/common/fs/doorfs/door_sys.c
↓ open down ↓ 1776 lines elided ↑ open up ↑
1777 1777          struct vnode *vp;
1778 1778          int     fd;
1779 1779          door_attr_t attributes = DOOR_DESCRIPTOR;
1780 1780  
1781 1781          ASSERT(MUTEX_NOT_HELD(&door_knob));
1782 1782          if ((fd = ufalloc(0)) == -1)
1783 1783                  return (-1);
1784 1784          setf(fd, fp);
1785 1785          dp->d_data.d_desc.d_descriptor = fd;
1786 1786  
     1787 +        /* Add pid to the list associated with that descriptor. */
     1788 +        if (fp->f_vnode != NULL)
     1789 +                (void) VOP_IOCTL(fp->f_vnode, F_ASSOCI_PID,
     1790 +                    (intptr_t)curproc->p_pidp->pid_id, FKIOCTL, kcred, NULL,
     1791 +                    NULL);
     1792 +
1787 1793          /* Fill in the attributes */
1788 1794          if (VOP_REALVP(fp->f_vnode, &vp, NULL))
1789 1795                  vp = fp->f_vnode;
1790 1796          if (vp && vp->v_type == VDOOR) {
1791 1797                  if (VTOD(vp)->door_target == curproc)
1792 1798                          attributes |= DOOR_LOCAL;
1793 1799                  attributes |= VTOD(vp)->door_flags & DOOR_ATTR_MASK;
1794 1800                  dp->d_data.d_desc.d_id = VTOD(vp)->door_index;
1795 1801          }
1796 1802          dp->d_attributes = attributes;
↓ open down ↓ 1766 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX