Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replmetadata sort minimal #1

Closed
wants to merge 14 commits into from

Commits on Aug 18, 2015

  1. python: Use an unsigned integer for buf_size, not -1

    This will fail once our python bindings correctly check value ranges
    
    Signed-off-by: Andrew Bartlett <abartlet@samba.org>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11429
    abartlet committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    62b12a4 View commit details
    Browse the repository at this point in the history
  2. pidl: Change PIDL to correctly use and validate python integer types

    In particular, it is critical that we use unsigned integers of
    sufficient size in python for unsigned C integers, and it is
    critical that we check for overflow at both the python and C
    level.
    
    Otherwise, we may both represent and sort these incorrectly,
    in particular when sorting attributeID values from DRSUAPI
    which are represented as an signed enum in C and a uint32_t in IDL,
    but which often has the high bit set (in schema extensions).
    
    Signed-off-by: Andrew Bartlett <abartlet@samba.org>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11429
    abartlet committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    01ca012 View commit details
    Browse the repository at this point in the history
  3. pydsdb: Allow the full range of uint32_t values for attributeID

    The high bit may be set in these integers, so we need an unsigned int to store it in
    
    Signed-off-by: Andrew Bartlett <abartlet@samba.org>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11429
    abartlet committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    335e3d5 View commit details
    Browse the repository at this point in the history
  4. dbcheck: Add explict tests for unknown and unsorted attributeID values

    Unknown attributeID values would cause an exception previously, and
    unsorted attributes cause a failure to replicate with Samba 4.2.
    
    In commit 61b9788 we started
    to sort these values correctly, but previous versions of Samba
    did not sort them correctly (we sorted high-bit-set values as
    negative), and then after 9c9df40
    we stoped accepting these.
    
    To ensure we are allowed to make this unusual change to the
    replPropertyMetaData, a new OID is allocated and checked
    for in repl_meta_data.c
    
    Signed-off-by: Andrew Bartlett <abartlet@samba.org>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=10973
    abartlet committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    e05694b View commit details
    Browse the repository at this point in the history
  5. dbcheck: Add additional tests for the attributeID list

    Signed-off-by: Andrew Bartlett <abartlet@samba.org>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=10973
    abartlet committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    2ccdb35 View commit details
    Browse the repository at this point in the history
  6. dbcheck: Try to avoid duplicate searches

    Signed-off-by: Andrew Bartlett <abartlet@samba.org>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=10973
    abartlet committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    0935c49 View commit details
    Browse the repository at this point in the history
  7. dbcheck: Use set() operations to make dbcheck more efficient

    Signed-off-by: Andrew Bartlett <abartlet@samba.org>
    abartlet committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    c59eaf7 View commit details
    Browse the repository at this point in the history
  8. ldb: create a cache of known wellknown objects instead of continously…

    … searching in the db
    
    Profiling on dbcheck have shown that we spend 10% of the time looking
    for wellknown objects.
    
    Change-Id: I13ed58e8062d1b7b6179d17b0e7e56f943572c6c
    Signed-off-by: Matthieu Patou <mat@matws.net>
    ekacnet authored and abartlet committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    249e178 View commit details
    Browse the repository at this point in the history
  9. pidl: Assert that python arrays will not overflow the C array

    We do not write network services in Python, so this is not a security issue, but would cause
    a crash or other odd behaviour if the length was changed
    
    Signed-off-by: Andrew Bartlett <abartlet@samba.org>
    https://bugzilla.samba.org/show_bug.cgi?id=11430
    abartlet committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    7f0103a View commit details
    Browse the repository at this point in the history
  10. python/tests: Add tests for integer overflow handling

    This also documents an issue with our python bindings and lists, as changes to integers in a list
    of integers are not preserved
    
    Signed-off-by: Andrew Bartlett <abartlet@samba.org>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11429
    abartlet committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    06143c7 View commit details
    Browse the repository at this point in the history
  11. Update release-4-1-0rc3 to include data using schema modifications

    This allows us to know that the previous patches are correct.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=10973
    Signed-off-by: Andrew Bartlett <abartlet@samba.org>
    abartlet committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    535024c View commit details
    Browse the repository at this point in the history
  12. selftest: Add in steps to re-create this database

    This may assist if this needs to be changed again
    
    Signed-off-by: Andrew Bartlett <abartlet@samba.org>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=10973
    abartlet committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    03bf120 View commit details
    Browse the repository at this point in the history
  13. selftest: Add assertion that we actually fix the replPropertyMetaData…

    … sort order
    
    This ensures that the dbcheck rule fixes the sort order (and only fixes the sort order).
    
    Signed-off-by: Andrew Bartlett <abartlet@samba.org>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=10973
    abartlet committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    a506c87 View commit details
    Browse the repository at this point in the history
  14. dnsserver: Remove incorrect and not required include of ldb_private.h

    Signed-off-by: Andrew Bartlett <abartlet@samba.org>
    abartlet committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    4c46e2d View commit details
    Browse the repository at this point in the history