test/sun/security/tools/policytool/UpdatePermissions.html

Print this page
rev 7201 : 8015274: TEST_BUG: Step2: After selecting 'View Warning Log', it is empty instead of FileNotFound.
8015276: TEST_BUG: The 'ptool.test' can't be saved in the 'tmp' folder.
   1 <html>
   2 <body>
   3 
   4 <applet width=100 height=100 code=UpdatePermissions.class>
   5 </applet>
   6 
   7 This is a multi-stage test.  Click on "done" when you have completed
   8 reading these instructions.<br><br>
   9 
  10 First, policytool will be invoked.<br><br>
  11 
  12 Then, follow these steps:<br>
  13 0) If testing on Windows, create a temporary directory.
  14 (Example: C:\foo\tmp)<br><br>
  15 1) Click on the "Add Policy Entry" button in the
  16 main policytool window.<br><br>
  17 
  18 2) Click on the "Add Permission" button in the Policy Entry window.<br><br>
  19 
  20 3) In the Permission window, pull down the "Permission" menu and
  21 select "AWTPermission".<br><br>
  22 
  23 4) In the Permission window, pull down the "Target Name" menu and
  24 select "listenToAllAWTEvents".<br><br>
  25 
  26 5) Click on the "OK" button in the Permission window.<br><br>
  27 
  28 6) Click on the "Done" button in the Policy Entry window.<br><br>
  29 
  30 7) In the main policytool window, pull down the "File" menu and
  31 select "Save As".<br><br>
  32 
  33 8) In the SaveAs window, enter "/tmp/ptool.test" as the file name
  34 and click "OK".<br>
  35 If testing on Windows, use the temporary directory created in Step 0.
  36 (Example: Save as "C:\foo\tmp\ptool.test")<br><br>
  37 
  38 9) cat /tmp/ptool.test<br>
  39 If testing on Windows, check the contents of the file created in the previous
  40 step.<br><br>
  41 

  42 
  43 10) check to make sure that the new entry is in the policy file.<br><br>
  44 
  45 11) repeat steps 1-10 for:<br>
  46         AWTPermission:          readDisplayPixels<br>
  47         NetPermission:          specifyStreamHandler<br>
  48         RuntimePermission:      setContextClassLoader,
  49                                 setSecurityManager,
  50                                 shutdownHooks,
  51                                 stopThread<br>
  52         SecurityPermission:     createAccessControlContext<br><br>
  53 
  54 In the confirmation dialog pop-up, click "OK".<br><br>
  55 
  56 Exit policytool. If testing on Windows, delete the temporary directory and its
  57 contents created during this test.<br><br>
  58 
  59 Press "Pass" if ... press "Fail" otherwise.<br><br>
  60 
  61 </body>
  62 </html>
   1 <html>
   2 <body>
   3 
   4 <applet width=100 height=100 code=UpdatePermissions.class>
   5 </applet>
   6 
   7 This is a multi-stage test.  Click on "done" when you have completed
   8 reading these instructions.<br><br>
   9 
  10 First, policytool will be invoked.<br><br>
  11 
  12 Then, follow these steps:<br>
  13 0) Find (or create) a temporary directory that you have write access to.
  14 (Example: 'C:\foo\tmp' on Windows or '/tmp' on other systems)<br><br>
  15 1) Click on the "Add Policy Entry" button in the
  16 main policytool window.<br><br>
  17 
  18 2) Click on the "Add Permission" button in the Policy Entry window.<br><br>
  19 
  20 3) In the Permission window, pull down the "Permission" menu and
  21 select "AWTPermission".<br><br>
  22 
  23 4) In the Permission window, pull down the "Target Name" menu and
  24 select "listenToAllAWTEvents".<br><br>
  25 
  26 5) Click on the "OK" button in the Permission window.<br><br>
  27 
  28 6) Click on the "Done" button in the Policy Entry window.<br><br>
  29 
  30 7) In the main policytool window, pull down the "File" menu and
  31 select "Save As".<br><br>
  32 
  33 8) In the SaveAs window, enter "/tmp/ptool.test" as the file name
  34 and click "OK".<br>
  35 (Or use the temporary directory mentioned in Step 0 if it's not '/tmp'.
  36 For example, "C:\foo\tmp\ptool.test" on Windows)<br><br>




  37 
  38 9) Check the content of the file created in the previous step<br><br>
  39 
  40 10) check to make sure that the new entry is in the policy file.<br><br>
  41 
  42 11) repeat steps 1-10 for:<br>
  43         AWTPermission:          readDisplayPixels<br>
  44         NetPermission:          specifyStreamHandler<br>
  45         RuntimePermission:      setContextClassLoader,
  46                                 setSecurityManager,
  47                                 shutdownHooks,
  48                                 stopThread<br>
  49         SecurityPermission:     createAccessControlContext<br><br>
  50 
  51 In the confirmation dialog pop-up, click "OK".<br><br>
  52 
  53 Exit policytool. Delete the files created during this test. If the
  54 temporary directory is also newly created, empty and delete it.<br><br>
  55 
  56 Press "Pass" if ... press "Fail" otherwise.<br><br>
  57 
  58 </body>
  59 </html>