GetSID returns the raw SID (Security Identifier) parameter as typed representation on which various operations can be performed, such as converting the SID to string or resolving username/domain.
()
| 181 | // typed representation on which various operations can be performed, |
| 182 | // such as converting the SID to string or resolving username/domain. |
| 183 | func (pars Params) GetSID() (*windows.SID, error) { |
| 184 | par, err := pars.findParam(params.UserSID) |
| 185 | if err != nil { |
| 186 | return nil, err |
| 187 | } |
| 188 | return getSID(par) |
| 189 | } |
| 190 | |
| 191 | func getSID(param *Param) (*windows.SID, error) { |
| 192 | sid, ok := param.Value.([]byte) |
no test coverage detected