db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r634993 - in /db/derby/code/trunk/java/engine/org/apache/derby: iapi/security/SecurityUtil.java jdbc/Driver169.java jdbc/Driver20.java jdbc/InternalDriver.java
Date Sat, 08 Mar 2008 16:00:40 GMT
Author: djd
Date: Sat Mar  8 08:00:27 2008
New Revision: 634993

URL: http://svn.apache.org/viewvc?rev=634993&view=rev
Log:
DERBY-2109 Minor cleanup of the security code added for system permissions to change methods
not to be public, add a minor comment and fix a file header

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/security/SecurityUtil.java
    db/derby/code/trunk/java/engine/org/apache/derby/jdbc/Driver169.java
    db/derby/code/trunk/java/engine/org/apache/derby/jdbc/Driver20.java
    db/derby/code/trunk/java/engine/org/apache/derby/jdbc/InternalDriver.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/security/SecurityUtil.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/security/SecurityUtil.java?rev=634993&r1=634992&r2=634993&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/security/SecurityUtil.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/security/SecurityUtil.java Sat Mar
 8 08:00:27 2008
@@ -1,6 +1,6 @@
 /*
 
-   Derby - Class org.apache.derby.security.SystemPermission
+   Derby - Class org.apache.derby.iapi.security.SecurityUtil
 
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
@@ -45,7 +45,8 @@
 public class SecurityUtil {
 
     /**
-     * Creates a (read-only) Subject representing a given user.
+     * Creates a (read-only) Subject representing a given user
+     * as a System user within Derby.
      *
      * @param user the user name
      * @return a Subject representing the user by its exact and normalized name
@@ -126,7 +127,8 @@
         final PrivilegedAction runCheckAsPrivilegedUser
             = new PrivilegedAction() {
                     public Object run() {
-                        // run check as subject with new access control context
+                        // run check only using the the subject
+                        // (by using null as the AccessControlContext)
                         final AccessControlContext acc = null;
                         Subject.doAsPrivileged(subject, runCheck, acc);
                         return null;

Modified: db/derby/code/trunk/java/engine/org/apache/derby/jdbc/Driver169.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/jdbc/Driver169.java?rev=634993&r1=634992&r2=634993&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/jdbc/Driver169.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/jdbc/Driver169.java Sat Mar  8 08:00:27
2008
@@ -140,7 +140,7 @@
      * @throws AccessControlException if permissions are missing
      * @throws Exception if the privileges check fails for some other reason
      */
-    public void checkSystemPrivileges(String user,
+    void checkSystemPrivileges(String user,
                                       Permission perm)
         throws Exception {
         // no checks -- some of the javax security classes not available

Modified: db/derby/code/trunk/java/engine/org/apache/derby/jdbc/Driver20.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/jdbc/Driver20.java?rev=634993&r1=634992&r2=634993&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/jdbc/Driver20.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/jdbc/Driver20.java Sat Mar  8 08:00:27
2008
@@ -216,7 +216,7 @@
      * @throws AccessControlException if permissions are missing
      * @throws Exception if the privileges check fails for some other reason
      */
-    public void checkSystemPrivileges(String user,
+    void checkSystemPrivileges(String user,
                                       Permission perm)
         throws Exception {
         SecurityUtil.checkUserHasPermission(user, perm);

Modified: db/derby/code/trunk/java/engine/org/apache/derby/jdbc/InternalDriver.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/jdbc/InternalDriver.java?rev=634993&r1=634992&r2=634993&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/jdbc/InternalDriver.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/jdbc/InternalDriver.java Sat Mar  8 08:00:27
2008
@@ -268,7 +268,7 @@
      * @throws AccessControlException if permissions are missing
      * @throws Exception if the privileges check fails for some other reason
      */
-    abstract public void checkSystemPrivileges(String user,
+    abstract void checkSystemPrivileges(String user,
                                                Permission perm)
         throws Exception;
 
@@ -294,7 +294,7 @@
      * @param user The user to be checked for shutdown privileges
      * @throws SQLException if the privileges check fails
      */
-    public void checkShutdownPrivileges(String user) throws SQLException {
+    private void checkShutdownPrivileges(String user) throws SQLException {
         // approve action if not running under a security manager
         if (System.getSecurityManager() == null) {
             return;



Mime
View raw message