The branch, v4-5-test has been updated
       via  f7ed6b2 s3: libsmb: Fix cut and paste error using the wrong 
structure type.
       via  152041e s3:libads: don't use MEMORY:ads_sasl_spnego_bind nor set 
"KRB5CCNAME"
       via  58f41cf s3:libads: don't use MEMORY:ads_sasl_gssapi_do_bind nor set 
"KRB5CCNAME"
       via  e6c2921 HEIMDAL:lib/krb5: destroy a memory ccache on reinit
       via  0b7656b s3-printing: fix migrate printer code (bug 8618)
       via  c5a0fc0 dbcheck: assert uSNChanged values in release-4-5-0-pre1
       via  53f94de tests: Skip a test for reveal internals for passing Windows
       via  d209450 tests: Check that USN bumps when modifying a linked attr
       via  8107066 dbcheck: Make it clearer about temporary output
       via  a439f7c tombstone-expunge: Assert than an expunge does not bump the 
USN
       via  bd78656 tests: Assert vanishing links doesn't bump USN
       via  43db0f1 rpmd: Skip bump of USN when vanishing forward links
       via  a67aa0a rpmd: Add a TODO regarding the additional work performed
       via  e7ef79c rpmd: Remove the seq_num check for skipping additional work
       via  72396f9 rpmd: Add the ldb error string to a debug
       via  f98f264 torture: Remove unnecessary whitespace
       via  ead7488 copyright: Add the missing notices for garbage collect 
tombstones
       via  c6578c3 dsdb: refactor part of garbage_collect_tombstones into new 
function
       via  7dbb5de kcc: Fix a -Werror,-Wformat-security error
       via  b3e2bfe gc_tombstones: Typo fix
       via  a8d2f52 dsdb: Do not check isDeleted as a possible link
       via  797fb64 lib/ldb-samba: Add test for DSDB_MATCH_FOR_EXPUNGE match 
rule
       via  2c8c52a dsdb: Add comments to dsdb_garbage_collect_tombstones()
       via  608b85b samba-tool: Run samba-tool domain tombstones expunge in a 
transaction
       via  7121855 selftest: Add test for 'samba-tool tombstones expunge'
       via  4b4d71f dsdb: Use a date comparison in the search to avoid 
returning all deleted objects
       via  679700a dsdb: Expose ldb error string to 
dsdb_garbage_collect_tombstones() callers
       via  68598e4 samba-tool: Add command-line tool to trigger tombstone 
expunge
       via  1902436 python: Add binding for dsdb_garbage_collect_tombstones()
       via  bdde527 dsdb: Expand garbage_collect_tombstones to expunge links 
also
       via  8f4f4fb dsdb: move tombstone lifetime calculation out of 
dsdb_garbage_collect_tombstones()
       via  6a2ed19 dsdb: Rework more KCC service-specific details out of 
dsdb_garbage_collect_tombstones()
       via  99d0dfb dsdb: Rework kcc_deleted() into 
dsdb_garbage_collect_tombstones()
       via  c71a3c6 kcc: Move kcc/kcc_deleted.c into 
kcc/garbage_collect_tombstones.c
       via  bd3c138 ldb-samba: Add new extended match rule 
DSDB_MATCH_FOR_EXPUNGE
       via  dbe2cc7 pydsdb: Raise TypeError for type errors, rather than 
incorrectly raising an LdbError
       via  bcaf3ca selftest: Correct name of 
samba4.blackbox.dbcheck.release-4-5-0-pre1
       via  92bc396 s3: cldap: cldap_multi_netlogon_send() fails with one bad 
IPv6 address.
       via  d465cab s3-utils: Fix loading smb.conf in smbcquotas
       via  bed424f ntquotas: support "freeing" an empty quota list
       via  a54e4e7 s3/winbindd: using default domain with u...@domain.com 
format fails
       via  d6958d2 Add a blackbox tests for id & getent to test domain@realm 
type credentials
       via  fbd9451 winbind: Fix passing idmap failure from wb_sids2xids back 
to callers
       via  1cb9aeb idmap_ad: Fix retrieving credentials from clustered 
secrets.tdb
       via  b509d3a lib: Fix bug 12291
       via  cceb6e6 smbd: free talloc context if no quota records are available
       via  cbf9151 cliquota: fix param count when setting fs quota
       via  859e9c2 s3-lib: Fix %G substitution in AD member environment
       via  89e0e26 smbcquotas: fix error message listing quotas
       via  b2e42fe s3-cliquota: correctly handle no-more-entries
       via  7fd1d67 s3-sysquotas: correctly restore path when finding mount 
point
       via  50c559f torture/ioctl: test compression responses when unsupported
       via  100e780 smbd/ioctl: match WS2016 ReFS get compression behaviour
       via  8c9ac5b vfs_glusterfs: Fix a memory leak in connect path
       via  e05bae4 spoolss: Fix caching of printername->sharename
       via  152a6d8 kcc: Don't check schedule if None
       via  7b8d064 s4:samba_spnupdate: do not attempt to parse log level, use 
parsed value
       via  d6027e6 python/join: do not attempt to parse log level, use parsed 
value
       via  50087612 python/drs_utils: do not attempt to parse log level, use 
parsed value
       via  d10c377 tests/param add a test for LoadParm.log_level
       via  156136e s4:param add log_level function to retrieve log level in 
Python code
       via  103483a glusterfs: Avoid tevent_internal.h
       via  9562114 s3: events. Move events.c to util_event.c
       via  3f5388f s3: server: s3_tevent_context_init() -> 
samba_tevent_context_init()
       via  41d4a4c s3: winbind: Remove dump_event_list() calls.
       via  4fa26e0 s3: nmbd: Final changeover to stock tevent for nmbd.
       via  4842157 s3: nmbd: Change over to using tevent functions from direct 
poll.
       via  4cceabe s3: nmbd: Add a talloc_stackframe().
       via  42963c4 s3: nmbd: Add (currently unused) timeout and fd handlers.
       via  c290763 s3: nmbd: Now attrs array mirrors fd's array use it in 
preference.
       via  c9dbe89 s3: nmbd: Ensure attrs array mirrors fd's array for dns.
       via  abec724 s3: nmbd: Add fd, triggered elements to struct 
socket_attributes.
       via  d0bd672 s3:nmbd: fix talloc_zero_array() check in nmbd_packets.c
       via  1e288f5 s3: winbind: Ensure we store name2sid with the correct 
cache sequence number.
       via  208c136 s3: winbind: Trust name2sid mappings from the PAC.
       via  0e2726e s3: winbind: refresh_sequence_number is only ever called 
with 'false'.
       via  38ffca0 s3: auth: Use wbcAuthenticateUserEx to prime the caches.
       via  477abfb s3: winbind: Make WBC_AUTH_USER_LEVEL_PAC prime the 
name2sid cache.
       via  51c6659 ctdb-scripts: ctdbd_wrapper should never remove the PID file
      from  416d062 ctdb-daemon: Log when removing stale Unix domain socket

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-5-test


- Log -----------------------------------------------------------------
commit f7ed6b292941e66f697352426cdbe3d7958138ca
Author: Jeremy Allison <j...@samba.org>
Date:   Tue Oct 18 16:33:49 2016 -0700

    s3: libsmb: Fix cut and paste error using the wrong structure type.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12383
    
    Signed-off-by: Jeremy Allison <j...@samba.org>
    Reviewed-by: Volker Lendecke <v...@samba.org>
    
    Autobuild-User(master): Volker Lendecke <v...@samba.org>
    Autobuild-Date(master): Wed Oct 19 14:33:53 CEST 2016 on sn-devel-144
    
    (cherry picked from commit c21a6eda370fa0b0698a5e1fd565bd2e014d326a)
    
    Autobuild-User(v4-5-test): Karolin Seeger <ksee...@samba.org>
    Autobuild-Date(v4-5-test): Thu Oct 20 14:45:29 CEST 2016 on sn-devel-144

commit 152041ee787cc925086d92d6597c88b8732964f2
Author: Stefan Metzmacher <me...@samba.org>
Date:   Mon Oct 10 17:07:12 2016 +0200

    s3:libads: don't use MEMORY:ads_sasl_spnego_bind nor set "KRB5CCNAME"
    
    Most callers just set "KRB5CCNAME", but leave ads->auth.ccache_name = NULL.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12369
    
    Signed-off-by: Stefan Metzmacher <me...@samba.org>
    Reviewed-by: Günther Deschner <g...@samba.org>
    Reviewed-by: Uri Simchoni <u...@samba.org>
    
    Autobuild-User(master): Jeremy Allison <j...@samba.org>
    Autobuild-Date(master): Thu Oct 13 00:35:21 CEST 2016 on sn-devel-144
    
    (cherry picked from commit a5f895a53016af71db53967062728fec5bc307ca)

commit 58f41cf4dba79c311fa2f972633fa61951a19165
Author: Stefan Metzmacher <me...@samba.org>
Date:   Mon Oct 10 17:07:12 2016 +0200

    s3:libads: don't use MEMORY:ads_sasl_gssapi_do_bind nor set "KRB5CCNAME"
    
    Most callers just set "KRB5CCNAME", but leave ads->auth.ccache_name = NULL.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12369
    
    Signed-off-by: Stefan Metzmacher <me...@samba.org>
    Reviewed-by: Günther Deschner <g...@samba.org>
    Reviewed-by: Uri Simchoni <u...@samba.org>
    (cherry picked from commit 890b1bbdb8e965c4ff6e35214acc96ffbbff5dfd)

commit e6c2921a1cb0a0f744c4448e444371ffdcaa6e0f
Author: Stefan Metzmacher <me...@samba.org>
Date:   Mon Oct 10 15:53:26 2016 +0200

    HEIMDAL:lib/krb5: destroy a memory ccache on reinit
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12369
    
    Signed-off-by: Stefan Metzmacher <me...@samba.org>
    Reviewed-by: Günther Deschner <g...@samba.org>
    Reviewed-by: Uri Simchoni <u...@samba.org>
    (cherry picked from commit 2abc3710a8a63327a769ba0482c553ed274b2113)

