/** * Get unix groups (parent) and netgroups for given user * * @param user get groups and netgroups for this user * @return groups and netgroups for user */ @Override public List<String> getGroups(String user) throws IOException { // parent get unix groups List<String> groups = new LinkedList<String>(super.getGroups(user)); NetgroupCache.getNetgroups(user, groups); return groups; }
/** * Gets unix groups and netgroups for the user. * * It gets all unix groups as returned by id -Gn but it * only returns netgroups that are used in ACLs (there is * no way to get all netgroups for a given user, see * documentation for getent netgroup) */ @Override public List<String> getGroups(String user) throws IOException { // parent gets unix groups List<String> groups = new LinkedList<String>(super.getGroups(user)); NetgroupCache.getNetgroups(user, groups); return groups; }
/** * Get unix groups (parent) and netgroups for given user * * @param user get groups and netgroups for this user * @return groups and netgroups for user */ @Override public List<String> getGroups(String user) throws IOException { // parent get unix groups List<String> groups = new LinkedList<String>(super.getGroups(user)); NetgroupCache.getNetgroups(user, groups); return groups; }
/** * Get unix groups (parent) and netgroups for given user * * @param user get groups and netgroups for this user * @return groups and netgroups for user */ @Override public List<String> getGroups(String user) throws IOException { // parent get unix groups List<String> groups = new LinkedList<String>(super.getGroups(user)); NetgroupCache.getNetgroups(user, groups); return groups; }
/** * Get unix groups (parent) and netgroups for given user * * @param user get groups and netgroups for this user * @return groups and netgroups for user */ @Override public List<String> getGroups(String user) throws IOException { // parent get unix groups List<String> groups = new LinkedList<String>(super.getGroups(user)); NetgroupCache.getNetgroups(user, groups); return groups; }
/** * Get unix groups (parent) and netgroups for given user * * @param user get groups and netgroups for this user * @return groups and netgroups for user */ @Override public List<String> getGroups(String user) throws IOException { // parent get unix groups List<String> groups = new LinkedList<String>(super.getGroups(user)); NetgroupCache.getNetgroups(user, groups); return groups; }
/** * Gets unix groups and netgroups for the user. * * It gets all unix groups as returned by id -Gn but it * only returns netgroups that are used in ACLs (there is * no way to get all netgroups for a given user, see * documentation for getent netgroup) */ @Override public List<String> getGroups(String user) throws IOException { // parent gets unix groups List<String> groups = new LinkedList<String>(super.getGroups(user)); NetgroupCache.getNetgroups(user, groups); return groups; }
/** * Gets unix groups and netgroups for the user. * * It gets all unix groups as returned by id -Gn but it * only returns netgroups that are used in ACLs (there is * no way to get all netgroups for a given user, see * documentation for getent netgroup) */ @Override public List<String> getGroups(String user) throws IOException { // parent gets unix groups List<String> groups = new LinkedList<String>(super.getGroups(user)); NetgroupCache.getNetgroups(user, groups); return groups; }
/** * Gets unix groups and netgroups for the user. * * It gets all unix groups as returned by id -Gn but it * only returns netgroups that are used in ACLs (there is * no way to get all netgroups for a given user, see * documentation for getent netgroup) */ @Override public List<String> getGroups(String user) throws IOException { // parent gets unix groups List<String> groups = new LinkedList<String>(super.getGroups(user)); NetgroupCache.getNetgroups(user, groups); return groups; }
/** * Gets unix groups and netgroups for the user. * * It gets all unix groups as returned by id -Gn but it * only returns netgroups that are used in ACLs (there is * no way to get all netgroups for a given user, see * documentation for getent netgroup) */ @Override public List<String> getGroups(String user) throws IOException { // parent gets unix groups List<String> groups = new LinkedList<String>(super.getGroups(user)); NetgroupCache.getNetgroups(user, groups); return groups; }
private void verifyGroupMembership(String user, int size, String group) { List<String> groups = new ArrayList<String>(); NetgroupCache.getNetgroups(user, groups); assertEquals(size, groups.size()); if (size > 0) { boolean present = false; for (String groupEntry:groups) { if (groupEntry.equals(group)) { present = true; break; } } assertTrue(present); } } }
private void verifyGroupMembership(String user, int size, String group) { List<String> groups = new ArrayList<String>(); NetgroupCache.getNetgroups(user, groups); assertEquals(size, groups.size()); if (size > 0) { boolean present = false; for (String groupEntry:groups) { if (groupEntry.equals(group)) { present = true; break; } } assertTrue(present); } } }