public class ShellBasedUnixGroupsNetgroupMapping extends ShellBasedUnixGroupsMapping
GroupMappingServiceProvider
that exec's the groups
shell command to fetch the group
memberships of a given user.限定符和类型 | 字段和说明 |
---|---|
protected static Map<String,Set<String>> |
netgroupToUsersMap |
protected static boolean |
netgroupToUsersMapUpdated |
protected static Map<String,Set<String>> |
userToNetgroupsMap |
构造器和说明 |
---|
ShellBasedUnixGroupsNetgroupMapping() |
限定符和类型 | 方法和说明 |
---|---|
void |
cacheGroupsAdd(List<String> groups)
Caches the group user information
|
void |
cacheGroupsRefresh()
Refresh the cache of groups and user mapping
|
protected void |
cacheNetgroup(String group) |
protected String |
execShellGetUnixGroups(String user) |
protected String |
execShellGetUserForNetgroup(String netgroup) |
List<String> |
getGroups(String user)
Get all various group memberships of a given user.
|
protected void |
getNetgroups(String user,
List<String> groups) |
public List<String> getGroups(String user) throws IOException
getGroups
在类中 ShellBasedUnixGroupsMapping
user
- User's nameIOException
public void cacheGroupsRefresh() throws IOException
cacheGroupsRefresh
在类中 ShellBasedUnixGroupsMapping
IOException
public void cacheGroupsAdd(List<String> groups) throws IOException
cacheGroupsAdd
在类中 ShellBasedUnixGroupsMapping
groups
- list of groups to add to cacheIOException
protected void cacheNetgroup(String group) throws IOException
IOException
protected void getNetgroups(String user, List<String> groups) throws IOException
IOException
protected String execShellGetUnixGroups(String user) throws IOException
IOException
protected String execShellGetUserForNetgroup(String netgroup) throws IOException
IOException
Copyright © 2009 The Apache Software Foundation