commit 0b7656b3fac036e4095c59f108c021c0af662287
Author: Björn Baumbach <b...@sernet.de>
Date:   Fri Nov 18 18:54:56 2011 +0100

    s3-printing: fix migrate printer code (bug 8618)
    
    Removed path from driver files.
    We only need the basenames.
    (cherry picked from commit d61993043fcb7676a58658476421f5f4ff1a3fea)
    (cherry picked from commit 9f07ef2249dc21eab37cd5888623e6edc84b2b59)
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=8618
    
    Reviewed-by: Stefan Metzmacher <me...@samba.org>
    Reviewed-by: Andreas Schneider <a...@samba.org>
    Reviewed-by: Günther Deschner <g...@samba.org>
    
    Autobuild-User(master): Stefan Metzmacher <me...@samba.org>
    Autobuild-Date(master): Wed Oct  5 19:19:39 CEST 2016 on sn-devel-144
    
    (cherry picked from commit eb7555397fd4e9f66e041179aadff59f2a39d14f)

commit c5a0fc082959d4fba5e76831e9b952e947d99eb3
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Thu Sep 8 16:34:51 2016 +1200

    dbcheck: assert uSNChanged values in release-4-5-0-pre1
    
    This shows that dbcheck doesn't change the replPropertyMetadata when
    fixing the links on these objects.
    
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12382
    
    Autobuild-User(master): Garming Sam <garm...@samba.org>
    Autobuild-Date(master): Thu Sep  8 14:39:19 CEST 2016 on sn-devel-144
    
    (cherry picked from commit 0ab32637249fb88917d240e78c0f213b83236027)

commit 53f94de679f9a74a97af6b1ef06d06b78ba18854
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Thu Sep 8 15:45:56 2016 +1200

    tests: Skip a test for reveal internals for passing Windows
    
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12382
    (cherry picked from commit 4a264f6460941e6cc741c3dfd1bba72a076a8267)

commit d2094509c160b3d8b1b5b8dfc3e09d80478c237b
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Thu Sep 8 17:04:29 2016 +1200

    tests: Check that USN bumps when modifying a linked attr
    
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12382
    (cherry picked from commit d5127b75d3582f6dbae203f26284a36ec6e1549d)

commit 8107066301eabc0f15aa4ab9d1fe6eb453df5dcf
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Thu Sep 8 15:29:35 2016 +1200

    dbcheck: Make it clearer about temporary output
    
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12382
    (cherry picked from commit 974a8da0d996f1396ef5b8e7759f31ee7b92b254)

commit a439f7cef5bfcb52f0bb23467880e1f84e7a358f
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Thu Sep 8 15:27:42 2016 +1200

    tombstone-expunge: Assert than an expunge does not bump the USN
    
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12382
    (cherry picked from commit cf587f9aff2638a31463ee6b28430ff7a3efb505)

commit bd78656f224f8d5eb5a9ad6b35639a52f9fca2a5
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Thu Sep 8 14:40:08 2016 +1200

    tests: Assert vanishing links doesn't bump USN
    
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12382
    (cherry picked from commit a9c6879bb52b7dcfbfd6c329635aa235199e7145)

commit 43db0f103ee366c92dc0d790ceaa0229943f50f4
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Thu Sep 8 14:40:40 2016 +1200

    rpmd: Skip bump of USN when vanishing forward links
    
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12382
    (cherry picked from commit ecf237cc3872674d2fbe489b8a1e8449f4063d8b)

commit a67aa0ac6cf39fafd00dd1779169467dceb55b24
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Thu Sep 8 14:46:06 2016 +1200

    rpmd: Add a TODO regarding the additional work performed
    
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12382
    (cherry picked from commit 434bf4a5b5899c3390730bbd1f8ffad899a3ff73)

commit e7ef79c800b6942010b30edb89320433e7b86f65
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Thu Sep 8 14:42:01 2016 +1200

    rpmd: Remove the seq_num check for skipping additional work
    
    We will need this in a later patch.
    
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12382
    (cherry picked from commit d6a16b4d7f069d8a916c778bc26e6b645722c89b)

commit 72396f9f100f68cb03c828451ebeec69a8f474ca
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Thu Sep 8 14:46:38 2016 +1200

    rpmd: Add the ldb error string to a debug
    
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12382
    (cherry picked from commit b7f363c64f0238daa36d7a79f08d34785c7444f2)

commit f98f2644d76fb614bcc9962f5dc223e45cba313e
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Thu Sep 8 13:33:11 2016 +1200

    torture: Remove unnecessary whitespace
    
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12382
    (cherry picked from commit c0239a9bf6f803e9f932b1a4fd267c614c33a4e8)

commit ead74889764c35f4a7eb3a007f91ab49d618bc6b
Author: Bob Campbell <bobcampb...@catalyst.net.nz>
Date:   Mon Sep 5 11:24:19 2016 +1200

    copyright: Add the missing notices for garbage collect tombstones
    
    Signed-off-by: Bob Campbell <bobcampb...@catalyst.net.nz>
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12382
    
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    
    Autobuild-User(master): Garming Sam <garm...@samba.org>
    Autobuild-Date(master): Mon Sep  5 08:14:26 CEST 2016 on sn-devel-144
    
    (cherry picked from commit e69715138fe14d8dc51f65cf5986b178c98f40a2)

commit c6578c38a96ee3df5c0c222dd910c1d852ad95aa
Author: Bob Campbell <bobcampb...@catalyst.net.nz>
Date:   Mon Sep 5 10:48:13 2016 +1200

    dsdb: refactor part of garbage_collect_tombstones into new function
    
    Pair-programmed-with: Garming Sam <garm...@catalyst.net.nz>
    
    Signed-off-by: Bob Campbell <bobcampb...@catalyst.net.nz>
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12382
    
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    (cherry picked from commit 2dfedffb740ecfe898945a9fc47b24e3c8328d7e)

commit 7dbb5decf27bb9e6619c9a5f65a0461256f11d60
Author: Volker Lendecke <v...@samba.org>
Date:   Fri Sep 2 09:17:33 2016 +0200

    kcc: Fix a -Werror,-Wformat-security error
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Michael Adam <ob...@samba.org>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12382
    
    Autobuild-User(master): Michael Adam <ob...@samba.org>
    Autobuild-Date(master): Fri Sep  2 13:54:45 CEST 2016 on sn-devel-144
    
    (cherry picked from commit a7735bedd5b2111fa036625738e5831651eb2007)

commit b3e2bfe21fd983a1a95c1a4bd7959f423905c038
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Thu Sep 1 14:26:53 2016 +1200

    gc_tombstones: Typo fix
    
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Douglas Bagnall <douglasbagn...@catalyst.net.nz>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12382
    
    Autobuild-User(master): Garming Sam <garm...@samba.org>
    Autobuild-Date(master): Thu Sep  1 09:38:47 CEST 2016 on sn-devel-144
    
    (cherry picked from commit f479b1b3fd787fd2cbedc6161a4e0eb0af1059e3)

commit a8d2f523ff155ce153ce538cac0eb541e9b0b365
Author: Andrew Bartlett <abart...@samba.org>
Date:   Thu Sep 1 14:17:27 2016 +1200

    dsdb: Do not check isDeleted as a possible link
    
    Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Garming Sam <garm...@catalyst.net.nz>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12382
    (cherry picked from commit b1ed0f4597e5ebd059d33b0a33de4ded96c9386f)

commit 797fb64d8011b2d331a1d0d082e520643a802654
Author: Andrew Bartlett <abart...@samba.org>
Date:   Thu Sep 1 13:34:12 2016 +1200

    lib/ldb-samba: Add test for DSDB_MATCH_FOR_EXPUNGE match rule
    
    Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Garming Sam <garm...@catalyst.net.nz>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12382
    (cherry picked from commit 737756b060364c09b62a500ef26eef044230ecac)

commit 2c8c52a77ea25cd19c9850cacdefee56d265dc53
Author: Andrew Bartlett <abart...@samba.org>
Date:   Thu Sep 1 13:23:11 2016 +1200

    dsdb: Add comments to dsdb_garbage_collect_tombstones()
    
    Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Garming Sam <garm...@catalyst.net.nz>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12382
    (cherry picked from commit d27673587707f2dc59bd5161cd70ca96118d5ceb)

commit 608b85b12d606dcdb3dfd1324a8399d0f24de6d0
Author: Andrew Bartlett <abart...@samba.org>
Date:   Thu Sep 1 12:13:40 2016 +1200

    samba-tool: Run samba-tool domain tombstones expunge in a transaction
    
    Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Garming Sam <garm...@catalyst.net.nz>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12382
    (cherry picked from commit 5620616968bd68b80d872079ad3bbb97ac1e7a8a)

commit 71218553d6f8ef0e32bbacc8e6cd314adc527d9d
Author: Andrew Bartlett <abart...@samba.org>
Date:   Wed Aug 31 17:07:29 2016 +1200

    selftest: Add test for 'samba-tool tombstones expunge'
    
    Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Garming Sam <garm...@catalyst.net.nz>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12382
    (cherry picked from commit a999e8c0cbbfcb59caf4732c952e3e9856ea7577)

commit 4b4d71fdaf7a91be2f825a6d3f6583362b05cc5c
Author: Andrew Bartlett <abart...@samba.org>
Date:   Tue Aug 30 10:30:51 2016 +1200

    dsdb: Use a date comparison in the search to avoid returning all deleted 
objects
    
    Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Garming Sam <garm...@catalyst.net.nz>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12382
    (cherry picked from commit d66deaabc6faca769e9e18098eef4729f3dad379)

commit 679700a3e165cfe772575a8e1b3b0a44c2de1cf0
Author: Andrew Bartlett <abart...@samba.org>
Date:   Tue Aug 30 10:22:47 2016 +1200

    dsdb: Expose ldb error string to dsdb_garbage_collect_tombstones() callers
    
    Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Garming Sam <garm...@catalyst.net.nz>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12382
    (cherry picked from commit 240038979d748b830b788753b38c3cd576eafe30)

commit 68598e4d196ab8f4dfcab044e61746571e3238d7
Author: Andrew Bartlett <abart...@samba.org>
Date:   Mon Aug 29 18:36:19 2016 +1200

    samba-tool: Add command-line tool to trigger tombstone expunge
    
    This allows us to carefully test the garbage collection of tombstoned 
