1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00
samba-mirror/librpc/wsp
Noel Power ae9d9434de librpc/wsp: adjust the wsp property api to additionally use a csv file
We have definitions for a number of properties both from the WSP
spec document and from those used by wireshark. These properties
are built into samba (generated from csv files). This commit allows
extra properties to be added on the fly in a custom csv file, the
format of the csv file is the same as that used in the build. This
allows us to add some 'unknown' properties on the fly, although we
would hope that information regarding these properties would be
incorporated into the build in due course.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-10-25 22:23:38 +00:00
..
allprops-from-ms-wsp-spec.csv
extra-props.csv
README
wsp_helper.c
wsp_helper.h
wsp_util.c librpc/wsp: adjust the wsp property api to additionally use a csv file 2023-10-25 22:23:38 +00:00
wsp_util.h

WSP properties are described in a number of sections in the MS-WSP protocol
document. The document says that all properties are categorised as follows

"GUID and PropId: Together, these parameters establish the unique identifier
                  for documents.
isColumn: A boolean value set to TRUE if, and only if, the property can be
          returned as a requested property as specified in the
          ProjectionColumnsOffsets argument to a RunNewQuery Generic Search
          Service (GSS) abstract interface call.
inInvertedIndex: A boolean value set to TRUE if, and only if, the property can
                 be an argument to CContentRestriction within the
                 RestrictionSet argument to a RunNewQuery GSS abstract
                 interface call.
columnIndexType: This parameter defines whether sorting, grouping, and
                 filtering are allowed for this property, as defined in the
                 SortOrders, Groupings, and Restrictions parameters of the
                 RunNewQuery GSS abstract interface call.
                 The columnIndexType parameter is a string set to one of the
                 following"

additionally the property type 'VT_XXXX' and max size are known

However, not all properties described match this, only properties mentioned in
the "full property table" are fully described, others mentioned e.g. in
"Standard" & "Open" property sections (and associated tables) have just the
GUID, propid & property data type described, still other properties are only
mentioned in the Example section and one needs to manually extract the info.

We need the property descriptions and some scripting helps here, in this
directory there is

librpc/wsp/allprops-from-ms-wsp-spec.csv:
    a csv file made from the "full property table" exported from the html
    oneline version online version of MS-WSP open specification document.
extra-props.csv:
    a csv file of the same format containing the other properties mentioned
    above and additionally a few more from the wireshark repo)

and in directory source4/scripting/bin

gen_wsp_props.py:
    a simple python script to generate code from the csv files above, 

extra-props.csv was generated by basically grabbing the property definititions
from the wireshark repo 
   https://github.com/wireshark/wireshark.git(epan/dissectors/packet-mswsp.c
and comparing against the properties we already have

The build generates code from the csv file mentioned above which is built into 
the NDR_WSP subsystem.