Package org.mortbay.setuid

Examples of org.mortbay.setuid.Group


           
           
           
           
            // get the group using the roots groupid
            Group gr1 = SetUID.getgrgid(passwd1.getPwGid());
            // get the group name using the aquired name
            Group gr2 = SetUID.getgrnam(gr1.getGrName());
           
            assertEquals(gr1.getGrName(), gr2.getGrName());
            assertEquals(gr1.getGrPasswd(), gr2.getGrPasswd());
            assertEquals(gr1.getGrGid(), gr2.getGrGid());
           
            // search and check through membership lists
            if(gr1.getGrMem() != null)
            {
                assertEquals(gr1.getGrMem().length, gr2.getGrMem().length);
                for(int i=0; i<gr1.getGrMem().length; i++)
                {
                    assertEquals(gr1.getGrMem()[i], gr2.getGrMem()[i]);
                }
            }
           
           
        }
View Full Code Here

TOP

Related Classes of org.mortbay.setuid.Group

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.