objects
    without running the full server and waiting for the timer to expire
    
    Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Garming Sam <garm...@catalyst.net.nz>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12382
    (cherry picked from commit 55b9b9a969b0e7ef6590710fda85265fc3146159)

commit 1902436de96eeba04c60765b92e78bac2c51109f
Author: Andrew Bartlett <abart...@samba.org>
Date:   Mon Jul 18 13:11:10 2016 +1200

    python: Add binding for dsdb_garbage_collect_tombstones()
    
    Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Garming Sam <garm...@catalyst.net.nz>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12382
    (cherry picked from commit 02d82af06f3f13bdfd7497d168ba06f1092ede12)

commit bdde5274a6bab970e1b56faac0e8d1de99f65f71
Author: Andrew Bartlett <abart...@samba.org>
Date:   Mon Jul 18 13:17:52 2016 +1200

    dsdb: Expand garbage_collect_tombstones to expunge links also
    
    This requires a significant rework, as we can no longer
    do a one-level search and hope to find most of the deleted
    objects.  Therefore we fall back to a full scan, but less often.
    
    Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Garming Sam <garm...@catalyst.net.nz>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12382
    (cherry picked from commit 1c636532874da6cf998538027f088c1da019f15d)

commit 8f4f4fbcb4267153e0fb3b0468927df121fbe6be
Author: Andrew Bartlett <abart...@samba.org>
Date:   Mon Aug 29 19:02:39 2016 +1200

    dsdb: move tombstone lifetime calculation out of 
dsdb_garbage_collect_tombstones()
    
    This will allow it to be specified by the caller when we add python bindings
    
    Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Garming Sam <garm...@catalyst.net.nz>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12382
    (cherry picked from commit 824220e9bd7ffb9457ffc5a5bf0b5d279146f85c)

commit 6a2ed191fbc440f44068cc6185b4d652f3532cb1
Author: Andrew Bartlett <abart...@samba.org>
Date:   Mon Aug 29 18:56:10 2016 +1200

    dsdb: Rework more KCC service-specific details out of 
dsdb_garbage_collect_tombstones()
    
    Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Garming Sam <garm...@catalyst.net.nz>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12382
    (cherry picked from commit d894f08ba95ae994dd1603af28bd74943bfdec9f)

commit 99d0dfbbaabfd6b2b5c83126bbb71a1ea1b94c1e
Author: Andrew Bartlett <abart...@samba.org>
Date:   Mon Jul 18 13:10:23 2016 +1200

    dsdb: Rework kcc_deleted() into dsdb_garbage_collect_tombstones()
    
    This is so that in a future commit, we can wrap this in python and allow it 
to be called
    from outside the samba server processs.
    
    This requires that we rework the callers and internals to avoid reference to
    private data structures of the KCC service.
    
    Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Garming Sam <garm...@catalyst.net.nz>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12382
    (cherry picked from commit 4e0ac09ef6c6fadd67718f7b5aca7283fb8086b1)

commit c71a3c66613178cf9fb6b2e658598a3c8be304e1
Author: Andrew Bartlett <abart...@samba.org>
Date:   Mon Jul 18 11:53:50 2016 +1200

    kcc: Move kcc/kcc_deleted.c into kcc/garbage_collect_tombstones.c
    
    This is in preperation for a python binding for this function
    
    Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Garming Sam <garm...@catalyst.net.nz>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12382
    (cherry picked from commit 9221ce3a3237a8ded78e371fef2b8e4f03722b63)

commit bd3c138fe49abe0f1404ba8cb01e55406a10a390
Author: Andrew Bartlett <abart...@samba.org>
Date:   Mon Aug 29 18:20:18 2016 +1200

    ldb-samba: Add new extended match rule DSDB_MATCH_FOR_EXPUNGE
    
    This allows us to find links that need to be expunged
    without passing the whole DB up in the search response.
    
    While each message still needs to be examined, this code
    only has to do memory allocation for entries with links
    
    Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Garming Sam <garm...@catalyst.net.nz>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12382
    (cherry picked from commit eb1cb175980a87b8a7cbd765783af33e4a7d6017)

commit dbe2cc754432a39b32f073c7c9a3718440ef5d1e
Author: Andrew Bartlett <abart...@samba.org>
Date:   Thu Aug 25 11:28:32 2016 +1200

    pydsdb: Raise TypeError for type errors, rather than incorrectly raising an 
LdbError
    
    Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Garming Sam <garm...@catalyst.net.nz>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12382
    (cherry picked from commit 9142a01bb55a09e836c70d15fe420fb2599aec6f)

commit bcaf3ca32fa599ae5f27823bab978b2b31da3a7a
Author: Andrew Bartlett <abart...@samba.org>
Date:   Wed Aug 31 11:39:24 2016 +1200

    selftest: Correct name of samba4.blackbox.dbcheck.release-4-5-0-pre1
    
    Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Garming Sam <garm...@catalyst.net.nz>
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12382
    (cherry picked from commit 599d3f7f8358f6107e1d13ab0a92c3143f32435e)

commit 92bc3963a92f86c2e37d22c08ad8b6ff2bb6e88a
Author: Jeremy Allison <j...@samba.org>
Date:   Mon Oct 17 10:07:23 2016 -0700

    s3: cldap: cldap_multi_netlogon_send() fails with one bad IPv6 address.
    
    Analysis by: Rebecca Gellman <rebe...@starfleet-net.co.uk>
    
    Ignore cldap_socket_init() failure when sending
    multiple cldap netlogon requests. Allow cldap_netlogon_send()
    to catch the bad address and correctly return through a
    tevent subreq.
    
    Make sure cldap_search_send() copes with cldap parameter == NULL.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12381
    
    Signed-off-by: Jeremy Allison <j...@samba.org>
    Reviewed-by: Ralph Boehme <s...@samba.org>
    
    Autobuild-User(master): Ralph Böhme <s...@samba.org>
    Autobuild-Date(master): Tue Oct 18 02:16:20 CEST 2016 on sn-devel-144
    
    (cherry picked from commit 44a7040500d74551b48eba04f5d0bedb1ec35ba6)

commit d465cabc8ea1080f52376ec3c8bf6c955e68be39
Author: Andreas Schneider <a...@samba.org>
Date:   Wed Oct 5 08:22:54 2016 +0200

    s3-utils: Fix loading smb.conf in smbcquotas
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12364
    
    Pair-Programmed-With: Uri Simchoni <u...@samba.org>
    Signed-off-by: Andreas Schneider <a...@samba.org>
    Signed-off-by: Uri Simchoni <u...@samba.org>
    Reviewed-by: Jeremy Allison <j...@samba.org>
    (cherry picked from commit c7bcbd166d23b6ebcc2d968b76b0640b9a9beebb)

commit bed424f735e10b2ca9aba76c096a170d665146de
Author: Uri Simchoni <u...@samba.org>
Date:   Sun Sep 18 11:09:54 2016 +0300

    ntquotas: support "freeing" an empty quota list
    
    This avoids dereferencing a null pointer if there's
    an attempt to free an empty list.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12307
    
    Signed-off-by: Uri Simchoni <u...@samba.org>
    Reviewed-by: Jeremy Allison <j...@samba.org>
    (cherry picked from commit dd8a0578d8c9f562a4f13a90f4fe51f66058dd02)

commit a54e4e7aec8eca3cb65837b969bbb5c7e3bc6106
Author: Noel Power <noel.po...@suse.com>
Date:   Tue Sep 20 11:49:49 2016 +0100

    s3/winbindd: using default domain with u...@domain.com format fails
    
    For example for samba client joined to a windows AD DC the following
    commands fail if 'winbind use default domain = yes'
       getent passwd u...@domain.com
       ssh -o user=u...@domain.com localhost
    
    The same commands succeed if the setting above has the default 'no' value
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12298
    
    Signed-off-by: Noel Power <noel.po...@suse.com>
    Reviewed-by: Jeremy Allison <j...@samba.org>
    Reviewed-by: Andreas Schneider <a...@samba.org>
    
    Autobuild-User(master): Jeremy Allison <j...@samba.org>
    Autobuild-Date(master): Mon Oct  3 23:37:44 CEST 2016 on sn-devel-144
    
    (cherry picked from commit 7c786f89820dc1f8e2a7e8da1b80042dd69b7188)

commit d6958d25a9412110a9a0e7f5aed93b806515a10f
Author: Noel Power <noel.po...@suse.com>
Date:   Thu Sep 29 16:50:58 2016 +0100

    Add a blackbox tests for id & getent to test domain@realm type credentials
    
    Using domain@realm credentials has been problematic when
    global conf setting "winbind use default domain" is enabled, this patch
    creates a new s4member_dflt_domain environment (where
    "winbind use default domain" is enabled) and runs getent & id against the
    normal s4member & and new s4member_dflt_domain environments
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12298
    
    Signed-off-by: Noel Power <noel.po...@suse.com>
    Reviewed-by: Jeremy Allison <j...@samba.org>
    Reviewed-by: Andreas Schneider <a...@samba.org>
    (cherry picked from commit ebfe3c85d0bbdf5d5f7459ddd61e3b44c3ec2bd3)

commit fbd94511e4ac0d37446211adf68b058aedc1b25f
Author: Christof Schmitt <c...@samba.org>
Date:   Mon Sep 26 14:27:28 2016 -0700

    winbind: Fix passing idmap failure from wb_sids2xids back to callers
    
    If the idmap call in wb_sids2xids fails, the callers expect xid.type to
    be set to ID_TYPE_NOT_SPECIFIED, not the internal type field that is
    initialized from the lookupsids call.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12295
    
    Signed-off-by: Christof Schmitt <c...@samba.org>
    Reviewed-by: Jeremy Allison <j...@samba.org>
    
    Autobuild-User(master): Jeremy Allison <j...@samba.org>
    Autobuild-Date(master): Fri Sep 30 02:10:29 CEST 2016 on sn-devel-144
    
    (cherry picked from commit 1f9501cad63717d6e4ea01974f853b199f359b40)

