db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r425126 - in /db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary: StatementPermission.java StatementRoutinePermission.java StatementSchemaPermission.java StatementTablePermission.java
Date Mon, 24 Jul 2006 17:27:36 GMT
Author: djd
Date: Mon Jul 24 10:27:36 2006
New Revision: 425126

URL: http://svn.apache.org/viewvc?rev=425126&view=rev
Log:
Minor cleanup on the StatementPermission objects, clarify that these classes represent the
permissions required by a statement (not used) and change come fields to private to avoid
other code being able to change them to subvert the system.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/StatementPermission.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/StatementRoutinePermission.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/StatementSchemaPermission.java
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/StatementTablePermission.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/StatementPermission.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/StatementPermission.java?rev=425126&r1=425125&r2=425126&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/StatementPermission.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/StatementPermission.java
Mon Jul 24 10:27:36 2006
@@ -24,11 +24,20 @@
 import org.apache.derby.iapi.error.StandardException;
 
 /**
- * This class describes a permission used (required) by a statement.
+ * This class describes a permission require by a statement.
  */
 
 public abstract class StatementPermission
 {
+	/**
+	 * Restrict implementations to this package to reduce
+	 * risk of external code spoofing the GRANT/REVOKE system
+	 * by providing its own fake implementations.
+	 *
+	 */
+	StatementPermission()
+	{
+	}
 	/**
 	 * @param lcc				LanguageConnectionContext
 	 * @param authorizationId	AuthorizationId

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/StatementRoutinePermission.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/StatementRoutinePermission.java?rev=425126&r1=425125&r2=425126&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/StatementRoutinePermission.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/StatementRoutinePermission.java
Mon Jul 24 10:27:36 2006
@@ -29,12 +29,13 @@
 import org.apache.derby.iapi.store.access.TransactionController;
 
 /**
- * This class describes a routine permission used (required) by a statement.
+ * This class describes a routine execute permission
+ * required by a statement.
  */
 
-public class StatementRoutinePermission extends StatementPermission
+public final class StatementRoutinePermission extends StatementPermission
 {
-	protected UUID routineUUID;
+	private UUID routineUUID;
 
 	public StatementRoutinePermission( UUID routineUUID)
 	{

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/StatementSchemaPermission.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/StatementSchemaPermission.java?rev=425126&r1=425125&r2=425126&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/StatementSchemaPermission.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/StatementSchemaPermission.java
Mon Jul 24 10:27:36 2006
@@ -28,14 +28,14 @@
 import org.apache.derby.iapi.store.access.TransactionController;
 
 /**
- * This class describes a schema permission used (required) by a statement.
+ * This class describes a schema permission required by a statement.
  */
 
 public class StatementSchemaPermission extends StatementPermission
 {
-	protected String schemaName;
-	protected String aid;
-	protected boolean privType;
+	private String schemaName;
+	private String aid;
+	private boolean privType;
 
 	public StatementSchemaPermission(String schemaName, String aid, boolean privType)
 	{

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/StatementTablePermission.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/StatementTablePermission.java?rev=425126&r1=425125&r2=425126&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/StatementTablePermission.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/dictionary/StatementTablePermission.java
Mon Jul 24 10:27:36 2006
@@ -27,13 +27,13 @@
 import org.apache.derby.iapi.reference.SQLState;
 
 /**
- * This class describes a table permission used (required) by a statement.
+ * This class describes a table permission required by a statement.
  */
 
 public class StatementTablePermission extends StatementPermission
 {
-	protected UUID tableUUID;
-	protected int privType; // One of Authorizer.SELECT_PRIV, UPDATE_PRIV, etc.
+	UUID tableUUID;
+	int privType; // One of Authorizer.SELECT_PRIV, UPDATE_PRIV, etc.
 
 	/**
 	 * Constructor for StatementTablePermission. Creates an instance of



Mime
View raw message