sasec

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Syntax UUID
	SasecSyntaxUUID = &uuid.UUID{TimeLow: 0x378e52b0, TimeMid: 0xc0a9, TimeHiAndVersion: 0x11cf, ClockSeqHiAndReserved: 0x82, ClockSeqLow: 0x2d, Node: [6]uint8{0x0, 0xaa, 0x0, 0x51, 0xe4, 0xf}}
	// Syntax ID
	SasecSyntaxV1_0 = &dcerpc.SyntaxID{IfUUID: SasecSyntaxUUID, IfVersionMajor: 1, IfVersionMinor: 0}
)
View Source
var Cnlen = 15

Cnlen represents the CNLEN RPC constant

View Source
var Dnlen = 15

Dnlen represents the DNLEN RPC constant

View Source
var (
	// import guard
	GoPackage = "tsch"
)
View Source
var MaxBufferSize = 273

MaxBufferSize represents the MAX_BUFFER_SIZE RPC constant

View Source
var Unlen = 256

Unlen represents the UNLEN RPC constant

Functions

func NewSasecServerHandle

func NewSasecServerHandle(o SasecServer) dcerpc.ServerHandle

func RegisterSasecServer

func RegisterSasecServer(conn dcerpc.Conn, o SasecServer, opts ...dcerpc.Option)

func SasecServerHandle

func SasecServerHandle(ctx context.Context, o SasecServer, opNum int, r ndr.Reader) (dcerpc.Operation, error)

Types

type GetAccountInformationRequest

type GetAccountInformationRequest struct {
	// Handle: Pointer to a Unicode string that MUST specify the server. The client MUST
	// map this string to an RPC binding handle. The server MUST ignore this parameter.
	// For more details, see [C706] sections 4.3.5 and 5.1.5.2.
	Handle string `idl:"name:Handle;string;pointer:unique" json:"handle"`
	// pwszJobName: MUST be a pointer to a string that specifies a task name, such as "MyJob.job".
	JobName string `idl:"name:pwszJobName;string" json:"job_name"`
	// ccBufferSize: MUST contain the number of characters in the array supplied by the
	// client and filled by the server. This value MUST be the size of the wszBuffer parameter.
	// MAX_BUFFER_SIZE is equal to 273. For more information on MAX_BUFFER_SIZE, see the
	// SaSec interface IDL (section 6.2).
	BufferSize uint32 `idl:"name:ccBufferSize" json:"buffer_size"`
	// wszBuffer: Upon input, MUST be an empty array of size equal to the ccBufferSize parameter.
	// The client SHOULD initialize the array to contain zeroes. Upon return, the array
	// MUST contain the name of the account to be used as the context the task runs under.
	Buffer string `idl:"name:wszBuffer;size_is:(ccBufferSize)" json:"buffer"`
}

GetAccountInformationRequest structure represents the SAGetAccountInformation operation request

func (*GetAccountInformationRequest) MarshalNDR

func (*GetAccountInformationRequest) UnmarshalNDR