commit 1cb9aeb491b3041e2b7872028b68fa3659192d23
Author: Christof Schmitt <c...@samba.org>
Date:   Mon Sep 26 14:40:28 2016 -0700

    idmap_ad: Fix retrieving credentials from clustered secrets.tdb
    
    cli_credentials_set_machine_account only reads from a local tdb. Change
    that call to cli_credentials_set_machine_account_db_ctx to fix this for
    clustered Samba.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12295
    
    Signed-off-by: Christof Schmitt <c...@samba.org>
    Reviewed-by: Volker Lendecke <v...@samba.org>
    (cherry picked from commit 7a3b7804cba53a21739e8912b005ab498e921eb7)

commit b509d3a76a0dcca99f6d84ffc36cb3a9f58e891d
Author: Volker Lendecke <v...@samba.org>
Date:   Tue Sep 27 10:08:18 2016 -0700

    lib: Fix bug 12291
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=12291
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Günther Deschner <g...@samba.org>
    
    Autobuild-User(master): Volker Lendecke <v...@samba.org>
    Autobuild-Date(master): Wed Sep 28 19:01:02 CEST 2016 on sn-devel-144

commit cceb6e636a266d572528d8f1b829c4e0fc103527
Author: Uri Simchoni <u...@samba.org>
Date:   Sun Sep 18 11:05:23 2016 +0300

    smbd: free talloc context if no quota records are available
    
    When generating a list of user quota records, free the memory
    context that controls this list if the list is empty. Otherwise,
    the context remains unreferenced and memory is leaked.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12289
    
    Signed-off-by: Uri Simchoni <u...@samba.org>
    Reviewed-by: Jeremy Allison <j...@samba.org>
    (cherry picked from commit 175bc6f1e3442f5cb2258aaadf318ebf23c5d769)

commit cbf9151f9e3bf59faad730b505c554a71f9f32d1
Author: Uri Simchoni <u...@samba.org>
Date:   Thu Sep 22 16:06:12 2016 +0300

    cliquota: fix param count when setting fs quota
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12288
    
    Signed-off-by: Uri Simchoni <u...@samba.org>
    Reviewed-by: Jeremy Allison <j...@samba.org>
    (cherry picked from commit dad6c2d5631ab9879dd4cd35231b2e8c8a9e8311)

commit 859e9c258a363564f2c2f48556dc3405540ba6f8
Author: Andreas Schneider <a...@samba.org>
Date:   Mon Sep 19 13:59:54 2016 +0200

    s3-lib: Fix %G substitution in AD member environment
    
    If we are a domain member we should look up the user with the domain
    name specified else it will only work if we have
    'winbind use default domain' set.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12276
    
    Signed-off-by: Andreas Schneider <a...@samba.org>
    Reviewed-by: Ralph Boehme <s...@samba.org>
    (cherry picked from commit 619ca5f63c47ff8b021692aaa756dcb0d883b8dd)

commit 89e0e266ed98824f601b022c22217fb40ee2f201
Author: Uri Simchoni <u...@samba.org>
Date:   Fri Sep 16 22:01:46 2016 +0300

    smbcquotas: fix error message listing quotas
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12270
    
    Signed-off-by: Uri Simchoni <u...@samba.org>
    Reviewed-by: Jeremy Allison <j...@samba.org>
    (cherry picked from commit 610c26d74c1314142981e5cc31a0706a4a99766f)

commit b2e42fe75479bfc0f08cab5b8a3530896519194a
Author: Uri Simchoni <u...@samba.org>
Date:   Fri Sep 16 21:57:50 2016 +0300

    s3-cliquota: correctly handle no-more-entries
    
    When listing quota records, a Windows server would
    return STATUS_SUCCESS until no more entries are available,
    where it would return STATUS_NO_MORE_ENTRIES.
    
    The fix keeps old behavior of empty answer also signifying
    end of record, to maintain compatibility with Samba servers.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12270
    
    Signed-off-by: Uri Simchoni <u...@samba.org>
    Reviewed-by: Jeremy Allison <j...@samba.org>
    (cherry picked from commit 5a947d6ca1928e4e4bd4caf2b86698b86d378a81)

commit 7fd1d6793bccd5febdd75c4977362290dc4b6e5c
Author: Uri Simchoni <u...@samba.org>
Date:   Fri Oct 7 11:05:07 2016 +0300

    s3-sysquotas: correctly restore path when finding mount point
    
    When traversing the path backwards to find the mount point, if the
    root '/' is reached, then the character to be restored is not a '/'.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12273
    
    Signed-off-by: Uri Simchoni <u...@samba.org>
    Reviewed-by: Jeremy Allison <j...@samba.org>
    
    Autobuild-User(master): Jeremy Allison <j...@samba.org>
    Autobuild-Date(master): Sat Oct  8 05:22:25 CEST 2016 on sn-devel-144
    
    (cherry picked from commit b3d938c9c03e8b726e966ccb979b09bd21e89f32)

commit 50c559fa25254762edf9e7061ff4d72d8f488e37
Author: David Disseldorp <dd...@samba.org>
Date:   Tue Oct 4 01:15:20 2016 +0200

    torture/ioctl: test compression responses when unsupported
    
    Confirm that Samba matches Windows Server 2016 ReFS behaviour here.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=12144
    
    Reported-by: Nick Barrett
    Signed-off-by: David Disseldorp <dd...@samba.org>
    Reviewed-by: Jeremy Allison <j...@samba.org>
    
    Autobuild-User(master): Jeremy Allison <j...@samba.org>
    Autobuild-Date(master): Thu Oct  6 06:14:34 CEST 2016 on sn-devel-144
    
    (cherry picked from commit f6f6263f1f03db965b64b5d7858e44ab5ffb0aeb)

commit 100e7809d4962661f0d360ebc5639b9029bc86ef
Author: David Disseldorp <dd...@samba.org>
Date:   Tue Oct 4 01:09:37 2016 +0200

    smbd/ioctl: match WS2016 ReFS get compression behaviour
    
    ReFS doesn't support compression, but responds to get-compression FSCTLs
    with a successful COMPRESSION_FORMAT_NONE response. set-compression
    results in NT_STATUS_NOT_SUPPORTED.
    
    This commit modifies Samba to match the ReFS behaviour, when run atop
    a VFS that doesn't expose compression support.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=12144
    
    Reported-by: Nick Barrett
    Signed-off-by: David Disseldorp <dd...@samba.org>
    Reviewed-by: Jeremy Allison <j...@samba.org>
    (cherry picked from commit 7a1000222877cdbc8967122b9de29021a42f4c8a)

commit 8c9ac5b3d94b3f71c0073573b2e4f9c378c18b44
Author: Anoop C S <anoo...@redhat.com>
Date:   Fri Oct 7 16:05:29 2016 +0530

    vfs_glusterfs: Fix a memory leak in connect path
    
    Early return in case of failure to set snapdir-entry-path xlator option
    leaks talloced tmp_ctx.
    
    Signed-off-by: Anoop C S <anoo...@redhat.com>
    Reviewed-by: Guenther Deschner <g...@samba.org>
    Reviewed-by: Andreas Schneider <a...@samba.org>
    
    Autobuild-User(master): Günther Deschner <g...@samba.org>
    Autobuild-Date(master): Fri Oct  7 19:39:11 CEST 2016 on sn-devel-144
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=12377
    
    (cherry picked from commit 06281e8f1b912540a8cc2a79497b074dbe559d53)

commit e05bae4e803f104247fd53cd1194e66c604b2267
Author: Volker Lendecke <v...@samba.org>
Date:   Wed Oct 12 11:06:51 2016 +0200

    spoolss: Fix caching of printername->sharename
    
    time_mono() gives seconds since boot, gencache expects seconds since epoch.
    With time_mono(), the values are always expired immediately.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=12374
    
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Guenther Deschner <g...@samba.org>
    
    Autobuild-User(master): Günther Deschner <g...@samba.org>
    Autobuild-Date(master): Thu Oct 13 13:48:52 CEST 2016 on sn-devel-144

commit 152a6d89143afb5869582a1fc43fb7fa7fa6b194
Author: Garming Sam <garm...@catalyst.net.nz>
Date:   Thu Sep 22 15:28:57 2016 +1200

    kcc: Don't check schedule if None
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12286
    
    Signed-off-by: Garming Sam <garm...@catalyst.net.nz>
    Reviewed-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz>
    
    Autobuild-User(master): Douglas Bagnall <dbagn...@samba.org>
    Autobuild-Date(master): Fri Sep 23 06:52:28 CEST 2016 on sn-devel-144
    
    (cherry picked from commit 60e4bd381a8fc5b74b52e85f111cd5113bd6772b)

commit 7b8d064180fb3ae19a858c100bf3bbca3c12af12
Author: Christian Ambach <a...@samba.org>
Date:   Tue Sep 13 10:49:47 2016 +0200

    s4:samba_spnupdate: do not attempt to parse log level, use parsed value
    
    The log level parameter can contain debug class specific entries.
    Do not attempt to parse this as int, but use the values that the
    debugging system already parsed
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=9945
    Signed-off-by: Christian Ambach <a...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    
    Autobuild-User(master): Christian Ambach <a...@samba.org>
    Autobuild-Date(master): Wed Sep 14 23:15:18 CEST 2016 on sn-devel-144
    
    (cherry picked from commit 064d24032398c8896da15246be81fdd4b1588e18)

commit d6027e6afa4c3e16836be3b274dc313c6309200f
Author: Christian Ambach <a...@samba.org>
Date:   Tue Sep 13 10:49:47 2016 +0200

    python/join: do not attempt to parse log level, use parsed value
    
    The log level parameter can contain debug class specific entries.
    Do not attempt to parse this as int, but use the values that the
    debugging system already parsed
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=9945
    Signed-off-by: Christian Ambach <a...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    (cherry picked from commit 92178f02bd09277f783eb68b476cfd1452c7f9ef)

commit 500876123a3c179cafb417a3bea60495d8e3e7a6
Author: Christian Ambach <a...@samba.org>
Date:   Tue Sep 13 10:49:47 2016 +0200

    python/drs_utils: do not attempt to parse log level, use parsed value
    
    The log level parameter can contain debug class specific entries.
    Do not attempt to parse this as int, but use the values that the
    debugging system already parsed
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=9945
    Signed-off-by: Christian Ambach <a...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    (cherry picked from commit dd25aa129b6d799853312134628402f77b492eab)

