I'm submitting this case as Closed Approved Automatic on behalf of Sean 
Wilcox, as I believe the changes are obvious and straightforward.  If any 
ARC member would like this converted to a fasttrack, please let us know.

liane

---
Minor SMF method_context/credential updates
Sean Wilcox
2/11/2009

1. Summary
    smf(5)/Greenline (PSARC 2002/547) provides the service_bundle(4)
    XML DTD.  The method_context and method_credential attributes can
    override inherited settings with default values if not set in the
    child definitions.  Relaxing the default settings to be implied
    settings would eliminate this incorrect inheritance.

2. Details
    Currently a method_context configured at the service level with a
    specific attribute can be overriden by configuring a method_context
    at the instance level without the attribute property set.  Not
    setting the attribute causes the "default" value to be taken from
    the dtd.  By relaxing the default value to the XML keyword #IMPLIED
    the child level setting will not get a default setting, and the
    parent attribute will inherit inward as intended.  This simplifies
    the method_context definitions so as to only need to configure those
    properties to be overridden at the child level.

    svccfg on import will handle the #IMPLIED setting for an attribute
    by not setting the attribute to any value in the repository.  An
    attribute will not exist in the repository if it does not exist in
    the manifest.  When constructing the method context for execution
    defaults are used in place of non-existent repository entries.

    The private restarter_get_method_context() function called by
    svc.startd will be modified to provide equivalent behaviour for
    method context defaults as the current implementation.  These
    features are there to handle non-existent properties that are
    implied, and provide default values when a method_context is used.
    If a method_context property group is used, a missing attribute
    (one not set in the method_context) will use the default values as
    described in smf_method(5).  If no method_context property group
    is used then the default intent is to act as the previous init
    process of rc scripts acted and start the service with uid = 0,
    gid = 0 and working_directory of '/'.

    The changes described in this case do not require modifications to
    an existing manifests.

3. Interface Table
         service_bundle.dtd.1            Committed
         restarter_get_method_context    Project Private


5. Additional Materials
         service_bundle.dtd.1 diffs :

@@ -442,14 +442,14 @@

  <!ELEMENT method_credential EMPTY>

  <!ATTLIST method_credential
          user            CDATA #REQUIRED
-        group           CDATA ":default"
-        supp_groups     CDATA ":default"
-        privileges      CDATA ":default"
-        limit_privileges CDATA ":default" >
+        group           CDATA #IMPLIED
+        supp_groups     CDATA #IMPLIED
+        privileges      CDATA #IMPLIED
+        limit_privileges CDATA #IMPLIED >

  <!--
    method_context

      This element combines credential and resource management attributes

@@ -476,13 +476,13 @@
  -->
  <!ELEMENT method_context
          ( (method_profile | method_credential)?, method_environment? ) >

  <!ATTLIST method_context
-        working_directory       CDATA ":default"
-        project                 CDATA ":default"
-        resource_pool           CDATA ":default" >
+        working_directory       CDATA #IMPLIED
+        project                 CDATA #IMPLIED
+        resource_pool           CDATA #IMPLIED >

  <!-- Restarter delegation, methods, and monitors -->

  <!--
    exec_method


Reply via email to