[PATCH] samba-tool schema attribute query_oc

Alexander Bokovoy ab at samba.org
Mon May 14 06:52:46 UTC 2018


On ma, 14 touko 2018, William Brown wrote:
> 
> 
> 
> 
> > On 14 May 2018, at 16:32, Alexander Bokovoy <ab at samba.org> wrote:
> > 
> >> On ma, 14 touko 2018, William Brown wrote:
> >>> On Mon, 2018-05-14 at 16:14 +1200, Andrew Bartlett wrote:
> >>> On Mon, 2018-05-14 at 14:03 +1000, William Brown via samba-technical
> >>> wrote:
> >>>> On Mon, 2018-05-14 at 15:09 +1200, Andrew Bartlett wrote:
> >>>>>> On Mon, 2018-05-14 at 13:02 +1000, William Brown wrote:
> >>>>>> 
> >>>>>> So that section you mention is documentation, not code. To be
> >>>>>> sure
> >>>>>> of
> >>>>>> what you are asking:
> >>>>>> 
> >>>>>> Do you want the documentation updated to match the bit
> >>>>>> positions?
> >>>>>> 
> >>>>>> Or are you asking that the command take the "named bit
> >>>>>> location"
> >>>>>> and
> >>>>>> then OR's the result to create the schema behaviour value? IE:
> >>>>> 
> >>>>> Yes.
> >>>>> 
> >>>>>> /usr/local/samba/bin/samba-tool schema attribute modify --
> >>>>>> searchflags="fATTINDEX,fSUBTREEATTINDEX,fCONFIDENTIAL"
> >>>>>> 
> >>>>>> I suspect this is your request, but I want to be sure,
> >>>>> 
> >>>>> Correct, something like that.
> >>>>> 
> >>>>> Andrew Bartlett
> >>>>> 
> >>>> 
> >>>> Thanks mate! I've done exactly this. The changes are in 0005-
> >>>> python-
> >>>> samba-netcmd-schema.py-add-schema-query-and-m.patch
> >>>> 
> >>>> You'll also note I've updated the test cases to check for invalid
> >>>> flags, wrong capitialisation, the --help is updated, and two extra
> >>>> flags are added to ms_schema. 
> >>>> 
> >>>> Once again, the 6 patches attached (sorry, I forgot the trick you
> >>>> showed me to get these into a single file)
> >>> 
> >>> --stdout.
> >>> 
> >>> The other thing I requested previously is to trim the list down to
> >>> (or
> >>> at the very least mark) those flags we in Samba actually honour.  For
> >>> example, we always do a one-level index, so that flag is never used.
> >>> 
> >> 
> >> Which flag is this specifically? Really we need all the flags there
> >> because if we get the schema from an MSADDC we'll need to know how to
> >> translate it ... 
> > I am actually not sure we should be adding all case variants there. Why
> > not to use something like str.upper() on the input before checking if
> > the flag exists in the name-to-bit dictionary? And use uppercased
> > versions in the dictionary. Or the low-cased ones, doesn't matter.
> > 
> > I can understand adding typo-ed versions there, though.
> 
> They existed before my patch, I just re-arranged then to bit order. I only added two new bit locations.
> 
> Hope that explains the change a bit better
Yes, I understand that. May be you would add another patch in the
patchset that transforms the resulting dictionary look up?

-- 
/ Alexander Bokovoy



More information about the samba-technical mailing list