|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.security.JniBasedUnixGroupsMapping org.apache.hadoop.security.JniBasedUnixGroupsNetgroupMapping
public class JniBasedUnixGroupsNetgroupMapping
A JNI-based implementation of GroupMappingServiceProvider
that invokes libC calls to get the group
memberships of a given user.
Constructor Summary | |
---|---|
JniBasedUnixGroupsNetgroupMapping()
|
Method Summary | |
---|---|
void |
cacheGroupsAdd(List<String> groups)
Caches the group user information |
void |
cacheGroupsRefresh()
Refresh the cache of groups and user mapping |
List<String> |
getGroups(String user)
Gets unix groups and netgroups for the user. |
protected List<String> |
getUsersForNetgroup(String netgroup)
Calls JNI function to get users for a netgroup, since C functions are not reentrant we need to make this synchronized (see documentation for setnetgrent, getnetgrent and endnetgrent) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JniBasedUnixGroupsNetgroupMapping()
Method Detail |
---|
public List<String> getGroups(String user) throws IOException
getGroups
in class JniBasedUnixGroupsMapping
user
- User's name
IOException
public void cacheGroupsRefresh() throws IOException
cacheGroupsRefresh
in class JniBasedUnixGroupsMapping
IOException
public void cacheGroupsAdd(List<String> groups) throws IOException
cacheGroupsAdd
in class JniBasedUnixGroupsMapping
groups
- list of groups to add to cache
IOException
protected List<String> getUsersForNetgroup(String netgroup)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |