diff options
author | acruz <none@none> | 2008-02-25 11:01:04 -0800 |
---|---|---|
committer | acruz <none@none> | 2008-02-25 11:01:04 -0800 |
commit | 7b209c2cc5ea45251aba06dcc6181d3f23da807a (patch) | |
tree | db92a12506ec33965457a31f4ef6deef468d8902 /usr/src/cmd/cmd-inet/usr.lib/inetd/contracts.c | |
parent | 253f5c5de73715b2f8a40cc25aeb832cad8deb26 (diff) | |
download | illumos-gate-7b209c2cc5ea45251aba06dcc6181d3f23da807a.tar.gz |
PSARC 2008/046 Process Contract Decorations
5079353 RFE: contract 'decoration' with service FMRI
Diffstat (limited to 'usr/src/cmd/cmd-inet/usr.lib/inetd/contracts.c')
-rw-r--r-- | usr/src/cmd/cmd-inet/usr.lib/inetd/contracts.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/usr/src/cmd/cmd-inet/usr.lib/inetd/contracts.c b/usr/src/cmd/cmd-inet/usr.lib/inetd/contracts.c index 5b02d4ea89..076e003698 100644 --- a/usr/src/cmd/cmd-inet/usr.lib/inetd/contracts.c +++ b/usr/src/cmd/cmd-inet/usr.lib/inetd/contracts.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -118,10 +117,22 @@ contract_fini(void) * contract template. */ int -contract_prefork(void) +contract_prefork(const char *fmri, int method) { int err; + if ((err = ct_pr_tmpl_set_svc_fmri(active_tmpl_fd, fmri)) != 0) { + error_msg(gettext("Failed to set svc_fmri term: %s"), + strerror(err)); + return (-1); + } + if ((err = ct_pr_tmpl_set_svc_aux(active_tmpl_fd, + methods[method].name)) != 0) { + error_msg(gettext("Failed to set svc_aux term: %s"), + strerror(err)); + return (-1); + } + debug_msg("Entering contract_prefork"); if ((err = ct_tmpl_activate(active_tmpl_fd)) != 0) { |