commit d10c37702af5417ae0292265c92c6cccf2be5e43
Author: Christian Ambach <a...@samba.org>
Date:   Tue Sep 13 11:22:38 2016 +0200

    tests/param add a test for LoadParm.log_level
    
    Signed-off-by: Christian Ambach <a...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    (cherry picked from commit fa56dbf6706872c5287eab082bb6ba7b5bd3ccd2)

commit 156136e3e1d8867b20c7c130ad6d8f21e4ca3532
Author: Christian Ambach <a...@samba.org>
Date:   Tue Sep 13 10:48:03 2016 +0200

    s4:param add log_level function to retrieve log level in Python code
    
    Signed-off-by: Christian Ambach <a...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    (cherry picked from commit 7ba50a200924119ac1a66759e4c1419ece03ba41)

commit 103483a34a32ec7fc0e80bc9b4091987a86f8f3b
Author: Volker Lendecke <v...@samba.org>
Date:   Sat Sep 24 10:45:13 2016 -0700

    glusterfs: Avoid tevent_internal.h
    
    Günther confirmed it still compiles :-)
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
    Signed-off-by: Volker Lendecke <v...@samba.org>
    Reviewed-by: Günther Deschner <g...@samba.org>
    
    Autobuild-User(master): Volker Lendecke <v...@samba.org>
    Autobuild-Date(master): Sat Sep 24 23:41:56 CEST 2016 on sn-devel-144
    
    (cherry picked from commit c60ea2c17814f9f7b55514e0d0a553accaa54b15)

commit 956211480e5f63985d329e10713db1d083098b02
Author: Jeremy Allison <j...@samba.org>
Date:   Fri Sep 23 20:00:33 2016 -0700

    s3: events. Move events.c to util_event.c
    
    Remove all tevent internal code.
    
    Everything is now stock tevent.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
    Signed-off-by: Jeremy Allison <j...@samba.org>
    Reviewed-by: Volker Lendecke <v...@samba.org>
    (similar to commit 4ed790ebbf474c4e4ef9b4f0f3aeca65118796df)

commit 3f5388ff336ee92501f5b2d1fcb8f8b76e449e03
Author: Jeremy Allison <j...@samba.org>
Date:   Fri Sep 23 19:11:17 2016 -0700

    s3: server: s3_tevent_context_init() -> samba_tevent_context_init()
    
    We can now remove source3/lib/events.c
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
    Signed-off-by: Jeremy Allison <j...@samba.org>
    Reviewed-by: Volker Lendecke <v...@samba.org>
    (cherry picked from commit fbfea52e1ce8f22d8d020a2bf3aebd1bc69faceb)

commit 41d4a4c56902eefc982f99a88b83cf97e1361d6b
Author: Jeremy Allison <j...@samba.org>
Date:   Fri Sep 23 19:07:39 2016 -0700

    s3: winbind: Remove dump_event_list() calls.
    
    If needed we can add this into actual tevent.
    
    Preparing to remove source3/lib/events.c
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
    Signed-off-by: Jeremy Allison <j...@samba.org>
    Reviewed-by: Volker Lendecke <v...@samba.org>
    (cherry picked from commit 72785309aa2d1bed7abc6dd7c6475ff0f78411da)

commit 4fa26e0ed3c828e7df7d378ca2186743d7f09588
Author: Jeremy Allison <j...@samba.org>
Date:   Fri Sep 23 12:37:52 2016 -0700

    s3: nmbd: Final changeover to stock tevent for nmbd.
    
    Removes unused references to fds array used for (removed)
    poll call. Renames create_listen_pollfds() to
    create_listen_array().
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
    Signed-off-by: Jeremy Allison <j...@samba.org>
    Reviewed-by: Volker Lendecke <v...@samba.org>
    (cherry picked from commit 6e8bd13660d7795df429dbf852345124db38ea96)

commit 4842157242c2ef0639c674a9ee608057e8490374
Author: Jeremy Allison <j...@samba.org>
Date:   Fri Sep 23 12:31:00 2016 -0700

    s3: nmbd: Change over to using tevent functions from direct poll.
    
    This will allow us to eventually remove source3/lib/events.c
    dependency and make nmbd purely tevent based.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
    Signed-off-by: Jeremy Allison <j...@samba.org>
    Reviewed-by: Volker Lendecke <v...@samba.org>
    (cherry picked from commit b857bf9b3fa3a836647edc40ead92db7b782d367)

commit 4cceabe7aa8002aab3dd20a60ea758243acbca2c
Author: Jeremy Allison <j...@samba.org>
Date:   Fri Sep 23 12:22:53 2016 -0700

    s3: nmbd: Add a talloc_stackframe().
    
    We will use this to create real tevent timer and fd
    events.
    
    This will allow us to eventually remove source3/lib/events.c
    dependency and make nmbd purely tevent based.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
    Signed-off-by: Jeremy Allison <j...@samba.org>
    Reviewed-by: Volker Lendecke <v...@samba.org>
    (cherry picked from commit 36b67729a6fc8518da71944db3fac6d9236b9348)

commit 42963c442a6a4073c1e02f9aad65b72cb4d86de6
Author: Jeremy Allison <j...@samba.org>
Date:   Fri Sep 23 12:18:37 2016 -0700

    s3: nmbd: Add (currently unused) timeout and fd handlers.
    
    This will allow us to eventually remove source3/lib/events.c
    dependency and make nmbd purely tevent based.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
    Signed-off-by: Jeremy Allison <j...@samba.org>
    Reviewed-by: Volker Lendecke <v...@samba.org>
    (cherry picked from commit cca25c8f75147873280464eaf2699ff449f609ad)

commit c29076310278f139dfab193b3f46c34a4c6a5c05
Author: Jeremy Allison <j...@samba.org>
Date:   Fri Sep 23 12:16:58 2016 -0700

    s3: nmbd: Now attrs array mirrors fd's array use it in preference.
    
    This will allow us to eventually remove source3/lib/events.c
    dependency and make nmbd purely tevent based.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
    Signed-off-by: Jeremy Allison <j...@samba.org>
    Reviewed-by: Volker Lendecke <v...@samba.org>
    (cherry picked from commit 376e04656b6755d1a182430b39273a93495d00b2)

commit c9dbe8939682b9f461797282a3c0e60b8604b6cf
Author: Jeremy Allison <j...@samba.org>
Date:   Fri Sep 23 12:12:43 2016 -0700

    s3: nmbd: Ensure attrs array mirrors fd's array for dns.
    
    This will allow us to eventually remove source3/lib/events.c
    dependency and make nmbd purely tevent based.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
    Signed-off-by: Jeremy Allison <j...@samba.org>
    Reviewed-by: Volker Lendecke <v...@samba.org>
    (cherry picked from commit 7f0717e751930cd5da029c1852ff9f61f95e40b7)

commit abec724bba5bee3fb120357cb53b87490bdcaf38
Author: Jeremy Allison <j...@samba.org>
Date:   Fri Sep 23 12:05:59 2016 -0700

    s3: nmbd: Add fd, triggered elements to struct socket_attributes.
    
    Zero the attrs array on allocation, and mirror the fd's.
    
    This will allow us to eventually remove source3/lib/events.c
    dependency and make nmbd purely tevent based.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
    Signed-off-by: Jeremy Allison <j...@samba.org>
    Reviewed-by: Volker Lendecke <v...@samba.org>
    (cherry picked from commit d8ade0730797df22bfe28847e034eb6d116b0e00)

commit d0bd672fb6e8fdb67ba031451220c691383f8ac6
Author: Stefan Metzmacher <me...@samba.org>
Date:   Wed Feb 27 09:29:47 2013 +0100

    s3:nmbd: fix talloc_zero_array() check in nmbd_packets.c
    
    Signed-off-by: Stefan Metzmacher <me...@samba.org>
    Reviewed-by: Volker Lendecke <v...@samba.org>
    
    Autobuild-User(master): Volker Lendecke <v...@samba.org>
    Autobuild-Date(master): Fri Sep 23 18:08:21 CEST 2016 on sn-devel-144
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12283
    
    (cherry picked from commit 4470f01605a2f09b054550ee5a8f8d3b4ebc2098)

commit 1e288f558820e232e7e9fcb16bb43e894cb9ee3c
Author: Jeremy Allison <j...@samba.org>
Date:   Thu Oct 13 15:01:58 2016 -0700

    s3: winbind: Ensure we store name2sid with the correct cache sequence 
number.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11259
    
    Signed-off-by: Jeremy Allison <j...@samba.org>
    Reviewed-by: Uri Simchoni <u...@samba.org>
    (cherry picked from commit 9f6fe5e2c54870abfff48c8a9d96e21bfec2425f)

commit 208c13670b690a9f2d81451eb5d23cef30a15312
Author: Jeremy Allison <j...@samba.org>
Date:   Wed Sep 28 11:26:04 2016 -0700

    s3: winbind: Trust name2sid mappings from the PAC.
    
    Don't refresh sequence number in parent as the
    mapping comes from a trusted DC.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11259
    
    Signed-off-by: Jeremy Allison <j...@samba.org>
    Reviewed-by: Günther Deschner <g...@samba.org>
    (cherry picked from commit 1017b22f68e798a080e0738d3beecf008b2284ef)

commit 0e2726e3f7805abf0f5ce875d8baba4b55c7a378
Author: Jeremy Allison <j...@samba.org>
Date:   Wed Sep 28 10:12:36 2016 -0700

    s3: winbind: refresh_sequence_number is only ever called with 'false'.
    
    Remove redundant parameter.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11259
    
    Signed-off-by: Jeremy Allison <j...@samba.org>
    Reviewed-by: Ira Cooper <i...@samba.org>
    Reviewed-by: Guenther Deschner <g...@samba.org>
    (cherry picked from commit 32ae6721cf02412af3c5a82d5da4806f4d931bcd)

