summaryrefslogtreecommitdiff
path: root/sid.ml
Commit message (Collapse)AuthorAgeFilesLines
* sid: sid_test: make subauthorities mandatoryPhilipp Gesang2018-11-071-139/+149
| | | | | | | | | | | | | | | | | Both the constructor “Sid.create” and the string format parser must reject inputs lacking a subauthorities array of at least size one. Since the array is no longer optional, reorder the the constructor arguments to match the data representation. It is still possible to create SIDs without subauthorities via the “Sid.create_unsafe” constructor. Also, the packet representation will happily accept them because their definition (as well as that that of the identical RPC version) does not specify a minimum count. This is all rather ambiguous and exacerbated by the fact that [MS-DTYP] happily specifies an invalid SID “S-1-5” as the “NT_AUTHORITY”. However, both the grammar and the Win API “ConvertStringSidToSidA()” function reject SA-less inputs as invalid, so we should too.
* sid: sid_test: handle large ias correctlyPhilipp Gesang2018-11-071-9/+69
| | | | | In string format, the “identifier authority” is quirky: from 1 << 32 on the spec requires that exactly 12 hex digits be printed.
* sid: add Sid.{of,to}_bytes aliasesPhilipp Gesang2018-11-061-0/+3
| | | | Establish symmetry with of_string / to_string and the StringFmt module.
* sid: sid_test: validate identifier authority on create()Philipp Gesang2018-11-061-0/+1
| | | | Reject ia’s greater than six bytes can encompass.
* sid: add channel handlers for binary representationPhilipp Gesang2018-11-031-0/+26
|
* add linking exception to licensePhilipp Gesang2018-11-031-1/+1
|
* sid: predefine more well known constantsPhilipp Gesang2018-11-031-9/+125
| | | | Add the constants from MS-DTYP 2.4.2.4 to Sid.WellKnown.
* sid: catch more boundary violationsPhilipp Gesang2018-10-301-1/+16
|
* sid: fix off by one parsing bugPhilipp Gesang2018-10-301-1/+1
| | | | | In the string representation, hyphen is always succeeded by a number so we need to terminate at input length minus one.
* sid: sid_test: move conversion functions to resultPhilipp Gesang2018-10-301-17/+20
| | | | | | Get rid of all “StringFmt” APIs involving exceptions. There is now only the “decode” function which returns a result type.
* add readme and license textPhilipp Gesang2018-10-301-0/+2
|
* sid: define more constant authorities from MS-DTYPPhilipp Gesang2018-10-301-5/+11
|
* sid: optionally handle big endian in packet format codecPhilipp Gesang2018-10-301-32/+36
| | | | | Oddly enough this only has an effect on the sub_auths since the 48 bits of “identifier authority” are always handled in big endian.
* sid: implement decoder for “packet representation”Philipp Gesang2018-10-281-5/+50
|
* xxd: add binary-text conversion helperPhilipp Gesang2018-10-281-19/+3
|
* sid: sid_test: add current state to repoPhilipp Gesang2018-10-281-0/+199