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

policytool does not properly convert single backslash to double backslash

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 6
    • 1.4.2_04, 6
    • security-libs
    • None
    • beta
    • generic, x86
    • generic, windows_xp

      I had a policy file containing something like

      grant signedBy "signature" {
        permission java.io.FilePermission "Y:\\Data\\-", "read,write,delete";
      };

      Then I loaded it into the java policy tool edited something and saved it.
      reloaded the file and undid the previous change.
      The result was something like the following:

      grant signedBy "signature" {
        permission java.io.FilePermission "Y:Data-", "read,write,delete";
      };


      each save removes one level of \ from each use in the paths
      - so it looks like the string parsing is seeing \ as an escape, as we
      know by putting in \\ in the first place - but the file *reading* isn't
      turning the resulting \ back into a \\ when it re-saves it, so that this
      happens?
      ###@###.### 2005-06-23 23:22:58 GMT

            weijun Weijun Wang
            claisunw Charlie Lai (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: