khenaidoo | 2672188 | 2021-08-11 17:42:52 -0400 | [diff] [blame] | 1 | package pac |
| 2 | |
| 3 | import ( |
| 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 |
| 12 | type 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 |
| 19 | func (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 | } |