summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/openbsd-compat/port-solaris.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2006-11-10 16:39:21 +0000
committerdes <des@FreeBSD.org>2006-11-10 16:39:21 +0000
commitf591b3e29c677bff2b0f0d482490554c419128fd (patch)
tree209e642fbe2a816041f67bc27c9800879f5541bc /crypto/openssh/openbsd-compat/port-solaris.c
parente6cc400c8f011e212207834669aaf4b62bee951e (diff)
downloadFreeBSD-src-f591b3e29c677bff2b0f0d482490554c419128fd.zip
FreeBSD-src-f591b3e29c677bff2b0f0d482490554c419128fd.tar.gz
Vendor import of OpenSSH 4.5p1.
Diffstat (limited to 'crypto/openssh/openbsd-compat/port-solaris.c')
-rw-r--r--crypto/openssh/openbsd-compat/port-solaris.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/crypto/openssh/openbsd-compat/port-solaris.c b/crypto/openssh/openbsd-compat/port-solaris.c
index f57433e..2ab64d4 100644
--- a/crypto/openssh/openbsd-compat/port-solaris.c
+++ b/crypto/openssh/openbsd-compat/port-solaris.c
@@ -1,4 +1,4 @@
-/* $Id: port-solaris.c,v 1.2 2006/09/01 05:38:41 djm Exp $ */
+/* $Id: port-solaris.c,v 1.3 2006/10/31 23:28:49 dtucker Exp $ */
/*
* Copyright (c) 2006 Chad Mynhier.
@@ -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) {
OpenPOWER on IntegriCloud