blob: da837d4b3a4932ecabb09ff4fea2523129715e34 [file] [log] [blame]
khenaidoo7d3c5582021-08-11 18:09:44 -04001package pac
2
3import (
4 "bytes"
5 "fmt"
6
7 "github.com/jcmturner/rpc/v2/mstypes"
8 "github.com/jcmturner/rpc/v2/ndr"
9)
10
11// S4UDelegationInfo implements https://msdn.microsoft.com/en-us/library/cc237944.aspx
12type S4UDelegationInfo struct {
13 S4U2proxyTarget mstypes.RPCUnicodeString // The name of the principal to whom the application can forward the ticket.
14 TransitedListSize uint32
15 S4UTransitedServices []mstypes.RPCUnicodeString `ndr:"pointer,conformant"` // List of all services that have been delegated through by this client and subsequent services or servers.. Size is value of TransitedListSize
16}
17
18// Unmarshal bytes into the S4UDelegationInfo struct
19func (k *S4UDelegationInfo) Unmarshal(b []byte) (err error) {
20 dec := ndr.NewDecoder(bytes.NewReader(b))
21 err = dec.Decode(k)
22 if err != nil {
23 err = fmt.Errorf("error unmarshaling S4UDelegationInfo: %v", err)
24 }
25 return
26}