Print this page
uts: Allow for address space randomisation.
Randomise the base addresses of shared objects, non-fixed mappings, the
stack and the heap. Introduce a service, svc:/system/process-security,
and a tool psecflags(1) to control and observe it
@@ -1085,10 +1085,15 @@
cp->p_usrstack = pp->p_usrstack;
cp->p_model = pp->p_model;
cp->p_ppid = pp->p_pid;
cp->p_ancpid = pp->p_pid;
cp->p_portcnt = pp->p_portcnt;
+ /*
+ * Security flags are preserved on fork, the inherited copy come into
+ * effect on exec
+ */
+ bcopy(&pp->p_secflags, &cp->p_secflags, sizeof (psecflags_t));
/*
* Initialize watchpoint structures
*/
avl_create(&cp->p_warea, wa_compare, sizeof (struct watched_area),