Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3d162c0

Browse files
committed
Please pull this patch. It breaks JDBC1 support. The JDBC1 code no
longer compiles, due to objects being referenced in this patch that donot exist in JDK1.1.Barry Lind---------------------------------------------------------------------------The JDBC driver requires permission java.net.SocketPermission "host:port", "connect";in the policy file of the application using the JDBC driverin the postgresql.jar file. Since the Socket() call in thedriver is not protected by AccessController.doPrivileged() thispermission must also be granted to the entire application.
1 parente1635b4 commit3d162c0

File tree

1 file changed

+2
-28
lines changed

1 file changed

+2
-28
lines changed

‎src/interfaces/jdbc/org/postgresql/PG_Stream.java

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@
55
importjava.net.*;
66
importjava.util.*;
77
importjava.sql.*;
8-
importjava.security.*;
98
importorg.postgresql.*;
109
importorg.postgresql.core.*;
1110
importorg.postgresql.util.*;
1211

1312
/**
14-
* $Id: PG_Stream.java,v 1.12 2001/08/2601:06:20 momjian Exp $
13+
* $Id: PG_Stream.java,v 1.13 2001/08/2617:08:48 momjian Exp $
1514
*
1615
* This class is used by Connection & PGlobj for communicating with the
1716
* backend.
@@ -29,25 +28,6 @@ public class PG_Stream
2928
BytePoolDim1bytePoolDim1 =newBytePoolDim1();
3029
BytePoolDim2bytePoolDim2 =newBytePoolDim2();
3130

32-
privatestaticclassPrivilegedSocket
33-
implementsPrivilegedExceptionAction
34-
{
35-
privateStringhost;
36-
privateintport;
37-
38-
PrivilegedSocket(Stringhost,intport)
39-
{
40-
this.host =host;
41-
this.port =port;
42-
}
43-
44-
publicObjectrun()throwsException
45-
{
46-
returnnewSocket(host,port);
47-
}
48-
}
49-
50-
5131
/**
5232
* Constructor: Connect to the PostgreSQL back end and return
5333
* a stream connection.
@@ -58,13 +38,7 @@ public Object run() throws Exception
5838
*/
5939
publicPG_Stream(Stringhost,intport)throwsIOException
6040
{
61-
PrivilegedSocketps =newPrivilegedSocket(host,port);
62-
try {
63-
connection = (Socket)AccessController.doPrivileged(ps);
64-
}
65-
catch(PrivilegedActionExceptionpae){
66-
throw (IOException)pae.getException();
67-
}
41+
connection =newSocket(host,port);
6842

6943
// Submitted by Jason Venner <jason@idiom.com> adds a 10x speed
7044
// improvement on FreeBSD machines (caused by a bug in their TCP Stack)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp