--- old/usr/src/uts/common/fs/proc/prvnops.c	2016-06-15 19:34:45.685277595 -0400
+++ new/usr/src/uts/common/fs/proc/prvnops.c	2016-06-15 19:34:45.714327223 -0400
@@ -162,8 +162,10 @@
 		"path" },
 	{ PR_CTDIR,	26 * sizeof (prdirent_t), sizeof (prdirent_t),
 		"contracts" },
+	{ PR_SECFLAGS,	27 * sizeof (prdirent_t), sizeof (prdirent_t),
+		"secflags" },
 #if defined(__x86)
-	{ PR_LDT,	27 * sizeof (prdirent_t), sizeof (prdirent_t),
+	{ PR_LDT,	28 * sizeof (prdirent_t), sizeof (prdirent_t),
 		"ldt" },
 #endif
 };
@@ -414,7 +416,7 @@
 /* ARGSUSED */
 static int
 prclose(vnode_t *vp, int flag, int count, offset_t offset, cred_t *cr,
-	caller_context_t *ct)
+    caller_context_t *ct)
 {
 	prnode_t *pnp = VTOP(vp);
 	prcommon_t *pcp = pnp->pr_pcommon;
@@ -585,7 +587,7 @@
 	pr_read_usage(), pr_read_lusage(), pr_read_pagedata(),
 	pr_read_watch(), pr_read_lwpstatus(), pr_read_lwpsinfo(),
 	pr_read_lwpusage(), pr_read_xregs(), pr_read_priv(),
-	pr_read_spymaster(),
+	pr_read_spymaster(), pr_read_secflags(),
 #if defined(__sparc)
 	pr_read_gwindows(), pr_read_asrs(),
 #endif
@@ -639,6 +641,7 @@
 	pr_read_inval,		/* /proc/<pid>/path/xxx			*/
 	pr_read_inval,		/* /proc/<pid>/contracts		*/
 	pr_read_inval,		/* /proc/<pid>/contracts/<ctid>		*/
+	pr_read_secflags,	/* /proc/<pid>/secflags			*/
 	pr_read_pidfile,	/* old process file			*/
 	pr_read_pidfile,	/* old lwp file				*/
 	pr_read_opagedata,	/* old pagedata file			*/
@@ -1601,6 +1604,25 @@
 	return (pr_uioread(&psinfo, sizeof (psinfo), uiop));
 }
 
+static int
+pr_read_secflags(prnode_t *pnp, uio_t *uiop)
+{
+	prsecflags_t ret;
+	int error;
+	proc_t *p;
+
+	ASSERT(pnp->pr_type == PR_SECFLAGS);
+
+	if ((error = prlock(pnp, ZNO)) != 0)
+		return (error);
+
+	p = pnp->pr_common->prc_proc;
+	prgetsecflags(p, &ret);
+	prunlock(pnp);
+
+	return (pr_uioread(&ret, sizeof (ret), uiop));
+}
+
 #if defined(__sparc)
 
 static int
@@ -1796,6 +1818,7 @@
 	pr_read_inval,		/* /proc/<pid>/path/xxx			*/
 	pr_read_inval,		/* /proc/<pid>/contracts		*/
 	pr_read_inval,		/* /proc/<pid>/contracts/<ctid>		*/
+	pr_read_secflags,	/* /proc/<pid>/secflags			*/
 	pr_read_pidfile,	/* old process file			*/
 	pr_read_pidfile,	/* old lwp file				*/
 	pr_read_opagedata_32,	/* old pagedata file			*/
@@ -2772,7 +2795,7 @@
 
 static int
 prgetattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr,
-	caller_context_t *ct)
+    caller_context_t *ct)
 {
 	prnode_t *pnp = VTOP(vp);
 	prnodetype_t type = pnp->pr_type;
@@ -3039,6 +3062,9 @@
 	case PR_PRIV:
 		vap->va_size = prgetprivsize();
 		break;
+	case PR_SECFLAGS:
+		vap->va_size = sizeof (prsecflags_t);
+		break;
 	case PR_SIGACT:
 		nsig = PROC_IS_BRANDED(curproc)? BROP(curproc)->b_nsig : NSIG;
 		vap->va_size = (nsig-1) *
@@ -3336,6 +3362,7 @@
 	pr_lookup_notdir,	/* /proc/<pid>/path/xxx			*/
 	pr_lookup_ctdir,	/* /proc/<pid>/contracts		*/
 	pr_lookup_notdir,	/* /proc/<pid>/contracts/<ctid>		*/
+	pr_lookup_notdir,	/* /proc/<pid>/secflags			*/
 	pr_lookup_notdir,	/* old process file			*/
 	pr_lookup_notdir,	/* old lwp file				*/
 	pr_lookup_notdir,	/* old pagedata file			*/
@@ -3343,8 +3370,8 @@
 
 static int
 prlookup(vnode_t *dp, char *comp, vnode_t **vpp, pathname_t *pathp,
-	int flags, vnode_t *rdir, cred_t *cr, caller_context_t *ct,
-	int *direntflags, pathname_t *realpnp)
+    int flags, vnode_t *rdir, cred_t *cr, caller_context_t *ct,
+    int *direntflags, pathname_t *realpnp)
 {
 	prnode_t *pnp = VTOP(dp);
 	prnodetype_t type = pnp->pr_type;
@@ -3394,8 +3421,8 @@
 /* ARGSUSED */
 static int
 prcreate(vnode_t *dp, char *comp, vattr_t *vap, vcexcl_t excl,
-	int mode, vnode_t **vpp, cred_t *cr, int flag, caller_context_t *ct,
-	vsecattr_t *vsecp)
+    int mode, vnode_t **vpp, cred_t *cr, int flag, caller_context_t *ct,
+    vsecattr_t *vsecp)
 {
 	int error;
 
@@ -4685,6 +4712,7 @@
 	pr_readdir_notdir,	/* /proc/<pid>/path/xxx			*/
 	pr_readdir_ctdir,	/* /proc/<pid>/contracts		*/
 	pr_readdir_notdir,	/* /proc/<pid>/contracts/<ctid>		*/
+	pr_readdir_notdir,	/* /proc/<pid>/secflags			*/
 	pr_readdir_notdir,	/* old process file			*/
 	pr_readdir_notdir,	/* old lwp file				*/
 	pr_readdir_notdir,	/* old pagedata file			*/
@@ -4693,7 +4721,7 @@
 /* ARGSUSED */
 static int
 prreaddir(vnode_t *vp, uio_t *uiop, cred_t *cr, int *eofp,
-	caller_context_t *ct, int flags)
+    caller_context_t *ct, int flags)
 {
 	prnode_t *pnp = VTOP(vp);
 
@@ -5909,7 +5937,7 @@
 /*ARGSUSED5*/
 static int
 prpoll(vnode_t *vp, short events, int anyyet, short *reventsp,
-	pollhead_t **phpp, caller_context_t *ct)
+    pollhead_t **phpp, caller_context_t *ct)
 {
 	prnode_t *pnp = VTOP(vp);
 	prcommon_t *pcp = pnp->pr_common;
