United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-4930594 UnixPrintServiceLookup should not require file permission
JDK-4930594 : UnixPrintServiceLookup should not require file permission

Details
Type:
Bug
Submit Date:
2003-09-30
Status:
Resolved
Updated Date:
2003-10-27
Project Name:
JDK
Resolved Date:
2003-10-27
Component:
client-libs
OS:
solaris_9
Sub-Component:
2d
CPU:
sparc,generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
1.1,1.4.2_04,5.0
Fixed Versions:
5.0 (b26)

Related Reports
Backport:
Duplicate:
Duplicate:

Sub Tasks

Description
PrinterJob.getPrintService() will always return null in the sandbox
 (solaris only)

This is because in UnixPrintServiceLookup.java, method execCmd, it tries
to execute lpstat to find out the available print service on the system,
and redirects the lpstat output to a temp file created with
File.createTempFile.

But File.createTempFile will fail in the sandbox because we don't have
permissions to create file on the local system.  So all the lookup on
print service will return null.

                                    

Comments
EVALUATION

Need to put doPrivileged block in execCmd that creates the temporary file.

###@###.### 2003-09-30
                                     
2003-09-30
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
tiger
tiger-beta

FIXED IN:
tiger
tiger-beta

INTEGRATED IN:
tiger-b26
tiger-beta


                                     
2004-06-14



Hardware and Software, Engineered to Work Together