DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5769>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5769

NT Service display name should not be used as service name

           Summary: NT Service display name should not be used as service
                    name
           Product: Tomcat 3
           Version: 3.3 Final
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Unknown
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


We've encountered a problem with the way jk_nt_service.c creates nt services.

Specifically, the call to CreateService uses the name passed in for the service 
as both the service name and the service display name.  This is a problem 
because there are restrictions on the service name that do not apply to the 
display name.  The MS documentation states that neither forward nor back slashes 
are allowed but in practice I have found that other characters cause problems as 
well.

For example, if you create a service via jk_nt_service -i "My Service" 
wrapper.properties the service creates just fine but it fails to start.

Since the MS source is not readily available we can't check on what the REAL 
rules are for the internal service name.

To be safe, a solution I have used in the past is to treat the name passed in 
via the command line as the display name, and then remove all non-alphanumeric 
characters to generate the internal service name.

This is cheap, but might cause trouble if you are unlucky enough to have 
multiple service display names mapping to a single internal name as in "My 
Service 1.1" and "My Service 11".

An alternative that fixes this is to convert non alphanumerics to their hex 
representation.

I will attach patches for both approaches - option1 removes non alphanumerics 
from the display name while option2 encodes them.

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to