func (o *GetAccountInformationRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error

type GetAccountInformationResponse

type GetAccountInformationResponse struct {
	// wszBuffer: Upon input, MUST be an empty array of size equal to the ccBufferSize parameter.
	// The client SHOULD initialize the array to contain zeroes. Upon return, the array
	// MUST contain the name of the account to be used as the context the task runs under.
	Buffer string `idl:"name:wszBuffer;size_is:(ccBufferSize)" json:"buffer"`
	// Return: The SAGetAccountInformation return value.
	Return int32 `idl:"name:Return" json:"return"`
}

GetAccountInformationResponse structure represents the SAGetAccountInformation operation response

func (*GetAccountInformationResponse) MarshalNDR

func (*GetAccountInformationResponse) UnmarshalNDR

func (o *GetAccountInformationResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error

type GetNSAccountInformationRequest

type GetNSAccountInformationRequest struct {
	// Handle: Pointer to a Unicode string that MUST specify the server. The client MUST
	// map this string to an RPC Binding handle. The server MUST ignore this parameter.
	// For more details, see [C706] sections 4.3.5 and 5.1.5.2.
	Handle string `idl:"name:Handle;string;pointer:unique" json:"handle"`
	// ccBufferSize: MUST contain the number of characters in the array supplied by the
	// client and filled by the server. This value MUST be the size of the wszBuffer parameter.
	// MAX_BUFFER_SIZE is equal to 273. For more information on MAX_BUFFER_SIZE, see the
	// SaSec interface IDL (section 6.2).
	BufferSize uint32 `idl:"name:ccBufferSize" json:"buffer_size"`
	// wszBuffer: Upon input, MUST be an empty array of size equal to the ccBufferSize parameter.
	// The client SHOULD initialize the array to contain zeroes. Upon return, the array
	// MUST contain the ATSvc account name.
	Buffer string `idl:"name:wszBuffer;size_is:(ccBufferSize)" json:"buffer"`
}

GetNSAccountInformationRequest structure represents the SAGetNSAccountInformation operation request

func (*GetNSAccountInformationRequest) MarshalNDR

func (*GetNSAccountInformationRequest) UnmarshalNDR

type GetNSAccountInformationResponse

type GetNSAccountInformationResponse struct {
	// wszBuffer: Upon input, MUST be an empty array of size equal to the ccBufferSize parameter.
	// The client SHOULD initialize the array to contain zeroes. Upon return, the array
	// MUST contain the ATSvc account name.
	Buffer string `idl:"name:wszBuffer;size_is:(ccBufferSize)" json:"buffer"`
	// Return: The SAGetNSAccountInformation return value.
	Return int32 `idl:"name:Return" json:"return"`
}

GetNSAccountInformationResponse structure represents the SAGetNSAccountInformation operation response

func (*GetNSAccountInformationResponse) MarshalNDR

func (*GetNSAccountInformationResponse) UnmarshalNDR

type SasecClient

type SasecClient interface {

	// The SASetAccountInformation method MUST set the credentials under which the task
	// MUST run.
	//
	// Return Values: For more information about return codes, see section 2.3.14 or Win32
	// Error Codes in [MS-ERREF] section 2.1.<52>
	SetAccountInformation(context.Context, *SetAccountInformationRequest, ...dcerpc.CallOption) (*SetAccountInformationResponse, error)

	// The SASetNSAccountInformation method MUST configure the credentials under which all
	// ATSvc tasks run.
	SetNSAccountInformation(context.Context, *SetNSAccountInformationRequest, ...dcerpc.CallOption) (*SetNSAccountInformationResponse, error)

	// The SAGetNSAccountInformation method MUST return the ATSvc account name.
	//
	// Return Values: For more information about return codes, see section 2.3.14, or Win32
	// Error Codes in [MS-ERREF] section 2.
	GetNSAccountInformation(context.Context, *GetNSAccountInformationRequest, ...dcerpc.CallOption) (*GetNSAccountInformationResponse, error)

	// The SAGetAccountInformation method MUST retrieve the account name for a specified
	// task.
	//
	// Return Values: For more information on return codes, see section 2.3.14, or Win32
	// Error Codes in [MS-ERREF] section 2.1.
	GetAccountInformation(context.Context, *GetAccountInformationRequest, ...dcerpc.CallOption) (*GetAccountInformationResponse, error)

	// AlterContext alters the client context.
	AlterContext(context.Context, ...dcerpc.Option) error
}

sasec interface.

func NewSasecClient

func NewSasecClient(ctx context.Context, cc dcerpc.Conn, opts ...dcerpc.Option) (SasecClient, error)

type SasecServer

type SasecServer interface {

	// The SASetAccountInformation method MUST set the credentials under which the task
	// MUST run.
	//
	// Return Values: For more information about return codes, see section 2.3.14 or Win32
	// Error Codes in [MS-ERREF] section 2.1.<52>
	SetAccountInformation(context.Context, *SetAccountInformationRequest) (*SetAccountInformationResponse, error)

	// The SASetNSAccountInformation method MUST configure the credentials under which all
	// ATSvc tasks run.
	SetNSAccountInformation(context.Context, *SetNSAccountInformationRequest) (*SetNSAccountInformationResponse, error)

	// The SAGetNSAccountInformation method MUST return the ATSvc account name.
	//
	// Return Values: For more information about return codes, see section 2.3.14, or Win32
	// Error Codes in [MS-ERREF] section 2.
	GetNSAccountInformation(context.Context, *GetNSAccountInformationRequest) (*GetNSAccountInformationResponse, error)

	// The SAGetAccountInformation method MUST retrieve the account name for a specified
	// task.
	//
	// Return Values: For more information on return codes, see section 2.3.14, or Win32
	// Error Codes in [MS-ERREF] section 2.1.
	GetAccountInformation(context.Context, *GetAccountInformationRequest) (*GetAccountInformationResponse, error)
}

sasec server interface.

type SetAccountInformationRequest

type SetAccountInformationRequest struct {
	// Handle: Pointer to a Unicode string that MUST specify the server. The client MUST
	// map this string to an RPC binding handle. The server MUST ignore this parameter.
	// For more information, see [C706] sections 4.3.5 and 5.1.5.2.
	Handle string `idl:"name:Handle;string;pointer:unique" json:"handle"`
	// pwszJobName: Pointer to a string that MUST specify a task name, such as "MyJob.job".
	JobName string `idl:"name:pwszJobName;string" json:"job_name"`
	// pwszAccount: Pointer to a string that MUST specify the account name. This string
	// MAY be expressed either as a UPN in the form user@domain or as a Security Account
	// Manager (SAM) name in the form domain\account.
	Account string `idl:"name:pwszAccount;string" json:"account"`
	// pwszPassword: Pointer to a string that MUST specify the password for the account.
	// See section 5.1.
	Password string `idl:"name:pwszPassword;string;pointer:unique" json:"password"`
	// dwJobFlags: The dwJobFlags field MUST contain individual bit flags that MUST have
	// one or more of the following values:
	//
	//	+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-----+---+---+---+---+---+---+---+---+---+---+---+---+---+
	//	| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 1 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |  8  | 9 | 2 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 3 | 1 |
	//	|   |   |   |   |   |   |   |   |   |   | 0 |   |   |   |   |   |   |   |     |   | 0 |   |   |   |   |   |   |   |   |   | 0 |   |
	//	+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-----+---+---+---+---+---+---+---+---+---+---+---+---+---+
	//	+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-----+---+---+---+---+---+---+---+---+---+---+---+---+---+
	//	| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | R L | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
	//	+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-----+---+---+---+---+---+---+---+---+---+---+---+---+---+
	//
	//
	//	+------------------------------------+----------------------------------------------------------------------------------+
	//	|                                    |                                                                                  |
	//	|               VALUE                |                                   DESCRIPTION                                    |
	//	|                                    |                                                                                  |
	//	+------------------------------------+----------------------------------------------------------------------------------+
	//	+------------------------------------+----------------------------------------------------------------------------------+
	//	| RL TASK_FLAG_RUN_ONLY_IF_LOGGED_ON | When set, the task MUST run only if the user specified is logged on              |
	//	|                                    | interactively.                                                                   |
	//	+------------------------------------+----------------------------------------------------------------------------------+
	JobFlags uint32 `idl:"name:dwJobFlags" json:"job_flags"`
}

SetAccountInformationRequest structure represents the SASetAccountInformation operation request

func (*SetAccountInformationRequest) MarshalNDR

func (*SetAccountInformationRequest) UnmarshalNDR

func (o *SetAccountInformationRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error

type SetAccountInformationResponse

type SetAccountInformationResponse struct {
	// Return: The SASetAccountInformation return value.
	Return int32 `idl:"name:Return" json:"return"`
}

SetAccountInformationResponse structure represents the SASetAccountInformation operation response

func (*SetAccountInformationResponse) MarshalNDR

func (*SetAccountInformationResponse) UnmarshalNDR

func (o *SetAccountInformationResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error

type SetNSAccountInformationRequest

type SetNSAccountInformationRequest struct {
	// Handle: Pointer to a Unicode string that MUST specify the server. The client MUST
	// map this string to an RPC binding handle. The server MUST ignore this parameter.
	// For more details, see [C706] sections 4.3.5 and 5.1.5.2.
	Handle string `idl:"name:Handle;string;pointer:unique" json:"handle"`
	// pwszAccount: MUST be a pointer to a string that specifies the account name.
	Account string `idl:"name:pwszAccount;string;pointer:unique" json:"account"`
	// pwszPassword: MUST be a pointer to a string that specifies the password for the named
	// account. See section 5.1 for security considerations.
	Password string `idl:"name:pwszPassword;string;pointer:unique" json:"password"`
}

SetNSAccountInformationRequest structure represents the SASetNSAccountInformation operation request

func (*SetNSAccountInformationRequest) MarshalNDR

func (*SetNSAccountInformationRequest) UnmarshalNDR

type SetNSAccountInformationResponse

type SetNSAccountInformationResponse struct {
	// Return: The SASetNSAccountInformation return value.
	Return int32 `idl:"name:Return" json:"return"`
}

SetNSAccountInformationResponse structure represents the SASetNSAccountInformation operation response

func (*SetNSAccountInformationResponse) MarshalNDR

func (*SetNSAccountInformationResponse) UnmarshalNDR

Jump to

Keyboard shortcuts

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