]> andersk Git - gssapi-openssh.git/blobdiff - openssh/openbsd-compat/port-solaris.c
Import of OpenSSH 4.5p1
[gssapi-openssh.git] / openssh / openbsd-compat / port-solaris.c
index 8c773bd00bd0e0b739915a498c9debe93b1bcd61..ca08a155645b15d672587b1e7b7879a722393513 100644 (file)
@@ -86,18 +86,27 @@ solaris_contract_pre_fork(void)
        debug2("%s: setting up process contract template on fd %d",
            __func__, tmpl_fd);
 
-       /* We have to set certain attributes before activating the template */
-       if (ct_pr_tmpl_set_fatal(tmpl_fd,
-           CT_PR_EV_HWERR|CT_PR_EV_SIGNAL|CT_PR_EV_CORE) != 0) {
+       /* First we set the template parameters and event sets. */
+       if (ct_pr_tmpl_set_param(tmpl_fd, CT_PR_PGRPONLY) != 0) {
+               error("%s: Error setting process contract parameter set "
+                   "(pgrponly): %s", __func__, strerror(errno));
+               goto fail;
+       }
+       if (ct_pr_tmpl_set_fatal(tmpl_fd, CT_PR_EV_HWERR) != 0) {
                error("%s: Error setting process contract template "
                    "fatal events: %s", __func__, strerror(errno));
                goto fail;
        }
-       if (ct_tmpl_set_critical(tmpl_fd, CT_PR_EV_HWERR) != 0) {
+       if (ct_tmpl_set_critical(tmpl_fd, 0) != 0) {
                error("%s: Error setting process contract template "
                    "critical events: %s", __func__, strerror(errno));
                goto fail;
        }
+       if (ct_tmpl_set_informative(tmpl_fd, CT_PR_EV_HWERR) != 0) {
+               error("%s: Error setting process contract template "
+                   "informative events: %s", __func__, strerror(errno));
+               goto fail;
+       }
 
        /* Now make this the active template for this process. */
        if (ct_tmpl_activate(tmpl_fd) != 0) {
This page took 0.087232 seconds and 4 git commands to generate.