securitymode

package
v1.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SecurityMode

type SecurityMode uint8
const (
	// NEGOTIATE_USER_SECURITY: If clear (0), the server supports only Share Level access control.
	// If set (1), the server supports only User Level access control.
	NEGOTIATE_USER_SECURITY SecurityMode = 0x01

	// NEGOTIATE_ENCRYPT_PASSWORDS: If clear, the server supports only plaintext password authentication.
	// If set, the server supports challenge/response authentication.
	NEGOTIATE_ENCRYPT_PASSWORDS SecurityMode = 0x02

	// NEGOTIATE_SECURITY_SIGNATURES_ENABLED: If clear, the server does not support SMB security signatures.
	// If set, the server supports SMB security signatures for this connection.
	NEGOTIATE_SECURITY_SIGNATURES_ENABLED SecurityMode = 0x04

	// NEGOTIATE_SECURITY_SIGNATURES_REQUIRED: If clear, the security signatures are optional for this connection.
	// If set, the server requires security signatures.
	// This bit MUST be clear if the NEGOTIATE_SECURITY_SIGNATURES_ENABLED bit is clear.
	NEGOTIATE_SECURITY_SIGNATURES_REQUIRED SecurityMode = 0x08
)

Security mode flags for SMB negotiation Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/a4229e1a-8a4e-489a-a2eb-11b7f360e60c

const (
	SecurityModeNone SecurityMode = iota
)

func (SecurityMode) IsSecuritySignatureEnabled

func (sm SecurityMode) IsSecuritySignatureEnabled() bool

IsSecuritySignatureEnabled returns true if the server supports SMB security signatures

Returns:

  • bool: True if the server supports SMB security signatures, false otherwise

func (SecurityMode) IsSecuritySignatureRequired

func (sm SecurityMode) IsSecuritySignatureRequired() bool

IsSecuritySignatureRequired returns true if the server requires security signatures

Returns:

  • bool: True if the server requires security signatures, false otherwise

func (SecurityMode) SupportsChallengeResponseAuth

func (sm SecurityMode) SupportsChallengeResponseAuth() bool

SupportsChallengeResponseAuth returns true if the server supports challenge/response authentication

Returns:

  • bool: True if the server supports challenge/response authentication, false otherwise

func (SecurityMode) SupportsPlaintextPasswordAuth

func (sm SecurityMode) SupportsPlaintextPasswordAuth() bool

SupportsPlaintextPasswordAuth returns true if the server supports plaintext password authentication

Returns:

  • bool: True if the server supports plaintext password authentication, false otherwise

func (SecurityMode) SupportsShareLevelAccessControl

func (sm SecurityMode) SupportsShareLevelAccessControl() bool

SupportsShareLevelAccessControl returns true if the server supports Share Level access control

Returns:

  • bool: True if the server supports Share Level access control, false otherwise

func (SecurityMode) SupportsUserLevelAccessControl

func (sm SecurityMode) SupportsUserLevelAccessControl() bool

SupportsUserLevelAccessControl returns true if the server supports User Level access control

Returns:

  • bool: True if the server supports User Level access control, false otherwise

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL