com.develop.jawin.win32
Class Security

java.lang.Object
  |
  +--com.develop.jawin.win32.Security
All Implemented Interfaces:
MarshalConstants, SecurityConstants

public class Security
extends java.lang.Object
implements SecurityConstants, MarshalConstants

Except where otherwise noted, the functions in this module correspond to similarly-named functions in the Windows API


Fields inherited from interface com.develop.jawin.win32.SecurityConstants
DELETE, READ_CONTROL, SPECIFIC_RIGHTS_ALL, STANDARD_RIGHTS_ALL, STANDARD_RIGHTS_EXECUTE, STANDARD_RIGHTS_READ, STANDARD_RIGHTS_REQUIRED, STANDARD_RIGHTS_WRITE, SYNCHRONIZE, TOKEN_ADJUST_DEFAULT, TOKEN_ADJUST_GROUPS, TOKEN_ADJUST_PRIVILEGES, TOKEN_ADJUST_SESSIONID, TOKEN_ALL_ACCESS, TOKEN_ASSIGN_PRIMARY, TOKEN_DUPLICATE, TOKEN_EXECUTE, TOKEN_IMPERSONATE, TOKEN_QUERY, TOKEN_QUERY_SOURCE, TOKEN_READ, TOKEN_WRITE, TokenDefaultDacl, TokenGroups, TokenImpersonationLevel, TokenOwner, TokenPrimaryGroup, TokenPrivileges, TokenRestrictedSids, TokenSessionId, TokenSource, TokenStatistics, TokenType, TokenUser, WRITE_DAC, WRITE_OWNER
 
Fields inherited from interface com.develop.jawin.marshal.MarshalConstants
CHECK_HR, CHECK_NONE, CHECK_NULL, CHECK_W32, MARSHAL_GIT, MARSHAL_VPTR
 
Constructor Summary
Security()
           
 
Method Summary
static byte[] GetSidIdentifierAuthority(byte[] sid)
           
static int GetSidSubAuthority(byte[] sid, int subAuthority)
           
static int GetSidSubAuthorityCount(byte[] sid)
           
static byte[] GetTokenInformation(int TokenHandle, int TokenEnumerationClass)
           
static byte[] GetTokenUserSid(int TokenHandle)
           
static int OpenProcessToken(int ProcessHandle, int DesiredAccess)
           
static java.lang.String SidToString(byte[] sid)
          Helper function ported from Keith Brown's Programming Windows Security
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

Security

public Security()
Method Detail

OpenProcessToken

public static int OpenProcessToken(int ProcessHandle,
                                   int DesiredAccess)
                            throws COMException,
                                   java.io.IOException

GetTokenInformation

public static byte[] GetTokenInformation(int TokenHandle,
                                         int TokenEnumerationClass)
                                  throws java.io.IOException,
                                         COMException

GetTokenUserSid

public static byte[] GetTokenUserSid(int TokenHandle)
                              throws java.io.IOException,
                                     COMException

GetSidIdentifierAuthority

public static byte[] GetSidIdentifierAuthority(byte[] sid)
                                        throws COMException,
                                               java.io.IOException

GetSidSubAuthorityCount

public static int GetSidSubAuthorityCount(byte[] sid)
                                   throws COMException,
                                          java.io.IOException

GetSidSubAuthority

public static int GetSidSubAuthority(byte[] sid,
                                     int subAuthority)
                              throws COMException,
                                     java.io.IOException

SidToString

public static java.lang.String SidToString(byte[] sid)
                                    throws COMException,
                                           java.io.IOException
Helper function ported from Keith Brown's Programming Windows Security


New Jawin designed by Vitally Shelest. This product includes software developed by the DevelopMentor OpenSource Project (http://www.develop.com/OpenSource).