Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8187220

postinstall fails if there is a space in user name

    XMLWordPrintable

Details

    • b01
    • generic
    • os_x
    • Verified

    Backports

      Description

        FULL PRODUCT VERSION :
        java version "1.8.0_144"
        Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
        Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

        ADDITIONAL OS VERSION INFORMATION :
        Darwin 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64

        EXTRA RELEVANT SYSTEM CONFIGURATION :
        User name has a space in it.

        A DESCRIPTION OF THE PROBLEM :
        This line in the ./postinstall is incorrect and will fail if the username has a space in it:

        ${SU} - ${CONSOLE_USER} -c "${LSREGISTER} -f ${JWS_APP}"

        I believe the correction should be:

        ${SU} - "${CONSOLE_USER}" -c "${LSREGISTER} -f ${JWS_APP}"


        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Create an OSX user with a space in name e.g. "my user" and attempt JDK installation

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        JDK install succeeds.
        ACTUAL -
        JDK install fails



        ERROR MESSAGES/STACK TRACES THAT OCCUR :
        Aug 22 12:06:29 MACHINE installd[1106]: ./postinstall: at com.oracle.install.InstallOptions.parseArguments(InstallOptions.java:102)
        Aug 22 12:06:29 MACHINE installd[1106]: ./postinstall: at com.oracle.install.InstallOptions.main(InstallOptions.java:46)
        Aug 22 12:06:29 MACHINE installd[1106]: ./postinstall: su: unknown login: senn


        REPRODUCIBILITY :
        This bug can be reproduced always.

        CUSTOMER SUBMITTED WORKAROUND :
        Install with another user without a space in username.

        Note: patch included above to fix the problem.

        Attachments

          Issue Links

            Activity

              People

                ssadetsky Semyon Sadetsky (Inactive)
                webbuggrp Webbug Group
                Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: