You can use the coreadm command to enable or disable setuid programs to produce core files for all system processes or on a per-process basis by setting the following paths:
If the global setuid option is enabled, a global core file path allows all setuid programs on a system to produce core files.
If the per-process setuid option is enable, a per-process core file path allows specific setuid processes to produce core files.
By default, both flags are disabled. For security reasons, the global core file path must be a full pathname, starting with a leading /. If superuser disables per-process core files, individual users cannot obtain core files.
The setuid core files are owned by superuser with read/write permissions for superuser only. Regular users cannot access them even if the process that produced the setuid core file was owned by an ordinary user.
For more information, see coreadm(1M).