Print this page
7029 want per-process exploit mitigation features (secflags)
7030 want basic address space layout randomization (aslr)
7031 noexec_user_stack should be a secflag
7032 want a means to forbid mappings around NULL.

@@ -4153,10 +4153,22 @@
         mutex_enter(&p->p_crlock);
         cred2prcred(p->p_cred, pcrp);
         mutex_exit(&p->p_crlock);
 }
 
+void
+prgetsecflags(proc_t *p, prsecflags_t *psfp)
+{
+        ASSERT(psfp != NULL);
+
+        psfp->pr_version = PRSECFLAGS_VERSION_CURRENT;
+        psfp->pr_lower = p->p_secflags.psf_lower;
+        psfp->pr_upper = p->p_secflags.psf_upper;
+        psfp->pr_effective = p->p_secflags.psf_effective;
+        psfp->pr_inherit = p->p_secflags.psf_inherit;
+}
+
 /*
  * Compute actual size of the prpriv_t structure.
  */
 
 size_t