public class

UnixSystem

extends Object
java.lang.Object
   ↳ com.sun.security.auth.module.UnixSystem

Class Overview

This class implementation retrieves and makes available Unix UID/GID/groups information for the current user.

Summary

Fields
protected long gid
protected long[] groups
protected long uid
protected String username
Public Constructors
UnixSystem()
Instantiate a UnixSystem and load the native library to access the underlying system information.
Public Methods
long getGid()
Get the GID for the current Unix user.
long[] getGroups()
Get the supplementary groups for the current Unix user.
long getUid()
Get the UID for the current Unix user.
String getUsername()
Get the username for the current Unix user.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

protected long gid

protected long[] groups

protected long uid

protected String username

Public Constructors

public UnixSystem ()

Instantiate a UnixSystem and load the native library to access the underlying system information.

Public Methods

public long getGid ()

Get the GID for the current Unix user.

Returns
  • the GID for the current Unix user.

public long[] getGroups ()

Get the supplementary groups for the current Unix user.

Returns
  • the supplementary groups for the current Unix user.

public long getUid ()

Get the UID for the current Unix user.

Returns
  • the UID for the current Unix user.

public String getUsername ()

Get the username for the current Unix user.

Returns
  • the username for the current Unix user.