1 // ======================================================================== 2 // Copyright 2002-2005 Mort Bay Consulting Pty. Ltd. 3 // ------------------------------------------------------------------------ 4 // Licensed under the Apache License, Version 2.0 (the "License"); 5 // you may not use this file except in compliance with the License. 6 // You may obtain a copy of the License at 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // Unless required by applicable law or agreed to in writing, software 9 // distributed under the License is distributed on an "AS IS" BASIS, 10 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 // See the License for the specific language governing permissions and 12 // limitations under the License. 13 // ======================================================================== 14 15 package org.mortbay.setuid; 16 17 /** 18 * Class is the equivalent java class used for holding values from native c code structure group. for more information please see man pages for getgrnam and getgrgid 19 * struct group { 20 * char *gr_name; // group name 21 * char *gr_passwd; // group password 22 * gid_t gr_gid; // group ID 23 * char **gr_mem; // group members 24 * }; 25 * 26 * @author Leopoldo Lee Agdeppa III 27 */ 28 29 public class Group 30 { 31 private String _grName; /* group name */ 32 private String _grPasswd; /* group password */ 33 private int _grGid; /* group id */ 34 private String[] _grMem; /* group members */ 35 36 37 38 public String getGrName() 39 { 40 return _grName; 41 } 42 43 public void setGrName(String grName) 44 { 45 _grName = grName; 46 } 47 48 public String getGrPasswd() 49 { 50 return _grPasswd; 51 } 52 53 public void setGrPasswd(String grPasswd) 54 { 55 _grPasswd = grPasswd; 56 } 57 58 public int getGrGid() 59 { 60 return _grGid; 61 } 62 63 public void setGrGid(int grGid) 64 { 65 _grGid = grGid; 66 } 67 68 public String[] getGrMem() 69 { 70 return _grMem; 71 } 72 73 public void setGrMem(String[] grMem) 74 { 75 _grMem = grMem; 76 } 77 78 }