Module jcifs

Class SecurityDescriptor

java.lang.Object
org.codelibs.jcifs.smb.internal.dtyp.SecurityDescriptor
All Implemented Interfaces:
Decodable, SecurityInfo

public class SecurityDescriptor extends Object implements SecurityInfo
Internal use only

This class is intended for internal use.

  • Constructor Details

    • SecurityDescriptor

      public SecurityDescriptor()
      Creates an empty security descriptor.
    • SecurityDescriptor

      public SecurityDescriptor(byte[] buffer, int bufferIndex, int len) throws IOException
      Creates a security descriptor by decoding from a byte buffer.
      Parameters:
      buffer - the byte buffer containing the security descriptor data
      bufferIndex - the starting offset in the buffer
      len - the length of data to decode
      Throws:
      IOException - if an I/O error occurs during decoding
  • Method Details

    • getType

      public final int getType()
      Gets the type flags of this security descriptor.
      Returns:
      the type flags indicating security descriptor control flags
    • getAces

      public final ACE[] getAces()
      Gets the access control entries (ACEs) from this security descriptor.
      Returns:
      the array of access control entries
    • getOwnerGroupSid

      public final SID getOwnerGroupSid()
      Gets the owner group SID of this security descriptor.
      Returns:
      the security identifier of the owner group
    • getOwnerUserSid

      public final SID getOwnerUserSid()
      Gets the owner user SID of this security descriptor.
      Returns:
      the security identifier of the owner user
    • decode

      public int decode(byte[] buffer, int bufferIndex, int len) throws SMBProtocolDecodingException
      Decodes a security descriptor from a byte buffer.
      Specified by:
      decode in interface Decodable
      Parameters:
      buffer - the byte buffer containing the security descriptor data
      bufferIndex - the starting offset in the buffer
      len - the length of data to decode
      Returns:
      the number of bytes decoded
      Throws:
      SMBProtocolDecodingException - if the data cannot be properly decoded
    • toString

      public String toString()
      Overrides:
      toString in class Object