blob: 614ee8565a6094bd47cd57508899ecf58f6f0fe9 [file] [log] [blame]
Scott Baker8461e152019-10-01 14:44:30 -07001package pac
2
3import (
4 "bytes"
5 "fmt"
6
7 "gopkg.in/jcmturner/rpc.v1/mstypes"
8 "gopkg.in/jcmturner/rpc.v1/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}