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.


4138                         }
4139                 }
4140                 ASSERT(tmp == NULL);
4141         } while ((seg = AS_SEGNEXT(as, seg)) != NULL);
4142 
4143         return (0);
4144 }
4145 
4146 /*
4147  * Return the process's credentials.  We don't need a 32-bit equivalent of
4148  * this function because prcred_t and prcred32_t are actually the same.
4149  */
4150 void
4151 prgetcred(proc_t *p, prcred_t *pcrp)
4152 {
4153         mutex_enter(&p->p_crlock);
4154         cred2prcred(p->p_cred, pcrp);
4155         mutex_exit(&p->p_crlock);
4156 }
4157 












4158 /*
4159  * Compute actual size of the prpriv_t structure.
4160  */
4161 
4162 size_t
4163 prgetprivsize(void)
4164 {
4165         return (priv_prgetprivsize(NULL));
4166 }
4167 
4168 /*
4169  * Return the process's privileges.  We don't need a 32-bit equivalent of
4170  * this function because prpriv_t and prpriv32_t are actually the same.
4171  */
4172 void
4173 prgetpriv(proc_t *p, prpriv_t *pprp)
4174 {
4175         mutex_enter(&p->p_crlock);
4176         cred2prpriv(p->p_cred, pprp);
4177         mutex_exit(&p->p_crlock);




4138                         }
4139                 }
4140                 ASSERT(tmp == NULL);
4141         } while ((seg = AS_SEGNEXT(as, seg)) != NULL);
4142 
4143         return (0);
4144 }
4145 
4146 /*
4147  * Return the process's credentials.  We don't need a 32-bit equivalent of
4148  * this function because prcred_t and prcred32_t are actually the same.
4149  */
4150 void
4151 prgetcred(proc_t *p, prcred_t *pcrp)
4152 {
4153         mutex_enter(&p->p_crlock);
4154         cred2prcred(p->p_cred, pcrp);
4155         mutex_exit(&p->p_crlock);
4156 }
4157 
4158 void
4159 prgetsecflags(proc_t *p, prsecflags_t *psfp)
4160 {
4161         ASSERT(psfp != NULL);
4162 
4163         psfp->pr_version = PRSECFLAGS_VERSION_CURRENT;
4164         psfp->pr_lower = p->p_secflags.psf_lower;
4165         psfp->pr_upper = p->p_secflags.psf_upper;
4166         psfp->pr_effective = p->p_secflags.psf_effective;
4167         psfp->pr_inherit = p->p_secflags.psf_inherit;
4168 }
4169 
4170 /*
4171  * Compute actual size of the prpriv_t structure.
4172  */
4173 
4174 size_t
4175 prgetprivsize(void)
4176 {
4177         return (priv_prgetprivsize(NULL));
4178 }
4179 
4180 /*
4181  * Return the process's privileges.  We don't need a 32-bit equivalent of
4182  * this function because prpriv_t and prpriv32_t are actually the same.
4183  */
4184 void
4185 prgetpriv(proc_t *p, prpriv_t *pprp)
4186 {
4187         mutex_enter(&p->p_crlock);
4188         cred2prpriv(p->p_cred, pprp);
4189         mutex_exit(&p->p_crlock);