jdk/test/sun/security/tools/policytool/UpdatePermissions.html
author juh
Mon, 21 Jan 2013 15:05:49 +0800
changeset 15282 4642fe251f37
parent 2 90ce3da70b43
child 17427 5e7f51b62b1d
permissions -rw-r--r--
8006092: SecurityPermission: printIdentity doesn't exist Reviewed-by: weijun
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>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
1) Click on the "Add Policy Entry" button in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
main policytool window.<br><br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
2) Click on the "Add Permission" button in the Policy Entry window.<br><br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
3) In the Permission window, pull down the "Permission" menu and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
select "AWTPermission".<br><br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
4) In the Permission window, pull down the "Target Name" menu and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
select "listenToAllAWTEvents".<br><br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
5) Click on the "OK" button in the Permission window.<br><br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
6) Click on the "Done" button in the Policy Entry window.<br><br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
7) In the main policytool window, pull down the "File" menu and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
select "Save As".<br><br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
8) In the SaveAs window, enter "/tmp/ptool.test" as the file name
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
and click "OK".<br><br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
9) cat /tmp/ptool.test<br><br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
10) check to make sure that the new entry is in the policy file.<br><br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
11) repeat steps 1-9 for:<br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
	AWTPermission:		readDisplayPixels<br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
	NetPermission:		specifyStreamHandler<br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
	RuntimePermission:	setContextClassLoader,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
				setSecurityManager,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
				shutdownHooks,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
				stopThread<br>
15282
4642fe251f37 8006092: SecurityPermission: printIdentity doesn't exist
juh
parents: 2
diff changeset
    45
	SecurityPermission:	createAccessControlContext<br><br>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
In the confirmation dialog pop-up, click "OK".<br><br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
Exit policytool.<br><br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
Press "Pass" if ... press "Fail" otherwise.<br><br>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
</body>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
</html>