commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r770965 - in /commons/sandbox/runtime/trunk/src: main/native/os/win32/group.c main/native/os/win32/user.c test/org/apache/commons/runtime/TestGroup.java
Date Sat, 02 May 2009 15:29:34 GMT
Author: mturk
Date: Sat May  2 15:29:34 2009
New Revision: 770965

URL: http://svn.apache.org/viewvc?rev=770965&view=rev
Log:
Make sure Global Groups have IsLocal false

Modified:
    commons/sandbox/runtime/trunk/src/main/native/os/win32/group.c
    commons/sandbox/runtime/trunk/src/main/native/os/win32/user.c
    commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestGroup.java

Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/group.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/group.c?rev=770965&r1=770964&r2=770965&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/group.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/group.c Sat May  2 15:29:34 2009
@@ -444,6 +444,8 @@
                         grps = NULL;
                         goto cleanup;
                     }
+                    /* Update isLocal filed  to false */
+                    SET_IFIELD_Z(0003, gid, JNI_FALSE);
                     (*_E)->SetObjectArrayElement(_E, grps, j, gid);
                     (*_E)->DeleteLocalRef(_E, gid);
                 }

Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/user.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/user.c?rev=770965&r1=770964&r2=770965&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/user.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/user.c Sat May  2 15:29:34 2009
@@ -221,7 +221,7 @@
         return NULL;
     }
     if (sidtype != SidTypeUser && sidtype != SidTypeAlias) {
-        /* Not a group SID */
+        /* Not a user SID */
         free(sid);
         return NULL;
     }

Modified: commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestGroup.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestGroup.java?rev=770965&r1=770964&r2=770965&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestGroup.java (original)
+++ commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestGroup.java Sat May
 2 15:29:34 2009
@@ -97,6 +97,7 @@
         assertTrue("Groups", groups.hasNext());
         int i = 0;
         for (Group g : groups) {
+            assertTrue("IsLocal", g.IsLocal());
             i++;
         }
         System.out.println();
@@ -111,6 +112,13 @@
 
             assertNotNull("Iterator", groups);
             assertTrue("Groups", groups.hasNext());
+            int i = 0;
+            for (Group g : groups) {
+                assertFalse("IsLocal", g.IsLocal());
+                i++;
+            }
+            System.out.println();
+            System.out.println("G Groups   " + i);
         } catch (UnsupportedOperationException ex) {
             if (OS.TYPE.contains(OsType.WINDOWS)) {
                 fail("Unexpected exception");



Mime
View raw message