manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1384618 - in /manifoldcf/branches/CONNECTORS-515/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive: SharedDriveConnector.java SharedDriveParameters.java
Date Fri, 14 Sep 2012 01:04:43 GMT
Author: kwright
Date: Fri Sep 14 01:04:42 2012
New Revision: 1384618

URL: http://svn.apache.org/viewvc?rev=1384618&view=rev
Log:
Make sure new flag is used consistently throughout the jcifs connector

Modified:
    manifoldcf/branches/CONNECTORS-515/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java
    manifoldcf/branches/CONNECTORS-515/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveParameters.java

Modified: manifoldcf/branches/CONNECTORS-515/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-515/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java?rev=1384618&r1=1384617&r2=1384618&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-515/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java
(original)
+++ manifoldcf/branches/CONNECTORS-515/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveConnector.java
Fri Sep 14 01:04:42 2012
@@ -114,7 +114,7 @@ public class SharedDriveConnector extend
   private String domain = null;
   private String username = null;
   private String password = null;
-  private boolean resolveSIDs = false;
+  private boolean useSIDs = true;
 
   private NtlmPasswordAuthentication pa;
 
@@ -214,10 +214,10 @@ public class SharedDriveConnector extend
     password = configParameters.getObfuscatedParameter(SharedDriveParameters.password);
     if (password == null)
       password = "";
-    String resolveSIDsString = configParameters.getParameter(SharedDriveParameters.resolveSIDs);
-    if (resolveSIDsString == null)
-      resolveSIDsString = "true";
-    resolveSIDs = "true".equals(resolveSIDsString);
+    String useSIDsString = configParameters.getParameter(SharedDriveParameters.useSIDs);
+    if (useSIDsString == null)
+      useSIDsString = "true";
+    useSIDs = "true".equals(useSIDsString);
 
     // Rejigger the username/domain to be sure we PASS in a domain and we do not include
the domain attached to the user!
     // (This became essential at jcifs 1.3.0)
@@ -1007,7 +1007,7 @@ public class SharedDriveConnector extend
 
 
         // Grab the share permissions.
-        aces = getFileShareSecurity(file, resolveSIDs);
+        aces = getFileShareSecurity(file, useSIDs);
 
         if (aces == null)
         {
@@ -1052,9 +1052,9 @@ public class SharedDriveConnector extend
             if ((ace.getAccessMask() & ACE.FILE_READ_DATA) != 0)
             {
               if (ace.isAllow())
-                shareAllowAcls[allowCount++] = resolveSIDs ? ace.getSID().getAccountName()
: ace.getSID().toString();
+                shareAllowAcls[allowCount++] = useSIDs ? ace.getSID().toString() : ace.getSID().getAccountName();
               else
-                shareDenyAcls[denyCount++] = resolveSIDs ? ace.getSID().getAccountName()
: ace.getSID().toString();
+                shareDenyAcls[denyCount++] = useSIDs ? ace.getSID().toString() : ace.getSID().getAccountName();
             }
           }
         }
@@ -1082,7 +1082,7 @@ public class SharedDriveConnector extend
 
       if (forcedacls.length==0)
       {
-        aces = getFileSecurity(file, resolveSIDs);
+        aces = getFileSecurity(file, useSIDs);
         if (aces == null)
         {
           if (Logging.connectors.isDebugEnabled())
@@ -1126,9 +1126,9 @@ public class SharedDriveConnector extend
             if ((ace.getAccessMask() & ACE.FILE_READ_DATA) != 0)
             {
               if (ace.isAllow())
-                allowAcls[allowCount++] = resolveSIDs ? ace.getSID().getAccountName() : ace.getSID().toString();
+                allowAcls[allowCount++] = useSIDs ? ace.getSID().toString() : ace.getSID().getAccountName();
               else
-                denyAcls[denyCount++] = resolveSIDs ? ace.getSID().getAccountName() : ace.getSID().toString();
+                denyAcls[denyCount++] = useSIDs ? ace.getSID().toString() : ace.getSID().getAccountName();
             }
           }
         }
@@ -2303,7 +2303,7 @@ public class SharedDriveConnector extend
   }
 
   /** Get file security */
-  protected static ACE[] getFileSecurity(SmbFile file, boolean resolveSIDs)
+  protected static ACE[] getFileSecurity(SmbFile file, boolean useSIDs)
     throws IOException
   {
     int totalTries = 0;
@@ -2315,7 +2315,7 @@ public class SharedDriveConnector extend
       totalTries++;
       try
       {
-        return file.getSecurity(!resolveSIDs);
+        return file.getSecurity(!useSIDs);
       }
       catch (java.net.SocketTimeoutException e)
       {
@@ -2341,7 +2341,7 @@ public class SharedDriveConnector extend
   }
 
   /** Get share security */
-  protected static ACE[] getFileShareSecurity(SmbFile file, boolean resolveSIDs)
+  protected static ACE[] getFileShareSecurity(SmbFile file, boolean useSIDs)
     throws IOException
   {
     int totalTries = 0;
@@ -2353,7 +2353,7 @@ public class SharedDriveConnector extend
       totalTries++;
       try
       {
-        return file.getShareSecurity(resolveSIDs);
+        return file.getShareSecurity(!useSIDs);
       }
       catch (java.net.SocketTimeoutException e)
       {
@@ -2606,7 +2606,7 @@ public class SharedDriveConnector extend
     if (username==null) username = "";
     String password = parameters.getObfuscatedParameter(org.apache.manifoldcf.crawler.connectors.sharedrive.SharedDriveParameters.password);
     if (password==null) password = "";
-    String resolvesids = parameters.getParameter(org.apache.manifoldcf.crawler.connectors.sharedrive.SharedDriveParameters.resolveSIDs);
+    String resolvesids = parameters.getParameter(org.apache.manifoldcf.crawler.connectors.sharedrive.SharedDriveParameters.useSIDs);
     if (resolvesids==null) resolvesids = "true";
 
     // "Server" tab
@@ -2685,10 +2685,10 @@ public class SharedDriveConnector extend
     String resolvesidspresent = variableContext.getParameter("resolvesidspresent");
     if (resolvesidspresent != null)
     {
-      parameters.setParameter(SharedDriveParameters.resolveSIDs,"false");
+      parameters.setParameter(SharedDriveParameters.useSIDs,"false");
       String resolvesids = variableContext.getParameter("resolvesids");
       if (resolvesids != null)
-        parameters.setParameter(SharedDriveParameters.resolveSIDs, resolvesids);
+        parameters.setParameter(SharedDriveParameters.useSIDs, resolvesids);
     }
     return null;
   }

Modified: manifoldcf/branches/CONNECTORS-515/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveParameters.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-515/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveParameters.java?rev=1384618&r1=1384617&r2=1384618&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-515/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveParameters.java
(original)
+++ manifoldcf/branches/CONNECTORS-515/connectors/jcifs/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharedrive/SharedDriveParameters.java
Fri Sep 14 01:04:42 2012
@@ -36,6 +36,6 @@ public class SharedDriveParameters
   public final static String password = "Password";
   
   /* SIDs handling */
-  public final static String resolveSIDs = "Resolve SIDs";
+  public final static String useSIDs = "Use SIDs";
 
 }



Mime
View raw message