test/jdk/sun/security/tools/policytool/UpdatePermissions.html
author erikj
Tue, 12 Sep 2017 19:03:39 +0200
changeset 47216 71c04702a3d5
parent 20886 jdk/test/sun/security/tools/policytool/UpdatePermissions.html@9630bb813a6c
permissions -rw-r--r--
8187443: Forest Consolidation: Move files to unified layout Reviewed-by: darcy, ihse
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
<html>
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
<body>
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
<applet width=100 height=100 code=UpdatePermissions.class>
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
</applet>
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
This is a multi-stage test.  Click on "done" when you have completed
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
reading these instructions.<br><br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
First, policytool will be invoked.<br><br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
Then, follow these steps:<br>
18169
deb6268716ef 8015274: TEST_BUG: Step2: After selecting 'View Warning Log', it is empty instead of FileNotFound.
weijun
parents: 17427
diff changeset
    13
0) Find (or create) a temporary directory that you have write access to.
deb6268716ef 8015274: TEST_BUG: Step2: After selecting 'View Warning Log', it is empty instead of FileNotFound.
weijun
parents: 17427
diff changeset
    14
(Example: 'C:\foo\tmp' on Windows or '/tmp' on other systems)<br><br>
20886
9630bb813a6c 7025699: Policy Tool is not accessible by keyboard
weijun
parents: 18169
diff changeset
    15
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
1) Click on the "Add Policy Entry" button in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
main policytool window.<br><br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
2) Click on the "Add Permission" button in the Policy Entry window.<br><br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
3) In the Permission window, pull down the "Permission" menu and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
select "AWTPermission".<br><br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
4) In the Permission window, pull down the "Target Name" menu and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
select "listenToAllAWTEvents".<br><br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
5) Click on the "OK" button in the Permission window.<br><br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
6) Click on the "Done" button in the Policy Entry window.<br><br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
7) In the main policytool window, pull down the "File" menu and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
select "Save As".<br><br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
8) In the SaveAs window, enter "/tmp/ptool.test" as the file name
20886
9630bb813a6c 7025699: Policy Tool is not accessible by keyboard
weijun
parents: 18169
diff changeset
    35
and save it. If the file already exists, just replace it.<br>
18169
deb6268716ef 8015274: TEST_BUG: Step2: After selecting 'View Warning Log', it is empty instead of FileNotFound.
weijun
parents: 17427
diff changeset
    36
(Or use the temporary directory mentioned in Step 0 if it's not '/tmp'.
deb6268716ef 8015274: TEST_BUG: Step2: After selecting 'View Warning Log', it is empty instead of FileNotFound.
weijun
parents: 17427
diff changeset
    37
For example, "C:\foo\tmp\ptool.test" on Windows)<br><br>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
18169
deb6268716ef 8015274: TEST_BUG: Step2: After selecting 'View Warning Log', it is empty instead of FileNotFound.
weijun
parents: 17427
diff changeset
    39
9) Check the content of the file created in the previous step<br><br>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
10) check to make sure that the new entry is in the policy file.<br><br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
17427
5e7f51b62b1d 8005922: TEST_BUG: There is no /tmp directory for windows system.
juh
parents: 15282
diff changeset
    43
11) repeat steps 1-10 for:<br>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
	AWTPermission:		readDisplayPixels<br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
	NetPermission:		specifyStreamHandler<br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
	RuntimePermission:	setContextClassLoader,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
				setSecurityManager,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
				shutdownHooks,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
				stopThread<br>
15282
4642fe251f37 8006092: SecurityPermission: printIdentity doesn't exist
juh
parents: 2
diff changeset
    50
	SecurityPermission:	createAccessControlContext<br><br>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
In the confirmation dialog pop-up, click "OK".<br><br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
18169
deb6268716ef 8015274: TEST_BUG: Step2: After selecting 'View Warning Log', it is empty instead of FileNotFound.
weijun
parents: 17427
diff changeset
    54
Exit policytool. Delete the files created during this test. If the
deb6268716ef 8015274: TEST_BUG: Step2: After selecting 'View Warning Log', it is empty instead of FileNotFound.
weijun
parents: 17427
diff changeset
    55
temporary directory is also newly created, empty and delete it.<br><br>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
Press "Pass" if ... press "Fail" otherwise.<br><br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
</body>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
</html>