commit 38ffca005b6370331c2e70b23b9bf3618eaf6dbf
Author: Jeremy Allison <j...@samba.org>
Date:   Mon Sep 26 17:07:44 2016 -0700

    s3: auth: Use wbcAuthenticateUserEx to prime the caches.
    
    Idea by Volker - use WBC_AUTH_USER_LEVEL_PAC to pass
    the PAC to winbind from smbd on auth, this allows
    winbind to prime the user info via netsamlogon_cache_store()
    and the name2sid cache *before* smbd looks up the user.
    
    Note that as this is merely a cache prime having
    winbind not available is not an error.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11259
    
    Signed-off-by: Jeremy Allison <j...@samba.org>
    Reviewed-by: Günther Deschner <g...@samba.org>
    
    Autobuild-User(master): Jeremy Allison <j...@samba.org>
    Autobuild-Date(master): Wed Sep 28 22:45:27 CEST 2016 on sn-devel-144
    
    (cherry picked from commit ccfba2537d0ea081fbeeee0feecf8e2774850300)

commit 477abfb11eb1e6109dd4f65676ddac23a6f0353a
Author: Jeremy Allison <j...@samba.org>
Date:   Tue Sep 27 15:04:49 2016 -0700

    s3: winbind: Make WBC_AUTH_USER_LEVEL_PAC prime the name2sid cache.
    
    In addition to priming the netsamlogon cache.
    
    This prevents a winbind AD-DC lookup for something
    the PAC already told us.
    
    Note we only do this in the case where the PAC successfully
    passed signature verification.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11259
    
    Signed-off-by: Jeremy Allison <j...@samba.org>
    Reviewed-by: Günther Deschner <g...@samba.org>
    (cherry picked from commit cf0f28819e771d433af00b3532011de70112b1f8)

commit 51c6659c8fa50f5d8f33011222e9565a0dd93b34
Author: Martin Schwenke <mar...@meltin.net>
Date:   Mon Oct 10 13:16:01 2016 +1100

    ctdb-scripts: ctdbd_wrapper should never remove the PID file
    
    kill_ctdbd() kills the daemon and then removes the PID file.  This is
    racy because a new daemon could write a new PID file in between the
    kill and the removal.  Reversing these steps would be an improvement.
    
    However, none of the places where kill_ctdbd() is called is a safe
    place to remove the PID file.  There is always a chance that a new
    daemon could start, write a new PID file and then kill_ctdbd() could
    remove the new PID file.
    
    ctdbd is able to overwrite a stale PID file by checking to see if it
    is locked.
    
    Therefore, entirely drop removal of the PID file from ctdbd_wrapper.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12287
    
    Signed-off-by: Martin Schwenke <mar...@meltin.net>
    Reviewed-by: Volker Lendecke <v...@samba.org>
    (cherry picked from commit 56d526c6ea3150a19dd0762b45d23a7c5f96d260)

-----------------------------------------------------------------------

Summary of changes:
 ctdb/config/ctdbd_wrapper                          |   1 -
 lib/ldb-samba/ldb_matching_rules.c                 | 133 +++++-
 lib/ldb-samba/ldb_matching_rules.h                 |   1 +
 lib/util/msghdr.c                                  |   2 +-
 libcli/cldap/cldap.c                               |   5 +
 python/samba/drs_utils.py                          |   2 +-
 python/samba/join.py                               |   4 +-
 python/samba/kcc/kcc_utils.py                      |  18 +-
 python/samba/netcmd/domain.py                      |  81 ++++
 python/samba/samdb.py                              |  14 +
 python/samba/tests/param.py                        |   6 +
 selftest/knownfail                                 |   1 +
 selftest/target/Samba.pm                           |   1 +
 selftest/target/Samba4.pm                          |  34 +-
 selftest/tests.py                                  |   9 +-
 source3/auth/auth_generic.c                        |  49 ++-
 source3/include/includes.h                         |   4 +-
 source3/include/{event.h => util_event.h}          |  16 +-
 source3/lib/events.c                               | 486 ---------------------
 source3/lib/server_contexts.c                      |   2 +-
 source3/lib/substitute.c                           |  24 +-
 source3/lib/sysquotas.c                            |   5 +-
 source3/lib/util_event.c                           | 101 +++++
 source3/libads/cldap.c                             |  17 +-
 source3/libads/sasl.c                              |  11 -
 source3/libsmb/cli_smb2_fnum.c                     |   2 +-
 source3/libsmb/cliquota.c                          |  18 +-
 source3/modules/vfs_glusterfs.c                    |   4 +-
 source3/nmbd/nmbd_packets.c                        | 162 ++++---
 source3/printing/nt_printing_migrate.c             |  27 ++
 source3/rpc_server/rpc_ncacn_np.c                  |   8 +-
 source3/rpc_server/spoolss/srv_spoolss_nt.c        |   4 +-
 source3/smbd/ntquotas.c                            |   6 +-
 source3/smbd/process.c                             |   4 +-
 source3/smbd/server.c                              |   1 -
 source3/smbd/smb2_ioctl_filesys.c                  |  29 +-
 source3/utils/smbcquotas.c                         |  21 +-
 source3/winbindd/idmap_ad.c                        |  11 +-
 source3/winbindd/wb_sids2xids.c                    |   2 +-
 source3/winbindd/winbindd_cache.c                  |  62 ++-
 source3/winbindd/winbindd_dual.c                   |   5 +-
 source3/winbindd/winbindd_pam.c                    |  35 +-
 source3/winbindd/winbindd_proto.h                  |   5 +
 source3/winbindd/winbindd_util.c                   |   5 +-
 source3/wscript_build                              |   2 +-
 source4/dsdb/common/util.h                         |  10 +
 source4/dsdb/kcc/garbage_collect_tombstones.c      | 344 +++++++++++++++
 .../kcc/garbage_collect_tombstones.h}              |  32 +-
 source4/dsdb/kcc/kcc_deleted.c                     | 146 -------
 source4/dsdb/kcc/kcc_periodic.c                    |  58 ++-
 source4/dsdb/kcc/kcc_service.c                     |   5 +-
 source4/dsdb/kcc/kcc_service.h                     |  13 +-
 source4/dsdb/pydsdb.c                              | 108 ++++-
 source4/dsdb/samdb/ldb_modules/repl_meta_data.c    |  34 +-
 source4/dsdb/tests/python/linked_attributes.py     |  48 +-
 source4/dsdb/wscript_build                         |  10 +-
 source4/heimdal/lib/krb5/mcache.c                  |  52 ++-
 source4/param/pyparam.c                            |   9 +
 source4/scripting/bin/samba_spnupdate              |   2 +-
 .../release-4-5-0-pre1/add-four-more-links.ldif    |  15 +
 .../release-4-5-0-pre1/add-two-more-users.ldif     |  15 +
 .../expected-deleted-links-after-expunge.ldif      |  23 +
 .../release-4-5-0-pre1/expected-expunge-output.txt |   1 +
 .../expected-links-after-dbcheck.ldif              | 217 +++++++++
 .../expected-links-after-expunge.ldif              |  22 +
 .../expected-match-rule-links.ldif                 |  47 ++
 .../expected-objects-after-expunge.ldif            |   2 +
 .../release-4-5-0-pre1/remove-one-more-link.ldif   |   5 +
 .../release-4-5-0-pre1/remove-one-more-user.ldif   |   3 +
 .../release-4-5-0-pre1/rootdse-version.final.txt   |   1 +
 .../release-4-5-0-pre1/rootdse-version.initial.txt |   1 +
 source4/selftest/tests.py                          |   7 +
 source4/setup/schema_samba4.ldif                   |   1 +
 .../torture/drs/python/linked_attributes_drs.py    |   2 +-
 source4/torture/smb2/ioctl.c                       |  76 ++++
 testprogs/blackbox/dbcheck-oldrelease.sh           |  18 +-
 testprogs/blackbox/{nsstest.sh => dom_parse.sh}    |  13 +-
 testprogs/blackbox/tombstones-expunge.sh           | 206 +++++++++
 78 files changed, 2098 insertions(+), 888 deletions(-)
 rename source3/include/{event.h => util_event.h} (64%)
 delete mode 100644 source3/lib/events.c
 create mode 100644 source3/lib/util_event.c
 create mode 100644 source4/dsdb/kcc/garbage_collect_tombstones.c
 copy source4/{param/pyparam.h => dsdb/kcc/garbage_collect_tombstones.h} (61%)
 delete mode 100644 source4/dsdb/kcc/kcc_deleted.c
 create mode 100644 
source4/selftest/provisions/release-4-5-0-pre1/add-four-more-links.ldif
 create mode 100644 
source4/selftest/provisions/release-4-5-0-pre1/add-two-more-users.ldif
 create mode 100644 
source4/selftest/provisions/release-4-5-0-pre1/expected-deleted-links-after-expunge.ldif
 create mode 100644 
source4/selftest/provisions/release-4-5-0-pre1/expected-expunge-output.txt
 create mode 100644 
source4/selftest/provisions/release-4-5-0-pre1/expected-links-after-expunge.ldif
 create mode 100644 
source4/selftest/provisions/release-4-5-0-pre1/expected-match-rule-links.ldif
 create mode 100644 
source4/selftest/provisions/release-4-5-0-pre1/expected-objects-after-expunge.ldif
 create mode 100644 
source4/selftest/provisions/release-4-5-0-pre1/remove-one-more-link.ldif
 create mode 100644 
source4/selftest/provisions/release-4-5-0-pre1/remove-one-more-user.ldif
 create mode 100644 
source4/selftest/provisions/release-4-5-0-pre1/rootdse-version.final.txt
 create mode 100644 
source4/selftest/provisions/release-4-5-0-pre1/rootdse-version.initial.txt
 copy testprogs/blackbox/{nsstest.sh => dom_parse.sh} (56%)
 create mode 100755 testprogs/blackbox/tombstones-expunge.sh


Changeset truncated at 500 lines:

diff --git a/ctdb/config/ctdbd_wrapper b/ctdb/config/ctdbd_wrapper
index cdf0304..bfc91f7 100755
--- a/ctdb/config/ctdbd_wrapper
+++ b/ctdb/config/ctdbd_wrapper
@@ -185,7 +185,6 @@ kill_ctdbd ()
 
     if [ -n "$_session" ] ; then
        pkill -9 -s "$_session" 2>/dev/null
-       rm -f "$pidfile"
     fi
 }
 
