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

Edit US DST Timezone Updater 1.0.1 page for umask values

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.1
    • 5.0u11
    • docs
    • None
    • 1.0.1
    • 1.1
    • sparc
    • solaris
    • Verified

      This is an RFE to correct a document bug at the URL, http://java.sun.com/javase/tzupdater_README.html, that describes how to use the tzupdater tool.

      One customer asked for verification if running the command /usr/java/jre/bin/java -jar /tmp/tzupdater.jar -u will change the ownership/permissions of any related files based on
      umask of the owner running the command.

      I tested tzupdater using the default umask of 0022. It did not change the ownership/permissions of any directories or files.

      Another engineer tried an umask of 0077 and it failed.

      # umask 077
      # umask
      0077
      # java -jar tzupdater.jar -u -v
      java.home: /extra/java/j2sdk/jdk1.6.0/jre
      java.vendor: Sun Microsystems Inc.
      java.version: 1.6.0
      JRE time zone data version: tzdata2006p
      Embedded time zone data version: tzdata2007a
      Extracting files... done.
      Renaming directories... done.
      Validating the new time zone data... done.
      Time zone data update is complete.

      # pwd
      /extra/java/j2sdk/jdk1.6.0/jre/lib/zi
      # ls -la Zone*
      -r-------- 1 root root 13816 Jan 26 15:18 ZoneInfoMappings
      # ls -ld .
      drwx------ 13 root root 512 Feb 27 15:41 .


      Running an application which uses the ZoneInfoMappings ...

      ZoneInfo: /extra/java/j2sdk/jdk1.6.0/jre/lib/zi/ZoneInfoMappings (Permission denied)

      and in worst case ...

      Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
              at sun.util.calendar.ZoneInfoFile.getZoneIDs(ZoneInfoFile.java:718)
              at sun.util.calendar.ZoneInfo.getAvailableIDs(ZoneInfo.java:507)
              at java.util.TimeZone.getAvailableIDs(TimeZone.java:497)

      ... the application hangs which can lead to data loss!

      So the webpage must be edited to let users know to use only the default umask of 0022. Using other values for umask will change file permissions and cause problems with the JRE.

            kevinw Kevin Walls
            tstatt Terry Statt (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: