OpenSolaris

Printable Version Enter a New Search
Bug ID 6611124
Synopsis inetconv may create manifests that svccfg cannot import
State 10-Fix Delivered (Fix available in build)
Category:Subcategory network:inetd
Keywords opensolaris | oss-request | oss-sponsor
Sponsor Truong Q Nguyen
Submitter ceri
Responsible Engineer Truong Q Nguyen
Reported Against snv_73
Duplicate Of
Introduced In solaris_10
Commit to Fix snv_78
Fixed In snv_78
Release Fixed solaris_nevada(snv_78)
Related Bugs 5074180
Submit Date 28-September-2007
Last Update Date 21-November-2007
Description
Category
   pam
Sub-Category
   framework
Description
   Services listed in /etc/services (hereafter referred to as "IANA services") are allowed to contain the character '.', and entries configured as such can be used in inetd.conf in Solaris 8 and Solaris 9.
For example, an IANA service named "a.wibble" can be created like so:
   echo a.wibble 12345/udp >> /etc/services
and then used in inetd.conf with the following command:
  echo a.wibble dgram udp wait nobody /bin/date
The inetconv(1M) command supplied in Solaris 10 and OpenSolaris is used to convert such entries to inetd-controlled services (hereafter referred to as "SMF services"), by first creating a service manifest and then importing the manifest with svccfg(1M).
However, svccfg (or rather, libscf(3LIB)) does not allow SMF service names to contain the character '.' and so, in the above case, importing the manifest created by inetconv(1M) will fail.
Frequency
   Always
Regression
   No
Steps to Reproduce
   
Configure the IANA service:
  # echo a.inetconvtest 12345/udp >> /etc/services
Configure a temporary file containing the inetd entry:
  # echo a.inetconvtest dgram udp wait nobody /bin/true > inetconv_inetd
Attempt to convert this entry to an SMF service:
  #  /usr/sbin/inetconv -f -i inetconv_inetd 
  a.inetconvtest -> /var/svc/manifest/network/a.inetconvtest-udp.xml
  Importing a.inetconvtest-udp.xml ...svccfg: "network/a.inetconvtest/udp" is an invalid service name.
  Cannot import.
  svccfg: Import of /var/svc/manifest/network/a.inetconvtest-udp.xml failed.  Progress:
  svccfg:   Service "network/a.inetconvtest/udp": not reached.
  svccfg:     Instance "default": not reached.
  Done
Check if the SMF service was created:
  # inetadm |grep inetconv
  #
Expected Result
   
The command completes and the new service is created and enabled.
  # /usr/sbin/inetconv -f -i inetconv_inetd 
  a.inetconvtest -> /var/svc/manifest/network/a.inetconvtest-udp.xml
  Importing a.inetconvtest-udp.xml ...Done
  # inetadm |grep inetcon
  enabled   online         svc:/network/a_inetconvtest/udp:default
Actual Result
   The command fails and the new service is not created or enabled.
  #  /usr/sbin/inetconv -f -i inetconv_inetd 
  a.inetconvtest -> /var/svc/manifest/network/a.inetconvtest-udp.xml
  Importing a.inetconvtest-udp.xml ...svccfg: "network/a.inetconvtest/udp" is an invalid service name.
  Cannot import.
  svccfg: Import of /var/svc/manifest/network/a.inetconvtest-udp.xml failed.  Progress:
  svccfg:   Service "network/a.inetconvtest/udp": not reached.
  svccfg:     Instance "default": not reached.
  Done
  # inetadm |grep inetconv
  #
Error Message(s)
     #  /usr/sbin/inetconv -f -i inetconv_inetd 
  a.inetconvtest -> /var/svc/manifest/network/a.inetconvtest-udp.xml
  Importing a.inetconvtest-udp.xml ...svccfg: "network/a.inetconvtest/udp" is an invalid service name.
  Cannot import.
  svccfg: Import of /var/svc/manifest/network/a.inetconvtest-udp.xml failed.  Progress:
  svccfg:   Service "network/a.inetconvtest/udp": not reached.
  svccfg:     Instance "default": not reached.
  Done
  # inetadm |grep inetconv
  #
Test Case
   N/A
Workaround
   Editing the service manifest created by inetconv(1M) to replace the '.' in the service name with a '_' character, then importing the manifest.
I have created a patch to inetconv which does this programmatically; please note that I do not understand the sponsor request process and if this patch never turns up in the bug database, please email me at  xxxxx@xxxxx.net and I will provide it.
Submitter wants to work on bug
   Yes
Additional configuration information
   Nothing of note.
Work Around
N/A
Comments
N/A