diff --git a/lib/ldb-samba/ldb_matching_rules.c 
b/lib/ldb-samba/ldb_matching_rules.c
index 637858f..aa86979 100644
--- a/lib/ldb-samba/ldb_matching_rules.c
+++ b/lib/ldb-samba/ldb_matching_rules.c
@@ -4,6 +4,7 @@
    ldb database library - Extended match rules
 
    Copyright (C) 2014 Samuel Cabrero <samuelcabr...@kernevil.me>
+   Copyright (C) Andrew Bartlett <abart...@samba.org>
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -23,6 +24,8 @@
 #include <ldb_module.h>
 #include "dsdb/samdb/samdb.h"
 #include "ldb_matching_rules.h"
+#include "libcli/security/security.h"
+#include "dsdb/common/util.h"
 
 static int ldb_eval_transitive_filter_helper(TALLOC_CTX *mem_ctx,
                                             struct ldb_context *ldb,
@@ -324,9 +327,128 @@ static int ldb_comparator_trans(struct ldb_context *ldb,
 }
 
 
+/*
+ * This rule provides match of a link attribute against a 'should be expunged' 
criteria
+ *
+ * This allows a search filter such as:
+ *
+ * member:1.3.6.1.4.1.7165.4.5.2:=131139216000000000
+ *
+ * This searches the member attribute, but also any member attributes
+ * that are deleted and should be expunged after the specified NTTIME
+ * time.
+ *
+ */
+static int dsdb_match_for_expunge(struct ldb_context *ldb,
+                                 const char *oid,
+                                 const struct ldb_message *msg,
+                                 const char *attribute_to_match,
+                                 const struct ldb_val *value_to_match,
+                                 bool *matched)
+{
+       const struct dsdb_schema *schema;
+       const struct dsdb_attribute *schema_attr;
+       TALLOC_CTX *tmp_ctx;
+       unsigned int i;
+       struct ldb_message_element *el;
+       struct auth_session_info *session_info;
+       uint64_t tombstone_time;
+       *matched = false;
+
+       el = ldb_msg_find_element(msg, attribute_to_match);
+       if (el == NULL) {
+               return LDB_SUCCESS;
+       }
+
+       session_info
+               = talloc_get_type(ldb_get_opaque(ldb, "sessionInfo"),
+                                 struct auth_session_info);
+       if (security_session_user_level(session_info, NULL) != SECURITY_SYSTEM) 
{
+               return LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS;
+       }
+
+       /*
+        * If the target attribute to match is not a linked attribute, then
+        * the filter evaluates to undefined
+        */
+       schema = dsdb_get_schema(ldb, NULL);
+       if (schema == NULL) {
+               return LDB_ERR_OPERATIONS_ERROR;
+       }
+
+       /* TODO this is O(log n) per attribute */
+       schema_attr = dsdb_attribute_by_lDAPDisplayName(schema, 
attribute_to_match);
+       if (schema_attr == NULL) {
+               return LDB_ERR_NO_SUCH_ATTRIBUTE;
+       }
+
+       /*
+        * This extended match filter is only valid for forward linked 
attributes.
+        */
+       if (schema_attr->linkID == 0 || (schema_attr->linkID & 1) == 1) {
+               return LDB_ERR_NO_SUCH_ATTRIBUTE;
+       }
+
+       /* Just check we don't allow the caller to fill our stack */
+       if (value_to_match->length >=64) {
+               return LDB_ERR_INVALID_ATTRIBUTE_SYNTAX;
+       } else {
+               char *p = NULL;
+               char s[value_to_match->length+1];
+               memcpy(s, value_to_match->data, value_to_match->length);
+               s[value_to_match->length] = 0;
+               if (s[0] == '\0' || s[0] == '-') {
+                       return LDB_ERR_INVALID_ATTRIBUTE_SYNTAX;
+               }
+               tombstone_time = strtoull(s, &p, 10);
+               if (p == NULL || p == s || *p != '\0' || tombstone_time == 
ULLONG_MAX) {
+                       return LDB_ERR_INVALID_ATTRIBUTE_SYNTAX;
+               }
+       }
+
+       tmp_ctx = talloc_new(ldb);
+       if (tmp_ctx == NULL) {
+               return LDB_ERR_OPERATIONS_ERROR;
+       }
+
+       for (i = 0; i < el->num_values; i++) {
+               NTSTATUS status;
+               struct dsdb_dn *dn;
+               uint64_t rmd_changetime;
+               if (dsdb_dn_is_deleted_val(&el->values[i]) == false) {
+                       continue;
+               }
+
+               dn = dsdb_dn_parse(tmp_ctx, ldb, &el->values[i],
+                                  schema_attr->syntax->ldap_oid);
+               if (dn == NULL) {
+                       DEBUG(1, ("Error: Failed to parse linked attribute blob 
of %s.\n", el->name));
+                       continue;
+               }
+
+               status = dsdb_get_extended_dn_uint64(dn->dn, &rmd_changetime,
+                                                    "RMD_CHANGETIME");
+               if (!NT_STATUS_IS_OK(status)) {
+                       DEBUG(1, ("Error: RMD_CHANGETIME is missing on a 
forward link.\n"));
+                       continue;
+               }
+
+               if (rmd_changetime > tombstone_time) {
+                       continue;
+               }
+
+               *matched = true;
+               break;
+       }
+       talloc_free(tmp_ctx);
+       return LDB_SUCCESS;
+}
+
+
 int ldb_register_samba_matching_rules(struct ldb_context *ldb)
 {
-       struct ldb_extended_match_rule *transitive_eval;
+       struct ldb_extended_match_rule *transitive_eval = NULL,
+               *match_for_expunge = NULL;
        int ret;
 
        transitive_eval = talloc_zero(ldb, struct ldb_extended_match_rule);
@@ -338,5 +460,14 @@ int ldb_register_samba_matching_rules(struct ldb_context 
*ldb)
                return ret;
        }
 
+       match_for_expunge = talloc_zero(ldb, struct ldb_extended_match_rule);
+       match_for_expunge->oid = DSDB_MATCH_FOR_EXPUNGE;
+       match_for_expunge->callback = dsdb_match_for_expunge;
+       ret = ldb_register_extended_match_rule(ldb, match_for_expunge);
+       if (ret != LDB_SUCCESS) {
+               talloc_free(match_for_expunge);
+               return ret;
+       }
+
        return LDB_SUCCESS;
 }
diff --git a/lib/ldb-samba/ldb_matching_rules.h 
b/lib/ldb-samba/ldb_matching_rules.h
index e969b3d..421e1ce 100644
--- a/lib/ldb-samba/ldb_matching_rules.h
+++ b/lib/ldb-samba/ldb_matching_rules.h
@@ -24,5 +24,6 @@
 
 /* This rule provides recursive search of a link attribute */
 #define SAMBA_LDAP_MATCH_RULE_TRANSITIVE_EVAL  "1.2.840.113556.1.4.1941"
+#define DSDB_MATCH_FOR_EXPUNGE "1.3.6.1.4.1.7165.4.5.2"
 
 #endif /* _LDB_MATCHING_RULES_H_ */
diff --git a/lib/util/msghdr.c b/lib/util/msghdr.c
index 0100b33..4b88c1a 100644
--- a/lib/util/msghdr.c
+++ b/lib/util/msghdr.c
@@ -205,7 +205,7 @@ ssize_t msghdr_copy(struct msghdr_buf *msg, size_t msgsize,
                msgsize - offsetof(struct msghdr_buf, buf) : 0;
 
        if (msg != NULL) {
-               msg->msg = (struct msghdr) {};
+               msg->msg = (struct msghdr) { 0 };
 
                fd_len = msghdr_prep_fds(&msg->msg, msg->buf, bufsize,
                                         fds, num_fds);
diff --git a/libcli/cldap/cldap.c b/libcli/cldap/cldap.c
index c5977cc..87f82b9 100644
--- a/libcli/cldap/cldap.c
+++ b/libcli/cldap/cldap.c
@@ -585,6 +585,11 @@ struct tevent_req *cldap_search_send(TALLOC_CTX *mem_ctx,
 
        talloc_set_destructor(state, cldap_search_state_destructor);
 
+       if (state->caller.cldap == NULL) {
+               tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
+               goto post;
+       }
+
        if (io->in.dest_address) {
                if (cldap->connected) {
                        tevent_req_nterror(req, NT_STATUS_PIPE_CONNECTED);
diff --git a/python/samba/drs_utils.py b/python/samba/drs_utils.py
index 6c8afae..07fc05a 100644
--- a/python/samba/drs_utils.py
+++ b/python/samba/drs_utils.py
@@ -44,7 +44,7 @@ def drsuapi_connect(server, lp, creds):
     """
 
     binding_options = "seal"
-    if int(lp.get("log level")) >= 5:
+    if lp.log_level() >= 5:
         binding_options += ",print"
     binding_string = "ncacn_ip_tcp:%s[%s]" % (server, binding_options)
     try:
diff --git a/python/samba/join.py b/python/samba/join.py
index d1a1b08..a50a409 100644
--- a/python/samba/join.py
+++ b/python/samba/join.py
@@ -402,7 +402,7 @@ class dc_join(object):
     def drsuapi_connect(ctx):
         '''make a DRSUAPI connection to the naming master'''
         binding_options = "seal"
-        if int(ctx.lp.get("log level")) >= 4:
+        if ctx.lp.log_level() >= 4:
             binding_options += ",print"
         binding_string = "ncacn_ip_tcp:%s[%s]" % (ctx.server, binding_options)
         ctx.drsuapi = drsuapi.drsuapi(binding_string, ctx.lp, ctx.creds)
@@ -868,7 +868,7 @@ class dc_join(object):
                 repl_creds = ctx.creds
 
             binding_options = "seal"
-            if int(ctx.lp.get("log level")) >= 5:
+            if ctx.lp.log_level() >= 5:
                 binding_options += ",print"
             repl = drs_utils.drs_Replicate(
                 "ncacn_ip_tcp:%s[%s]" % (ctx.server, binding_options),
diff --git a/python/samba/kcc/kcc_utils.py b/python/samba/kcc/kcc_utils.py
index 2c3e322..1d4b9d6 100644
--- a/python/samba/kcc/kcc_utils.py
+++ b/python/samba/kcc/kcc_utils.py
@@ -1214,11 +1214,19 @@ class NTDSConnection(object):
 
         :param shed: schedule to compare to
         """
-        if self.schedule is not None:
-            if sched is None:
-                return False
-        elif sched is None:
-            return True
+        # There are 4 cases, where either self.schedule or sched can be None
+        #
+        #                   |  self. is None  |   self. is not None
+        #     --------------+-----------------+--------------------
+        #     sched is None |     True        |     False
+        #     --------------+-----------------+--------------------
+        # sched is not None |    False        |    do calculations
+
+        if self.schedule is None:
+            return sched is None
+
+        if sched is None:
+            return False
 
         if ((self.schedule.size != sched.size or
              self.schedule.bandwidth != sched.bandwidth or
diff --git a/python/samba/netcmd/domain.py b/python/samba/netcmd/domain.py
index fd26d93..cfdd9a4 100644
--- a/python/samba/netcmd/domain.py
+++ b/python/samba/netcmd/domain.py
@@ -32,6 +32,7 @@ import random
 import tempfile
 import logging
 import subprocess
+import time
 from getpass import getpass
 from samba.net import Net, LIBNET_JOIN_AUTOMATIC
 import samba.ntacls
@@ -3747,6 +3748,79 @@ class cmd_domain_trust_namespaces(DomainTrustCommand):
                                      tln=local_tdo_info.domain_name.string)
         return
 
+class cmd_domain_tombstones_expunge(Command):
+    """Expunge tombstones from the database.
+
+This command expunges tombstones from the database."""
+    synopsis = "%prog NC [NC [...]] [options]"
+
+    takes_options = [
+        Option("-H", "--URL", help="LDB URL for database or target server", 
type=str,
+                metavar="URL", dest="H"),
+        Option("--current-time",
+                help="The current time to evaluate the tombstone lifetime 
from, expressed as YYYY-MM-DD",
+                type=str),
+        Option("--tombstone-lifetime", help="Number of days a tombstone should 
be preserved for", type=int),
+    ]
+
+    takes_args = ["nc*"]
+
+    takes_optiongroups = {
+        "sambaopts": options.SambaOptions,
+        "credopts": options.CredentialsOptions,
+        "versionopts": options.VersionOptions,
+        }
+
+    def run(self, *ncs, **kwargs):
+        sambaopts = kwargs.get("sambaopts")
+        credopts = kwargs.get("credopts")
+        versionpts = kwargs.get("versionopts")
+        H = kwargs.get("H")
+        current_time_string = kwargs.get("current_time")
+        tombstone_lifetime = kwargs.get("tombstone_lifetime")
+        lp = sambaopts.get_loadparm()
+        creds = credopts.get_credentials(lp)
+        samdb = SamDB(url=H, session_info=system_session(),
+                      credentials=creds, lp=lp)
+
+        if current_time_string is not None:
+            current_time_obj = time.strptime(current_time_string, "%Y-%m-%d")
+            current_time = long(time.mktime(current_time_obj))
+
+        else:
+            current_time = long(time.time())
+
+        if len(ncs) == 0:
+            res = samdb.search(expression="", base="", scope=ldb.SCOPE_BASE,
+                         attrs=["namingContexts"])
+
+            ncs = []
+            for nc in res[0]["namingContexts"]:
+                ncs.append(str(nc))
+        else:
+            ncs = list(ncs)
+
+        started_transaction = False
+        try:
+            samdb.transaction_start()
+            started_transaction = True
+            (removed_objects,
+             removed_links) = samdb.garbage_collect_tombstones(ncs,
+                                                               
current_time=current_time,
+                                                               
tombstone_lifetime=tombstone_lifetime)
+
+        except Exception, err:
+            if started_transaction:
+                samdb.transaction_cancel()
+            raise CommandError("Failed to expunge / garbage collect 
tombstones", err)
+
+        samdb.transaction_commit()
+
+        self.outf.write("Removed %d objects and %d links successfully\n"
+                        % (removed_objects, removed_links))
+
+
+
 class cmd_domain_trust(SuperCommand):
     """Domain and forest trust management."""
 
@@ -3758,6 +3832,12 @@ class cmd_domain_trust(SuperCommand):
     subcommands["validate"] = cmd_domain_trust_validate()
     subcommands["namespaces"] = cmd_domain_trust_namespaces()
 
+class cmd_domain_tombstones(SuperCommand):
+    """Domain tombstone and recycled object management."""
+
+    subcommands = {}
+    subcommands["expunge"] = cmd_domain_tombstones_expunge()
+
 class cmd_domain(SuperCommand):
     """Domain management."""
 
@@ -3774,3 +3854,4 @@ class cmd_domain(SuperCommand):
     subcommands["classicupgrade"] = cmd_domain_classicupgrade()
     subcommands["samba3upgrade"] = cmd_domain_samba3upgrade()
     subcommands["trust"] = cmd_domain_trust()
+    subcommands["tombstones"] = cmd_domain_tombstones()
diff --git a/python/samba/samdb.py b/python/samba/samdb.py
index e12465d..3d7ea3e 100644
--- a/python/samba/samdb.py
+++ b/python/samba/samdb.py
@@ -949,3 +949,17 @@ accountExpires: %u
         is removed, this routine will put a tombstone in the record.
         '''
         return dsdb_dns.replace_by_dn(self, dn, new_records)
+
+    def garbage_collect_tombstones(self, dn, current_time,
+                                   tombstone_lifetime=None):
+        '''garbage_collect_tombstones(lp, samdb, [dn], current_time, 
tombstone_lifetime)
+        -> (num_objects_expunged, num_links_expunged)'''
+
+
+        if tombstone_lifetime is None:
+            return dsdb._dsdb_garbage_collect_tombstones(self, dn,
+                                                         current_time)
+        else:
+            return dsdb._dsdb_garbage_collect_tombstones(self, dn,
+                                                         current_time,
+                                                         tombstone_lifetime)
diff --git a/python/samba/tests/param.py b/python/samba/tests/param.py
index f539eba..684c17c 100644
--- a/python/samba/tests/param.py
+++ b/python/samba/tests/param.py
@@ -55,3 +55,9 @@ class LoadParmTestCase(samba.tests.TestCase):
         samba_lp = param.LoadParm()
         samba_lp.load_default()
         self.assertRaises(KeyError, samba_lp.__getitem__, "nonexistent")
+
+    def test_log_level(self):
+        samba_lp = param.LoadParm()
+        samba_lp.set("log level", "5 auth:4")
+        self.assertEquals(5, samba_lp.log_level())
+
diff --git a/selftest/knownfail b/selftest/knownfail
index 3b28589..c1899da 100644
--- a/selftest/knownfail
+++ b/selftest/knownfail
@@ -174,6 +174,7 @@
 ^samba3.smb2.replay.replay3
 ^samba3.smb2.replay.replay4
 ^samba3.smb2.lock.*replay
+^samba4.smb2.ioctl.compress_notsup.*\(ad_dc_ntvfs\)
 ^samba3.raw.session.*reauth2 # maybe fix this?
 ^samba3.rpc.lsa.secrets.seal # This gives NT_STATUS_LOCAL_USER_SESSION_KEY
 ^samba3.rpc.samr.passwords.badpwdcount.samr.badPwdCount\(nt4_dc\) # We fail 
this test currently
diff --git a/selftest/target/Samba.pm b/selftest/target/Samba.pm
index 69b956d..a8f3a9b 100644
--- a/selftest/target/Samba.pm
+++ b/selftest/target/Samba.pm
@@ -300,6 +300,7 @@ sub get_interface($)
     $interfaces{"fileserver"} = 35;
     $interfaces{"fakednsforwarder1"} = 36;
     $interfaces{"fakednsforwarder2"} = 37;
+    $interfaces{"s4member_dflt"} = 38;
 
     # update lib/socket_wrapper/socket_wrapper.c
     #  #define MAX_WRAPPED_INTERFACES 40
diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index ed88ac5..f1de4b9 100755
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -954,9 +954,9 @@ $extra_smbconf_shares
        return $self->provision_raw_step2($ctx, $ret);
 }
 
-sub provision_s4member($$$)
+sub provision_s4member($$$$$)
 {
-       my ($self, $prefix, $dcvars) = @_;
+       my ($self, $prefix, $dcvars, $hostname, $more_conf) = @_;
        print "PROVISIONING MEMBER...\n";
        my $extra_smb_conf = "
         passdb backend = samba_dsdb
@@ -975,9 +975,12 @@ rpc_server:spoolss = embedded
 rpc_daemon:spoolssd = embedded
 rpc_server:tcpip = no
 ";
+       if ($more_conf) {
+               $extra_smb_conf = $extra_smb_conf . $more_conf . "\n";
+       }
        my $ret = $self->provision($prefix,
                                   "member server",
-                                  "s4member",
+                                  $hostname,
                                   "SAMBADOMAIN",
                                   "samba.example.com",
                                   "2008",
@@ -1967,6 +1970,11 @@ sub setup_env($$$)
                        $self->setup_ad_dc_ntvfs("$path/ad_dc_ntvfs");
                }
                return $self->setup_subdom_dc("$path/subdom_dc", 
$self->{vars}->{ad_dc_ntvfs});
+       } elsif ($envname eq "s4member_dflt_domain") {
+               if (not defined($self->{vars}->{ad_dc_ntvfs})) {
+                       $self->setup_ad_dc_ntvfs("$path/ad_dc_ntvfs");
+               }
+               return 
$self->setup_s4member_dflt_domain("$path/s4member_dflt_domain", 
$self->{vars}->{ad_dc_ntvfs});
        } elsif ($envname eq "s4member") {
                if (not defined($self->{vars}->{ad_dc_ntvfs})) {
                        $self->setup_ad_dc_ntvfs("$path/ad_dc_ntvfs");
@@ -2005,7 +2013,7 @@ sub setup_s4member($$$)
 {
        my ($self, $path, $dc_vars) = @_;
 
-       my $env = $self->provision_s4member($path, $dc_vars);
+       my $env = $self->provision_s4member($path, $dc_vars, "s4member");


-- 
Samba Shared Repository

Reply via email to