[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha6

Jelmer Vernooij jelmer at samba.org
Mon Jan 19 23:16:56 GMT 2009


The branch, v4-0-test has been updated
       via  0118b2301b29af0f22845c7e3ebb5df74ba13aeb (commit)
       via  b876478219b4935013a798962b95596cc45d7c9b (commit)
       via  2254efbf5d34cffbb8b21e8ef3cec06786081a06 (commit)
       via  288ce60748576a64efd5d3a3897fae1110379565 (commit)
       via  c570d6396f238cbe39af3a5de98157a2c608ec9b (commit)
       via  4feafd7c7be947bb38856dee79f057b2671151f3 (commit)
       via  535311d1875a4302a1c42d92046d2cdc8d3ef4ef (commit)
       via  a83b327f1bec10f18ebe59c2fde7fe74228149f2 (commit)
       via  aa79f76b0cfcf402bdf955cdf8356d619ace0b68 (commit)
       via  e58a8c169cd075ca900a2a144d7b5387460bbf05 (commit)
       via  b0c92548d8a0ec628e61364da04ea239cf297fc7 (commit)
       via  4b26c7bbf4fe93f5ffb92d3f04012be290be25be (commit)
       via  7c1e08518bfbe054db270e72476c642d5db93c0a (commit)
       via  afd405dd90561b6aa99b4c9e5b62644659b96768 (commit)
       via  2973af51110ebefda71b01a7292aa27cdf58aaf9 (commit)
       via  2dcac3c5e6ab19d0d274c09eb47c4fddf82b7a2c (commit)
       via  6bcd2cbd27cc62e5cfc5a4707b7a991ab691f3c8 (commit)
       via  d5b7240ac510fc3d1a7033b22a3a59b1450103aa (commit)
       via  7c7bdf3669f55b7bd3e2ff138af8f57bcc6596ee (commit)
       via  e1c968afd85c229490f1e6c13da94a6ef824b122 (commit)
       via  fb64b12be5c347645976f8000a79f2d31c9a5c79 (commit)
       via  81a2a43a5a3c13d08ed458d861d47f63a15ceac9 (commit)
       via  bbe4785f342d6513fd001fdde94a945b2f2b654a (commit)
       via  c4402e3fde823a1984cc10f390d09c0ef9c8af0d (commit)
       via  780bc13736f264435ba9af6dda84235ea217d526 (commit)
       via  cd5e43b32761daea36187f28a72795f7696ea546 (commit)
       via  a5b3975cf71f0bf114832c958ba855646c69832c (commit)
       via  ebab6d6ce40ec4d64126964c0223aa2bdef99094 (commit)
       via  26c48098e6c387cc76b123a78d50f23518d734cf (commit)
       via  c97df0d892d71462dfd631cf5e93f04641afaab3 (commit)
       via  65f096c8cda9efd6cffb29b52cac610664bbfbc2 (commit)
       via  9598d775a5c1c26b502171737d00084f074e16f8 (commit)
       via  6d107fff13ad42828085ce368dc6e02e24f87713 (commit)
       via  bbd74f2f760184b88341f35f2769b91480e8eb9d (commit)
       via  4a878115a70851ba77bc984c4313e95a608c5764 (commit)
       via  1ffcebbf0f912f4ccbff76f05280f7ed98d5e5ea (commit)
       via  462e4d0cef822d90d982cfb0b38dd60015929bcc (commit)
       via  384b9f709a16085e48469484a564ce0a7128af13 (commit)
       via  ee8f481d9422dff239a871d363da879a5776f7d9 (commit)
       via  bae593bb118459c1b0d12d02e58ba6c89400aa97 (commit)
       via  996790719066d92f563bf53fe4222d2b5e3863a5 (commit)
       via  9d4f766ae35176b0597dd359d692e4166c2314fc (commit)
       via  3b91640fbb16b5ab248d2fa4d2832f61dac29944 (commit)
       via  d6e801b7d9a666d40f109df20dff0faaa2b46e70 (commit)
       via  9fa6fb3d9fb2e4cee81ad34d6fd0cbe6f5265171 (commit)
       via  b4551bba07017c852d64524e3324223b9b0f05c9 (commit)
       via  b7cafb98429f45e2aad10e683618da4626da5c84 (commit)
       via  fe9dd8710d577478b324d1d507de0ecd77df2ea5 (commit)
       via  eaec86514896762aff23f30aca2b944ce07bf7c9 (commit)
       via  a9542ddcb77f0296cb835d0ae337dc54418c1bf4 (commit)
       via  6ffe233f9442792a0e8e52167a01b76eabd83be9 (commit)
       via  0dbd3968626445b4dcb00307e45206b37dd0e8ad (commit)
       via  bfbb0fb17f4eedb8f22d0694c5d4a3b82dfe189b (commit)
       via  c45b6ec29a5b3a39b83209e970b645e5ed0a411c (commit)
       via  a158ebbe49d431259f002ae8272c39e5792adf4f (commit)
       via  28c35b4c0456ce62bf1a492ad9c1b223e2f31816 (commit)
       via  ecb5184ce57259c709d728ed5f7be1bdf666bbcc (commit)
       via  3f9f188877de8a4c0b2883e2360f2834c41b66c1 (commit)
       via  396ed3b36359367e1efd49395cd9e6dc6f7c98fc (commit)
       via  8a1c6c2c994b2eac05e8cbc3c692d7367b687d32 (commit)
       via  c655f19e1fa3a1443fd16927d37035a4f4cf46aa (commit)
       via  f96335afc0602e5874e11c505a4087e32873060e (commit)
       via  f6740aa7ad1b553410ffbc9fb54916d6a385a753 (commit)
       via  761d164420dc4d16e8a0a937146e359130979df9 (commit)
       via  5e6f3eaae9435b1ab7b36726e7b898d4994fcebf (commit)
       via  5987c8269779ca2a7207c37a94b0e841a380d7d1 (commit)
       via  6d47418bc1f3de56e8ed78f2e908eb634230fee9 (commit)
       via  173d6c84a68691f8bc00749509b8e3665bc159ee (commit)
       via  5d71fe8043799abf098131fd924c35b49111bf54 (commit)
       via  30413f12b97149cde7aacfc8e7f2d9b63fa9da5c (commit)
       via  8b618d0ba997a9b2254ae2ea530a80dd14631d59 (commit)
       via  44ae09b82e509db390ad4e884ae3310a3508cf46 (commit)
       via  4a40857836ef2678d2e55c2b1cc9745b88812c4e (commit)
       via  142b2a61f8a77b3065ce4c78b459ab714d6d190a (commit)
       via  6d300399b52e0921ce205ef2f053b722b21edeeb (commit)
       via  9b3c38f4afe2b15159c8659b5916740493f7b60c (commit)
       via  c6b4f3526a262b22d5a97a3152f378778a497a26 (commit)
       via  1c77c7f3d5b6cb29fac4606299c237c0e299f836 (commit)
       via  5cf9989a70a23e5b955b7229fa95d3e604b1883d (commit)
       via  3fe974c4feed33187294a0cb922c20f7dbfeaf43 (commit)
       via  d03133e696aea45e0843f4d72d2d1449366ac4e2 (commit)
       via  fb904194c9f696b72d862e51e7ba688decdda192 (commit)
       via  073e9f42f0c5f5de5d736ec7843d80a274c891ce (commit)
       via  57f978d1712943f6c93e914e52a12a4cfb73aadd (commit)
      from  0bb7ccd0b0d245f87aaab71f3deaee49df9c27c7 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test


- Log -----------------------------------------------------------------
commit 0118b2301b29af0f22845c7e3ebb5df74ba13aeb
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Mon Jan 19 22:52:26 2009 +0100

    Don't use TMPDIR as variable, it's already used for other purposes.
    Don't include GIT revision in release version strings.

commit b876478219b4935013a798962b95596cc45d7c9b
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Mon Jan 19 21:14:37 2009 +0100

    Make sure server_role gets initialized in backend provisioning code -
    fixes test.

commit 2254efbf5d34cffbb8b21e8ef3cec06786081a06
Merge: c570d6396f238cbe39af3a5de98157a2c608ec9b 288ce60748576a64efd5d3a3897fae1110379565
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Mon Jan 19 20:17:23 2009 +0100

    Merge branch 'v4-0-stable'

commit 288ce60748576a64efd5d3a3897fae1110379565
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Mon Jan 19 19:24:54 2009 +0100

    Add some more entries to WHATSNEW, by no means complete.

commit c570d6396f238cbe39af3a5de98157a2c608ec9b
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Mon Jan 19 18:15:45 2009 +0100

    Remove mention of external heimdal - its not yet supported.

commit 4feafd7c7be947bb38856dee79f057b2671151f3
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Dec 16 21:14:36 2008 +0100

    s3:idmap_tdb: convert to the dbwrap api
    
    metze

commit 535311d1875a4302a1c42d92046d2cdc8d3ef4ef
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Dec 17 08:53:31 2008 +0100

    s3:dbwrap: add dbwrap_delete(), dbwrap_store() and dbwrap_fetch()
    
    The _bystring function are now just tiny wrappers.
    
    metze

commit a83b327f1bec10f18ebe59c2fde7fe74228149f2
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Dec 17 08:35:35 2008 +0100

    s3:dbwrap: add get_flags() hook to db_context
    
    metze

commit aa79f76b0cfcf402bdf955cdf8356d619ace0b68
Author: Andreas Schneider <anschneider at suse.de>
Date:   Mon Jan 19 16:26:07 2009 +0100

    Avoid flooding of syslog with failing pam_putenv messages.
    
    Signed-off-by: Andreas Schneider <anschneider at suse.de>
    Signed-off-by: Günther Deschner <gd at samba.org>

commit e58a8c169cd075ca900a2a144d7b5387460bbf05
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Jan 19 11:47:29 2009 +0100

    Fix the same bug as 8b618d0 fixes, this time in winbindd_passdb.c

commit b0c92548d8a0ec628e61364da04ea239cf297fc7
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Jan 19 11:39:24 2009 +0100

    Attempt to fix the merged build

commit 4b26c7bbf4fe93f5ffb92d3f04012be290be25be
Author: Karolin Seeger <kseeger at samba.org>
Date:   Mon Jan 19 10:22:46 2009 +0100

    S3-ByExample: Use 'winbindd -D' instead of 'winbindd -B'.
    
    The option '-B' does not exist at all.
    
    Thanks to Jason Ellison for reporting!
    
    Karolin

commit 7c1e08518bfbe054db270e72476c642d5db93c0a
Author: Karolin Seeger <kseeger at samba.org>
Date:   Mon Jan 19 08:55:30 2009 +0100

    S3-HowTo: Change 'winbindd -B' to 'winbindd -D'.
    
    There is no option '-B' at all.
    
    Thanks to Jason Ellison for reporting!
    
    Karolin

commit afd405dd90561b6aa99b4c9e5b62644659b96768
Author: Stefan Metzmacher <metze at sernet.de>
Date:   Wed Jun 18 16:24:51 2008 +0200

    nbt_server/wins: winsdb_handle() can be static
    
    metze
    (from samba4wins tree ba45b14b48f62eb1668509738f83fa17a4ce95fd)

commit 2973af51110ebefda71b01a7292aa27cdf58aaf9
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Jan 17 11:50:52 2009 +0100

    nbt_server/wins: add some const
    
    metze
    (from samba4wins tree e54b2d3ddbf338fe5d9802724e76f320fd4423e5)

commit 2dcac3c5e6ab19d0d274c09eb47c4fddf82b7a2c
Author: Stefan Metzmacher <metze at sernet.de>
Date:   Wed Jun 18 16:22:39 2008 +0200

    nbt_server/wins: use talloc_zero() to create struct winsdb_handle
    
    metze
    (from samba4wins tree 0f2995f77ab092d71e539c2473c94956f9c253fb)

commit 6bcd2cbd27cc62e5cfc5a4707b7a991ab691f3c8
Author: Stefan Metzmacher <metze at sernet.de>
Date:   Wed Mar 26 20:07:10 2008 +0100

    wrepl_server: make 'use inform' the default and autofallback against old servers
    
    metze
    (from samba4wins tree f44c8c8e1986e2105e899bb1f8a3896575eef582)

commit d5b7240ac510fc3d1a7033b22a3a59b1450103aa
Author: Stefan Metzmacher <metze at sernet.de>
Date:   Wed Mar 26 20:06:12 2008 +0100

    libcli/wrepl: return the major version of the server in wrepl_associate()
    
    metze
    (from samba4wins tree 1ea02d50d1607b94e15ff07568fa5056cb6e4f09)

commit 7c7bdf3669f55b7bd3e2ff138af8f57bcc6596ee
Author: Stefan Metzmacher <metze at sernet.de>
Date:   Wed Mar 26 19:33:15 2008 +0100

    wreplserver: add "wreplsrv:propagate name releases = yes" for replicated sgroup merges
    
    metze
    (from samba4wins tree 80cbe665e561182d28acc6ad474243b83f3e4d28)

commit e1c968afd85c229490f1e6c13da94a6ef824b122
Author: Stefan Metzmacher <metze at sernet.de>
Date:   Tue Mar 25 17:35:33 2008 +0100

    winsserver: add "wreplsrv:propagate name releases" option
    
    Add an option to propagate name releases directly.
    This make the results for #1C name queries more consistent
    among all servers.
    
    It's off by default to match windows.
    
    metze
    (from samba4wins tree 166e9fdffb9f4e26513c3b4ec1f6f168ecbe18f8)

commit fb64b12be5c347645976f8000a79f2d31c9a5c79
Author: Stefan Metzmacher <metze at sernet.de>
Date:   Tue Mar 25 17:30:52 2008 +0100

    winsserver_release: update the expire time if only one address is released
    
    We also take the ownership if the record isn't owned.
    This matches windows...
    
    metze
    (from samba4wins tree d7b19339c0444cbe0989fcfa91a22323215d2f6b)

commit 81a2a43a5a3c13d08ed458d861d47f63a15ceac9
Author: Stefan Metzmacher <metze at sernet.de>
Date:   Tue Mar 25 16:44:46 2008 +0100

    wrepl_scavenging: add a comment to make the is_static case more clear
    
    metze
    (from samba4wins tree 67fa7dc4fe36b143d36df1309840328a14683e31)

commit bbe4785f342d6513fd001fdde94a945b2f2b654a
Author: Stefan Metzmacher <metze at sernet.de>
Date:   Thu Mar 20 13:27:13 2008 +0100

    wrepl_server: fix the record expire time of sgroup merges
    
    if we're the owner, the expire time becomes the highest
    expire time of owned addresses
    
    metze
    (from samba4wins tree 024f439db45046c7c0bb4759c75877462405baec)

commit c4402e3fde823a1984cc10f390d09c0ef9c8af0d
Author: Stefan Metzmacher <metze at sernet.de>
Date:   Thu Mar 20 13:26:14 2008 +0100

    wrepl_server: use a local 'local_owner' variable to make the code more readable
    
    metze
    (from samba4wins tree eba9a8ce0641a2984112f4e1473801fa449ed96d)

commit 780bc13736f264435ba9af6dda84235ea217d526
Author: Stefan Metzmacher <metze at sernet.de>
Date:   Tue Mar 18 16:08:02 2008 +0100

    winsdb: the we_are_owner in winsdb_lookup() needs to be per address
    
    This fixes a bug where #1C addresses are registered with different
    WINS-Servers and a merged #1C record.
    
    metze
    (from samba4wins tree 72e055394a0fd1f543be9c196b4179356a1033f6)

commit cd5e43b32761daea36187f28a72795f7696ea546
Author: Stefan Metzmacher <metze at sernet.de>
Date:   Fri Feb 8 11:50:34 2008 +0100

    nbt_server: fix crash bug, the wins client interface may not have a nbtsock
    
    metze
    (from samba4wins tree 8035601da7c7e8b65fe1d82c2654c412fa169338)

commit a5b3975cf71f0bf114832c958ba855646c69832c
Author: Stefan Metzmacher <metze at sernet.de>
Date:   Wed Jan 16 13:57:50 2008 +0100

    nbt_server: redirect incoming response packets to the correct interface
    
    We may send requests packets (WACK challenges or similar things)
    via a different udp socket than the socket we receive the
    matching response. We need to setup an unexpected handler
    on the nbt sockets and redirect responses to the correct
    nbt_socket. (By redirect I mean we use the correct
    nbt_socket structure, we're *not* resending the packet
    with sendto() via the kernel...)
    
    metze
    (from samba4wins tree 7ce8e705e5a9aabb787d17fbec7a078d9d6780dc)

commit ebab6d6ce40ec4d64126964c0223aa2bdef99094
Author: Stefan Metzmacher <metze at sernet.de>
Date:   Wed Jan 16 14:51:56 2008 +0100

    libcli/nbt: add nbt_name_socket_handle_response_packet()
    
    Move the last part of nbt_name_socket_recv() into
    a new function nbt_name_socket_handle_response_packet()
    so that it can be reused by an unexpected handler.
    
    metze
    (from samba4wins tree cb0377f3b95e50c84fac999a49dde80acc933124)

commit 26c48098e6c387cc76b123a78d50f23518d734cf
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Jan 17 18:15:24 2009 +0100

    libcli/nbt: add nbt_set_unexpected_handler()
    
    metze
    (from samba4wins tree 74232901d1e7ea9ebcb3bd8d584dda36fac37223)

commit c97df0d892d71462dfd631cf5e93f04641afaab3
Author: Stefan Metzmacher <metze at sernet.de>
Date:   Wed Jan 16 13:43:07 2008 +0100

    nbt_server: add some debug messages which show the used interfaces addresses
    
    metze
    (from samba4wins tree 8eb30add7c95672a85b4084b4a3dbfa78db820c4)

commit 65f096c8cda9efd6cffb29b52cac610664bbfbc2
Author: Stefan Metzmacher <metze at sernet.de>
Date:   Mon Jan 14 13:57:12 2008 +0100

    wreplsrv: don't log scavenging events at level 0
    
    metze
    (from samba4wins tree 7a1d4fac9d77440c2c463bfdb2a5671e4817cfdf)

commit 9598d775a5c1c26b502171737d00084f074e16f8
Author: Stefan Metzmacher <metze at sernet.de>
Date:   Mon Jan 14 13:56:25 2008 +0100

    wreplsrv: log a successful replication cycle at level 1
    
    metze
    (from samba4wins tree b411e60e1536668e11bc5d8eaa389071b25077bf)

commit 6d107fff13ad42828085ce368dc6e02e24f87713
Author: Stefan Metzmacher <metze at sernet.de>
Date:   Mon Jan 14 13:52:14 2008 +0100

    wreplsrv: log replication failures at log level 0
    
    metze
    (from samba4wins tree 405cbb74b7191e744178894a5e0ac4abcac2a4fe)

commit bbd74f2f760184b88341f35f2769b91480e8eb9d
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Jan 17 18:14:29 2009 +0100

    libcli/nbt: fix wack timeout handling
    
    If the client gets a WACK response, the server
    sends a timeout to the client. Possible
    values are between 9 and 105 seconds.
    
    Because w2k3 servers have a bug and always return
    a value of 5 seconds, we need a workarround.
    
    Always using a fixed value of 30 seconds is bad
    as we could timeout to early.
    
    Now we use the value from the server if it's in the
    valid range and otherwise we use the upper limit
    of the valid range (105s).
    
    metze
    (from samba4wins tree 40ef7739f4141598a6392c203e4a2d52d972fe06)

commit 4a878115a70851ba77bc984c4313e95a608c5764
Author: Stefan Metzmacher <metze at sernet.de>
Date:   Mon Jan 14 09:10:37 2008 +0100

    NBT-WINS: test if the server ignores resent packets
    
    metze
    (from samba4wins tree 24eb7577414c8584b97f43c850d738d3dbb30777)

commit 1ffcebbf0f912f4ccbff76f05280f7ed98d5e5ea
Author: Stefan Metzmacher <metze at sernet.de>
Date:   Fri Jan 11 19:10:30 2008 +0100

    NBT-WINS: we don't need the slow low port tests for every name
    
    metze
    (from samba4wins tree 7862deca8555f960a5ef65e6315ce94af5023a2a)

commit 462e4d0cef822d90d982cfb0b38dd60015929bcc
Author: Stefan Metzmacher <metze at sernet.de>
Date:   Fri Jan 11 19:05:33 2008 +0100

    NBT-WINS: if we're bound to port 137 trigger WACK reponses with timeouts
    
    metze
    (from samba4wins tree de7225658493006c19d139ac77ac1b1ffab01d25)

commit 384b9f709a16085e48469484a564ce0a7128af13
Author: Stefan Metzmacher <metze at sernet.de>
Date:   Fri Jan 11 19:01:50 2008 +0100

    NBT-WINS: try to bind to port 137 in the NBT-WINS test
    
    metze
    (from samba4wins tree 5e101475d5ed62060c991ea71c943e76b862aeef)

commit ee8f481d9422dff239a871d363da879a5776f7d9
Author: Stefan Metzmacher <metze at sernet.de>
Date:   Fri Jan 11 16:11:59 2008 +0100

    winsserver: we need to ignore duplicated name register requests.
    
    This fixes the following bug:
    
    While we reply with a WACK response to a client.
    Instead of waiting for the final reply some
    windows client just resends the request using
    the same name_trn_id in the nbt_name_packet.
    We handled this as a new request and send a
    WACK response (and the challenges) again.
    Then the first request gets its final success
    response, but the when we try to send the success
    for the "second" request we notice that
    the record was changed in between and we return
    an error.
    
    Windows 2003 (and I assume all other versions as well)
    detect the packet is just a resent of a currently pending
    request and ignores it.
    
    So we now keep a list of all pending WINS name register
    requests which result in a WACK response. On each incoming
    name register request we search through the list to find
    duplicate requests and ignore them. In theory we should
    do that for all requests, but name register requests
    are the only requests we response async and only
    if we have to go via the WACK code path.
    
    metze
    (from samba4wins tree 382e7d384b70d03e9f81c7bb353afaed288d80f0)

commit bae593bb118459c1b0d12d02e58ba6c89400aa97
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Jan 17 18:13:31 2009 +0100

    ndr_print: fix the output ndr debug messages only add header line once
    
    metze
    (from samba4wins tree e99531aae325e4443fcb917a75dfe4a86b892583)

commit 996790719066d92f563bf53fe4222d2b5e3863a5
Author: Stefan Metzmacher <metze at sernet.de>
Date:   Wed Jan 30 10:34:57 2008 +0100

    util_str: setup the correct talloc name for strings
    
    metze
    (partly from samba4wins tree 447e7f9532131117e896712db9def321c96718eb)

commit 9d4f766ae35176b0597dd359d692e4166c2314fc
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sun Jan 18 23:20:01 2009 +0100

    Revert "Remove another use of global_loadparm."
    
    This reverts commit ee7c2170a79f1ca9e2ad1a209d342d8fd287ec8d.
    
    A much more correct fix will come soon.
    (40ef7739f4141598a6392c203e4a2d52d972fe06 from the samba4wins tree)
    
    metze

commit 3b91640fbb16b5ab248d2fa4d2832f61dac29944
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Jan 17 10:06:08 2009 +0100

    NBT-WINS: initialize .dest_port explicit (we should fill the whole struct each time)
    
    This makes the code more clear.
    
    metze

commit d6e801b7d9a666d40f109df20dff0faaa2b46e70
Merge: 9fa6fb3d9fb2e4cee81ad34d6fd0cbe6f5265171 fe9dd8710d577478b324d1d507de0ecd77df2ea5
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Jan 19 13:39:54 2009 +1100

    Merge branch 'master' of ssh://git.samba.org/data/git/samba into abartlet-devel

commit 9fa6fb3d9fb2e4cee81ad34d6fd0cbe6f5265171
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Jan 19 12:15:47 2009 +1100

    Print more useful suggestion for the main provision command line

commit b4551bba07017c852d64524e3324223b9b0f05c9
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Jan 14 20:32:18 2009 +1100

    Delete more Samba3-specific files

commit b7cafb98429f45e2aad10e683618da4626da5c84
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed Jan 14 20:31:58 2009 +1100

    Don't give fatal python errors when guessing the realm

commit fe9dd8710d577478b324d1d507de0ecd77df2ea5
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Jan 19 00:04:33 2009 +0100

    Remove unused tdb_search_keys()

commit eaec86514896762aff23f30aca2b944ce07bf7c9
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Jan 19 00:01:08 2009 +0100

    simplify gencache_iterate a bit, fix nonempty blank lines

commit a9542ddcb77f0296cb835d0ae337dc54418c1bf4
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jan 18 18:15:49 2009 +0100

    libnetapi_open_pipe does not need to return cli_state
    
    The user session key is also available in rpccli->auth->user_session_key
    
    Guenther, please check!
    
    Thanks,
    
    Volker

commit 6ffe233f9442792a0e8e52167a01b76eabd83be9
Merge: bfbb0fb17f4eedb8f22d0694c5d4a3b82dfe189b 0dbd3968626445b4dcb00307e45206b37dd0e8ad
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sun Jan 18 17:27:41 2009 +0100

    Merge branch 'master' of ssh://git.samba.org/data/git/samba

commit 0dbd3968626445b4dcb00307e45206b37dd0e8ad
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jan 18 16:38:30 2009 +0100

    Add a macro async_req_setup()
    
    This streamlines setting up a multi-step async request a bit

commit bfbb0fb17f4eedb8f22d0694c5d4a3b82dfe189b
Merge: 5cf9989a70a23e5b955b7229fa95d3e604b1883d c45b6ec29a5b3a39b83209e970b645e5ed0a411c
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sun Jan 18 16:19:39 2009 +0100

    Merge branch 'master' of ssh://git.samba.org/data/git/samba

commit c45b6ec29a5b3a39b83209e970b645e5ed0a411c
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jan 18 12:22:14 2009 +0100

    Add code to torture the fragmentation code a bit

commit a158ebbe49d431259f002ae8272c39e5792adf4f
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jan 18 12:15:33 2009 +0100

    Remove unused functions

commit 28c35b4c0456ce62bf1a492ad9c1b223e2f31816
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jan 18 12:12:15 2009 +0100

    Make rpc_pipe_bind async

commit ecb5184ce57259c709d728ed5f7be1bdf666bbcc
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Jan 17 19:19:04 2009 +0100

    Fix an uninitialized variable

commit 3f9f188877de8a4c0b2883e2360f2834c41b66c1
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Jan 17 17:53:05 2009 +0100

    Remove sync rpc_api_pipe_req

commit 396ed3b36359367e1efd49395cd9e6dc6f7c98fc
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Jan 17 17:52:35 2009 +0100

    Add async rpc_api_pipe_req

commit 8a1c6c2c994b2eac05e8cbc3c692d7367b687d32
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Jan 17 17:52:22 2009 +0100

    Tiny simplification of prs_set_offset

commit c655f19e1fa3a1443fd16927d37035a4f4cf46aa
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Jan 17 15:07:52 2009 +0100

    Add rpc_write_send/recv

commit f96335afc0602e5874e11c505a4087e32873060e
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Jan 17 13:58:36 2009 +0100

    Remove unused sync functions

commit f6740aa7ad1b553410ffbc9fb54916d6a385a753
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Jan 17 13:33:34 2009 +0100

    Make rpc_api_pipe async

commit 761d164420dc4d16e8a0a937146e359130979df9
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Jan 17 12:50:02 2009 +0100

    Rename the async version of get_complete_pdu to get_complete_frag

commit 5e6f3eaae9435b1ab7b36726e7b898d4994fcebf
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Jan 17 12:18:29 2009 +0100

    Move initialization of the reply prs_struct to rpc_api_pipe

commit 5987c8269779ca2a7207c37a94b0e841a380d7d1
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Jan 16 17:31:56 2009 +0100

    Always check the max send sizein rpc_api_pipe, not just with DEVELOPER

commit 6d47418bc1f3de56e8ed78f2e908eb634230fee9
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Jan 16 17:07:52 2009 +0100

    Make cli_api_pipe async
    
    Also move the transport switch to this routine

commit 173d6c84a68691f8bc00749509b8e3665bc159ee
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Jan 16 14:47:21 2009 +0100

    Remove sync rpc_read wrapper

commit 5d71fe8043799abf098131fd924c35b49111bf54
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Jan 16 14:46:41 2009 +0100

    Make cli_pipe_get_current_pdu async, rename it to get_current_pdu

commit 30413f12b97149cde7aacfc8e7f2d9b63fa9da5c
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Jan 15 21:56:03 2009 +0100

    Make rpc_read async

commit 8b618d0ba997a9b2254ae2ea530a80dd14631d59
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Jan 18 13:15:23 2009 +0100

    Fix some real bugs found by "type-punned" gcc warnings
    
    Type-casting does not the right thing if used the way it used to be. The
    function arguments have not been uint32_t's, but the type cast made the calling
    routine believe so. Not good...
    
    The assignment xxx=account_policy_temp does however type-convert properly,
    potentially cutting off the top-bits.

commit 44ae09b82e509db390ad4e884ae3310a3508cf46
Author: Tim Prouty <tprouty at samba.org>
Date:   Sat Jan 17 15:19:08 2009 -0800

    librpc: Re-run make idl_full

commit 4a40857836ef2678d2e55c2b1cc9745b88812c4e
Author: Tim Prouty <tprouty at samba.org>
Date:   Sat Jan 17 14:42:20 2009 -0800

    librpc: Remove usage of max and replace with improved range.

commit 142b2a61f8a77b3065ce4c78b459ab714d6d190a
Author: Tim Prouty <tprouty at samba.org>
Date:   Sat Jan 17 14:40:12 2009 -0800

    pidl: Remove "max" and make "range" smarter about unsigned types
    
    This eliminates a warning in pidl generated code, while preserving
    cross-platform idl compatibility.

commit 6d300399b52e0921ce205ef2f053b722b21edeeb
Author: Derrell Lipman <derrell.lipman at unwireduniverse.com>
Date:   Sat Jan 17 13:33:25 2009 -0500

    Determine case sensitivity based on file system attributes.
    
    - Most of the time, we can determine from the file system we're connecting to
      whether it supports case sensitivity. In those cases, we now set the
      internal case sensitivity flag automatically. For those cases where the
      request to retrieve file system attributes fails, we'll use the
      user-specified option value.
    
    Derrell

commit 9b3c38f4afe2b15159c8659b5916740493f7b60c
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Jan 17 11:26:06 2009 +0100

    Slightly simplify the paths after rpc_api_pipe()

commit c6b4f3526a262b22d5a97a3152f378778a497a26
Author: Derrell Lipman <derrell.lipman at unwireduniverse.com>
Date:   Fri Jan 16 20:26:46 2009 -0500

    [Bug 6022] smbc_urlencode and smbc_urldecode were not exported
    
    - Since the revamp of libsmbclient, there has still been an external
      declaration for smbc_urlencode and smbc_urldecode in libsmbclient.h, yet
      those functions were renamed and made private. The two choices were to
      remove the function names from libsmbclient.h or to make them public
      again. The reported requested that they be public. This commit makes it so.
    
    Derrell

commit 1c77c7f3d5b6cb29fac4606299c237c0e299f836
Author: Derrell Lipman <derrell.lipman at unwireduniverse.com>
Date:   Fri Jan 16 16:41:36 2009 -0500

    Treat file names in POSIX-like case-sensitive fashion by default
    
    *** THIS COMMIT CAUSES A CHANGE OF DEFAULT BEHAVIOR IN libsmbclient!!! ***
    
    - libsmbclient now calls cli_set_case_sensitive() for a new CLI. By default,
      it requests case-sensitive, but the old behavior of case-insensitive can be
      requested with smbc_setOptionCaseSensitive(context, False);
    
      The change of behavior is considered a bug fix, as it was previously
      possible to accidentally overwrite a file that had the same case-insensitive
      name but a different case-sensitive name as a previously-existing file,
      while creating a new file.
    
    Derrell

commit 5cf9989a70a23e5b955b7229fa95d3e604b1883d
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Fri Jan 16 21:46:01 2009 +0100

    More work on the Samba 4 release notes.

commit 3fe974c4feed33187294a0cb922c20f7dbfeaf43
Author: Andreas Schneider <anschneider at suse.de>
Date:   Fri Jan 16 12:26:46 2009 -0800

    Fix a segfault if ? is there but the options are NULL. This is the case if SMBC_parse_path is called by SMBC_stat_ctx.

commit d03133e696aea45e0843f4d72d2d1449366ac4e2
Merge: fb904194c9f696b72d862e51e7ba688decdda192 073e9f42f0c5f5de5d736ec7843d80a274c891ce
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Jan 16 12:25:35 2009 -0800

    Merge branch 'master' of ssh://jra@git.samba.org/data/git/samba

commit fb904194c9f696b72d862e51e7ba688decdda192
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Jan 16 11:55:01 2009 -0800

    "First thing, kill all the language lawyers" :-). Ensure possible insane compilers
    can't kill us later.
    Jeremy.

commit 073e9f42f0c5f5de5d736ec7843d80a274c891ce
Author: Gerald (Jerry) Carter <jerry at samba.org>
Date:   Fri Jan 16 12:06:49 2009 -0600

    ads_connect: Return immediately on a failed GC connection.
    
    ads_connect_gc() feeds an explicit server to ads_connect().  However, if the
    resulting connection fails, the latter function was attempting to find a DC
    on its own and continuing the connection.  This resulting in GC searches being
    sent over a connection using port 389 which would fail when using the base
    search suffix outside of the domain naming context.
    
    The fix is to fail immediately in ads_connect() since the GC lookup ordering
    is handled already in ads_connect_gc().

commit 57f978d1712943f6c93e914e52a12a4cfb73aadd
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Fri Jan 16 17:37:40 2009 +0100

    loadparm: Make sure various state variables get initialized even when we
    couldn't load a default smb.conf file.

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

Summary of changes:
 WHATSNEW4.txt                                      |   69 +-
 .../Samba3-ByExample/SBE-DomainAppsSupport.xml     |    2 +-
 .../Samba3-ByExample/SBE-SecureOfficeServer.xml    |    4 +-
 docs-xml/Samba3-ByExample/SBE-TheSmallOffice.xml   |    4 +-
 docs-xml/Samba3-HOWTO/TOSHARG-Compiling.xml        |    6 +-
 docs-xml/Samba3-HOWTO/TOSHARG-Winbind.xml          |    4 +-
 lib/util/substitute.c                              |    2 +
 lib/util/util_str.c                                |    2 +
 libcli/nbt/libnbt.h                                |    9 +-
 libcli/nbt/nbtsocket.c                             |   48 +-
 libcli/nbt/pynbt.c                                 |    3 +-
 librpc/gen_ndr/eventlog.h                          |    2 +-
 librpc/gen_ndr/ndr_drsuapi.c                       |   48 +-
 librpc/gen_ndr/ndr_eventlog.c                      |    2 +-
 librpc/gen_ndr/ndr_lsa.c                           |   34 +-
 librpc/gen_ndr/ndr_netlogon.c                      |    4 +-
 librpc/gen_ndr/ndr_samr.c                          |    6 +-
 librpc/gen_ndr/ndr_security.c                      |    4 +-
 librpc/gen_ndr/ndr_svcctl.c                        |   40 +-
 librpc/idl/eventlog.idl                            |    2 +-
 librpc/ndr/ndr.c                                   |    6 +
 nsswitch/pam_winbind.c                             |    2 +-
 pidl/lib/Parse/Pidl/Compat.pm                      |    1 -
 pidl/lib/Parse/Pidl/NDR.pm                         |    1 -
 pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm           |   16 +-
 pidl/lib/Parse/Pidl/Typelist.pm                    |   15 +-
 source3/include/async_req.h                        |    7 +
 source3/include/dbwrap.h                           |    6 +
 source3/include/libsmb_internal.h                  |   15 +-
 source3/include/libsmbclient.h                     |   21 +
 source3/include/proto.h                            |   14 +-
 source3/include/rpc_client.h                       |    3 +-
 source3/include/util_tdb.h                         |   10 -
 source3/lib/async_req.c                            |   25 +
 source3/lib/async_sock.c                           |   20 +-
 source3/lib/dbwrap.c                               |   34 +-
 source3/lib/dbwrap_ctdb.c                          |    8 +
 source3/lib/dbwrap_tdb.c                           |    9 +
 source3/lib/gencache.c                             |  170 +-
 source3/lib/netapi/cm.c                            |    2 -
 source3/lib/netapi/file.c                          |   18 -
 source3/lib/netapi/getdc.c                         |    6 -
 source3/lib/netapi/group.c                         |   54 -
 source3/lib/netapi/joindomain.c                    |   34 +-
 source3/lib/netapi/localgroup.c                    |   37 -
 source3/lib/netapi/netapi_private.h                |    1 -
 source3/lib/netapi/serverinfo.c                    |    6 -
 source3/lib/netapi/share.c                         |   30 -
 source3/lib/netapi/user.c                          |   70 +-
 source3/lib/util_sock.c                            |   22 +-
 source3/lib/util_tdb.c                             |   68 -
 source3/lib/wb_reqtrans.c                          |   44 +-
 source3/lib/wbclient.c                             |   29 +-
 source3/libads/ldap.c                              |   17 +-
 source3/librpc/rpc/dcerpc.c                        |    3 +-
 source3/libsmb/clireadwrite.c                      |   34 +-
 source3/libsmb/libsmb_context.c                    |    1 +
 source3/libsmb/libsmb_dir.c                        |    2 +-
 source3/libsmb/libsmb_path.c                       |   10 +-
 source3/libsmb/libsmb_server.c                     |   64 +-
 source3/libsmb/libsmb_setget.c                     |   26 +
 source3/rpc_client/cli_pipe.c                      | 2116 +++++++++++++-------
 source3/rpc_client/ndr.c                           |    4 +-
 source3/rpc_parse/parse_prs.c                      |    9 +-
 source3/rpc_server/srv_samr_nt.c                   |   19 +-
 source3/winbindd/idmap_tdb.c                       |  467 ++---
 source3/winbindd/winbindd_passdb.c                 |    6 +-
 source4/libcli/raw/rawfile.c                       |    2 +
 source4/libcli/wrepl/winsrepl.c                    |    1 +
 source4/libcli/wrepl/winsrepl.h                    |    1 +
 source4/nbt_server/interfaces.c                    |   68 +-
 source4/nbt_server/nbt_server.h                    |    2 +
 source4/nbt_server/wins/wins_ldb.c                 |    2 +-
 source4/nbt_server/wins/winsdb.c                   |   51 +-
 source4/nbt_server/wins/winsserver.c               |   83 +-
 source4/param/loadparm.c                           |   69 +-
 source4/script/mkrelease.sh                        |   15 +-
 source4/scripting/python/samba/provision.py        |   18 +-
 source4/setup/provision                            |   16 +-
 source4/setup/provision-backend                    |    2 +-
 source4/torture/nbt/wins.c                         |  217 ++-
 source4/wrepl_server/wrepl_apply_records.c         |   50 +-
 source4/wrepl_server/wrepl_in_call.c               |   12 +-
 source4/wrepl_server/wrepl_out_helpers.c           |   25 +-
 source4/wrepl_server/wrepl_out_pull.c              |    6 +-
 source4/wrepl_server/wrepl_scavenging.c            |   66 +-
 source4/wrepl_server/wrepl_server.c                |    2 +-
 source4/wrepl_server/wrepl_server.h                |    1 +
 88 files changed, 2812 insertions(+), 1774 deletions(-)


Changeset truncated at 500 lines:

diff --git a/WHATSNEW4.txt b/WHATSNEW4.txt
index a82ceac..03cd72c 100644
--- a/WHATSNEW4.txt
+++ b/WHATSNEW4.txt
@@ -66,12 +66,79 @@ CHANGES SINCE Alpha5
 =====================
 
 In the time since Samba4 Alpha5 was released in June 2008, Samba has
-continued to evolve, but you may particularly notice these areas:
+continued to evolve, but you may particularly notice these areas 
+(in no particular order):
 
  The source code for various libraries that are used by both Samba 3 and 
  Samba 4 are now shared between the two rather than duplicated 
  (and being slightly diverged).
 
+ The tevent library has been split out and is now usable on its own.
+
+ Several crash bugs and memory leaks in the registry library have been fixed.
+
+ The Python modules have been extended and are no longer generated using SWIG.
+
+ Stream renames are now supported.
+
+ The provision script now has an interactive mode.
+
+ The (broken) copy of CTDB has been removed.
+
+ More work towards supporting an OpenLDAP backend. 
+
+ Initial work on using the Microsoft LDAP schema.
+
+ The storage of schemas in LDB is now much more efficient.
+
+ Support for extended DNs in LDB has been added.
+
+ Incoming trusts are now supported.
+
+ Compatibility of the registry server with several Windows versions has been 
+ improved.
+
+ Improvements to LSA.idl for better functionality in the usrmgr.exe.
+
+ Improved handling of non-standard characters in passwords.
+
+ The embedded JavaScript library has been removed in favor of Python.
+
+ The WMI implementation has been re-added, but does not completely work yet.
+
+ xpress compression is now supported in the NDR layer.
+
+ The main binary is now named "samba" rather than "smbd".
+
+ A simple script for setting the expiration of a user was added.
+
+ The LDB library is now completely asynchronous internally.
+
+ Various unknowns and correctness issues in the drsblobs and drsuapi RPC 
+ interface implementations have been fixed.
+
+ It is now possible to connect to an LDAP backend using SASL credentials.
+
+ Multi-fragment NTtrans request support has been added.
+
+ The DCE/RPC server can now listen on a separate pipe to allow DCE/RPC 
+ connections forwarded from Samba 3. The user credentials are provided 
+ by the client.
+
+ A large number of bugs in the SMB2 implementation have been fixed.
+
+ Auxiliary classes in LDAP schema conversion are now collapsed.
+
+ Several tests have been added to the SMB testsuite.
+
+ Object GUIDs in DCE/RPC connections are now dealt with properly.
+
+ The correctness of the LSA and NETLOGON implementations has been 
+ improved.
+
+ Multi Master Replication configuration can now be generated 
+ for OpenLDAP.
+
 These are just some of the highlights of the work done in the past few
 months.  More details can be found in our GIT history.
 
diff --git a/docs-xml/Samba3-ByExample/SBE-DomainAppsSupport.xml b/docs-xml/Samba3-ByExample/SBE-DomainAppsSupport.xml
index 6d144ab..c9ccd43 100644
--- a/docs-xml/Samba3-ByExample/SBE-DomainAppsSupport.xml
+++ b/docs-xml/Samba3-ByExample/SBE-DomainAppsSupport.xml
@@ -477,7 +477,7 @@ Password for ADMINISTRATOR at LONDON.ABMAS.BIZ:
 <screen>
 &rootprompt; smbd -D
 &rootprompt; nmbd -D
-&rootprompt; winbindd -B
+&rootprompt; winbindd -D
 </screen>
 		</para></step>
 
diff --git a/docs-xml/Samba3-ByExample/SBE-SecureOfficeServer.xml b/docs-xml/Samba3-ByExample/SBE-SecureOfficeServer.xml
index e03c010..2e60b4a 100644
--- a/docs-xml/Samba3-ByExample/SBE-SecureOfficeServer.xml
+++ b/docs-xml/Samba3-ByExample/SBE-SecureOfficeServer.xml
@@ -1910,8 +1910,8 @@ Loaded services file OK.
 14290 ?        S      0:00 /usr/sbin/smbd -D
 
 $rootprompt; ps ax | grep winbind
-14293 ?        S     0:00 /usr/sbin/winbindd -B
-14295 ?        S     0:00 /usr/sbin/winbindd -B
+14293 ?        S     0:00 /usr/sbin/winbindd -D
+14295 ?        S     0:00 /usr/sbin/winbindd -D
 </screen>
 			The <command>winbindd</command> daemon is running in split mode (normal), so there are also
 			two instances<footnote><para>For more information regarding winbindd, see <emphasis>TOSHARG2</emphasis>, 
diff --git a/docs-xml/Samba3-ByExample/SBE-TheSmallOffice.xml b/docs-xml/Samba3-ByExample/SBE-TheSmallOffice.xml
index ca39af3..b178749 100644
--- a/docs-xml/Samba3-ByExample/SBE-TheSmallOffice.xml
+++ b/docs-xml/Samba3-ByExample/SBE-TheSmallOffice.xml
@@ -767,8 +767,8 @@ Ignoring unknown parameter "dogbert"
 14290 ?        S      0:00 /usr/sbin/smbd -D
 
 $rootprompt; ps ax | grep winbind
-14293 ?        S     0:00 /usr/sbin/winbindd -B
-14295 ?        S     0:00 /usr/sbin/winbindd -B
+14293 ?        S     0:00 /usr/sbin/winbindd -D
+14295 ?        S     0:00 /usr/sbin/winbindd -D
 </screen>
 			The <command>winbindd</command> daemon is running in split mode (normal), so there are also
 			two instances of it. For more information regarding <command>winbindd</command>, see
diff --git a/docs-xml/Samba3-HOWTO/TOSHARG-Compiling.xml b/docs-xml/Samba3-HOWTO/TOSHARG-Compiling.xml
index 130da81..1f1f51c 100644
--- a/docs-xml/Samba3-HOWTO/TOSHARG-Compiling.xml
+++ b/docs-xml/Samba3-HOWTO/TOSHARG-Compiling.xml
@@ -492,9 +492,9 @@ netbios-ns dgram udp wait root /usr/local/samba/sbin/nmbd nmbd
 
 <para><programlisting>
 #!/bin/sh
-/usr/local/samba/sbin/smbd -D 
-/usr/local/samba/sbin/winbindd -B
-/usr/local/samba/sbin/nmbd -D 
+/usr/local/samba/sbin/smbd -D
+/usr/local/samba/sbin/winbindd -D
+/usr/local/samba/sbin/nmbd -D
 </programlisting></para>
 
 	<para>
diff --git a/docs-xml/Samba3-HOWTO/TOSHARG-Winbind.xml b/docs-xml/Samba3-HOWTO/TOSHARG-Winbind.xml
index 7731e4e..adb0ba2 100644
--- a/docs-xml/Samba3-HOWTO/TOSHARG-Winbind.xml
+++ b/docs-xml/Samba3-HOWTO/TOSHARG-Winbind.xml
@@ -1016,7 +1016,7 @@ start() {
 in the example above with:
 
 <programlisting>
-        daemon /usr/local/samba/sbin/winbindd -B
+        daemon /usr/local/samba/sbin/winbindd -D
 </programlisting>.
 </para>
 
@@ -1125,7 +1125,7 @@ Again, if you would like to run Samba in dual daemon mode, replace:
 </programlisting>
 in the script above with:
 <programlisting>
-/usr/local/samba/sbin/winbindd -B
+/usr/local/samba/sbin/winbindd -D
 </programlisting>
 </para>
 
diff --git a/lib/util/substitute.c b/lib/util/substitute.c
index 84514ac..32945a7 100644
--- a/lib/util/substitute.c
+++ b/lib/util/substitute.c
@@ -120,6 +120,8 @@ _PUBLIC_ char *string_sub_talloc(TALLOC_CTX *mem_ctx, const char *s,
 
 	SMB_ASSERT(ret[len] == '\0');
 
+	talloc_set_name_const(ret, ret);
+
 	return ret;
 }
 
diff --git a/lib/util/util_str.c b/lib/util/util_str.c
index 7dcefc9..a2c50fd 100644
--- a/lib/util/util_str.c
+++ b/lib/util/util_str.c
@@ -153,6 +153,8 @@ _PUBLIC_ const char *str_format_nbt_domain(TALLOC_CTX *mem_ctx, const char *s)
 		}
 	}
 
+	talloc_set_name_const(ret, ret);
+
 	return ret;
 }
 
diff --git a/libcli/nbt/libnbt.h b/libcli/nbt/libnbt.h
index 0c4420c..a37a213 100644
--- a/libcli/nbt/libnbt.h
+++ b/libcli/nbt/libnbt.h
@@ -122,8 +122,6 @@ struct nbt_name_socket {
 				struct socket_address *);
 		void *private_data;
 	} unexpected;
-
-	uint32_t wack_timeout;
 };
 
 
@@ -279,6 +277,9 @@ struct nbt_name_release {
 struct nbt_name_socket *nbt_name_socket_init(TALLOC_CTX *mem_ctx,
 					     struct tevent_context *event_ctx,
 					     struct smb_iconv_convenience *iconv_convenience);
+void nbt_name_socket_handle_response_packet(struct nbt_name_request *req,
+					    struct nbt_name_packet *packet,
+					    struct socket_address *src);
 struct nbt_name_request *nbt_name_query_send(struct nbt_name_socket *nbtsock,
 					     struct nbt_name_query *io);
 NTSTATUS nbt_name_query_recv(struct nbt_name_request *req,
@@ -326,6 +327,10 @@ NTSTATUS nbt_set_incoming_handler(struct nbt_name_socket *nbtsock,
 				  void (*handler)(struct nbt_name_socket *, struct nbt_name_packet *,
 						  struct socket_address *),
 				  void *private_data);
+NTSTATUS nbt_set_unexpected_handler(struct nbt_name_socket *nbtsock,
+				    void (*handler)(struct nbt_name_socket *, struct nbt_name_packet *,
+						    struct socket_address *),
+				    void *private_data);
 NTSTATUS nbt_name_reply_send(struct nbt_name_socket *nbtsock,
 			     struct socket_address *dest,
 			     struct nbt_name_packet *request);
diff --git a/libcli/nbt/nbtsocket.c b/libcli/nbt/nbtsocket.c
index 780e2bb..dac61ef 100644
--- a/libcli/nbt/nbtsocket.c
+++ b/libcli/nbt/nbtsocket.c
@@ -231,9 +231,20 @@ static void nbt_name_socket_recv(struct nbt_name_socket *nbtsock)
 		return;
 	}
 
+	talloc_steal(req, packet);
+	talloc_steal(req, src);
+	talloc_free(tmp_ctx);
+	nbt_name_socket_handle_response_packet(req, packet, src);
+}
+
+void nbt_name_socket_handle_response_packet(struct nbt_name_request *req,
+					    struct nbt_name_packet *packet,
+					    struct socket_address *src)
+{
 	/* if this is a WACK response, this we need to go back to waiting,
 	   but perhaps increase the timeout */
 	if ((packet->operation & NBT_OPCODE) == NBT_OPCODE_WACK) {
+		uint32_t ttl;
 		if (req->received_wack || packet->ancount < 1) {
 			nbt_name_request_destructor(req);
 			req->status = NT_STATUS_INVALID_NETWORK_RESPONSE;
@@ -245,13 +256,26 @@ static void nbt_name_socket_recv(struct nbt_name_socket *nbtsock)
 		   has received our request */
 		req->num_retries   = 0;
 		req->received_wack = true;
-		/* although there can be a timeout in the packet, w2k3 screws it up,
-		   so better to set it ourselves */
-		req->timeout = nbtsock->wack_timeout;
+		/*
+		 * there is a timeout in the packet,
+		 * it is 5 + 4 * num_old_addresses
+		 *
+		 * although w2k3 screws it up
+		 * and uses num_old_addresses = 0
+		 *
+		 * so we better fallback to the maximum
+		 * of num_old_addresses = 25 if we got
+		 * a timeout of less than 9s (5 + 4*1)
+		 * or more than 105s (5 + 4*25).
+		 */
+		ttl = packet->answers[0].ttl;
+		if ((ttl < (5 + 4*1)) || (ttl > (5 + 4*25))) {
+			ttl = 5 + 4*25;
+		}
+		req->timeout = ttl;
 		req->te = event_add_timed(req->nbtsock->event_ctx, req,
 					  timeval_current_ofs(req->timeout, 0),
 					  nbt_name_socket_timeout, req);
-		talloc_free(tmp_ctx);
 		return;
 	}
 
@@ -273,7 +297,6 @@ static void nbt_name_socket_recv(struct nbt_name_socket *nbtsock)
 	/* if we don't want multiple replies then we are done */
 	if (req->allow_multiple_replies &&
 	    req->num_replies < NBT_MAX_REPLIES) {
-		talloc_free(tmp_ctx);
 		return;
 	}
 
@@ -282,7 +305,6 @@ static void nbt_name_socket_recv(struct nbt_name_socket *nbtsock)
 	req->status = NT_STATUS_OK;
 
 done:
-	talloc_free(tmp_ctx);
 	if (req->async.fn) {
 		req->async.fn(req);
 	}
@@ -334,7 +356,6 @@ _PUBLIC_ struct nbt_name_socket *nbt_name_socket_init(TALLOC_CTX *mem_ctx,
 
 	nbtsock->send_queue = NULL;
 	nbtsock->num_pending = 0;
-	nbtsock->wack_timeout = 30;
 	nbtsock->incoming.handler = NULL;
 	nbtsock->unexpected.handler = NULL;
 	nbtsock->iconv_convenience = iconv_convenience;
@@ -495,6 +516,19 @@ _PUBLIC_ NTSTATUS nbt_set_incoming_handler(struct nbt_name_socket *nbtsock,
 	return NT_STATUS_OK;
 }
 
+/*
+  setup a handler for unexpected requests
+*/
+NTSTATUS nbt_set_unexpected_handler(struct nbt_name_socket *nbtsock,
+				    void (*handler)(struct nbt_name_socket *, struct nbt_name_packet *,
+						    struct socket_address *),
+				    void *private_data)
+{
+	nbtsock->unexpected.handler = handler;
+	nbtsock->unexpected.private_data = private_data;
+	EVENT_FD_READABLE(nbtsock->fde);
+	return NT_STATUS_OK;
+}
 
 /*
   turn a NBT rcode into a NTSTATUS
diff --git a/libcli/nbt/pynbt.c b/libcli/nbt/pynbt.c
index 63ee9bb..9be6c79 100644
--- a/libcli/nbt/pynbt.c
+++ b/libcli/nbt/pynbt.c
@@ -52,8 +52,7 @@ static PyObject *py_nbt_node_init(PyTypeObject *self, PyObject *args, PyObject *
 		return NULL;
 
 	ev = s4_event_context_init(ret->mem_ctx);
-	ret->socket = nbt_name_socket_init(ret->mem_ctx, ev, 
-									   py_iconv_convenience(ret->mem_ctx));
+	ret->socket = nbt_name_socket_init(ret->mem_ctx, ev, py_iconv_convenience(ret->mem_ctx));
 	return (PyObject *)ret;
 }
 
diff --git a/librpc/gen_ndr/eventlog.h b/librpc/gen_ndr/eventlog.h
index 65178d2..9c9a2ed 100644
--- a/librpc/gen_ndr/eventlog.h
+++ b/librpc/gen_ndr/eventlog.h
@@ -47,7 +47,7 @@ struct eventlog_Record {
 	time_t time_written;
 	uint32_t event_id;
 	enum eventlogEventTypes event_type;
-	uint16_t num_of_strings;/* [max(256)] */
+	uint16_t num_of_strings;/* [range(0,256)] */
 	uint16_t event_category;
 	uint16_t reserved_flags;
 	uint32_t closing_record_number;
diff --git a/librpc/gen_ndr/ndr_drsuapi.c b/librpc/gen_ndr/ndr_drsuapi.c
index 369a1d4..336f56f 100644
--- a/librpc/gen_ndr/ndr_drsuapi.c
+++ b/librpc/gen_ndr/ndr_drsuapi.c
@@ -811,7 +811,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursorCtrEx(struct ndr_pull *
 		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
 		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved1));
 		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
-		if (r->count < 0 || r->count > 0x100000) {
+		if (r->count > 0x100000) {
 			return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
 		}
 		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved2));
@@ -1166,7 +1166,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(struct ndr_p
 	if (ndr_flags & NDR_SCALARS) {
 		NDR_CHECK(ndr_pull_align(ndr, 4));
 		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_mappings));
-		if (r->num_mappings < 0 || r->num_mappings > 0x100000) {
+		if (r->num_mappings > 0x100000) {
 			return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
 		}
 		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_mappings));
@@ -1700,7 +1700,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursor2CtrEx(struct ndr_pull
 		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
 		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved1));
 		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
-		if (r->count < 0 || r->count > 0x100000) {
+		if (r->count > 0x100000) {
 			return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
 		}
 		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved2));
@@ -1764,7 +1764,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsAttributeValue(struct ndr_pull *ndr,
 	if (ndr_flags & NDR_SCALARS) {
 		NDR_CHECK(ndr_pull_align(ndr, 4));
 		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
-		if (r->__ndr_size < 0 || r->__ndr_size > 10485760) {
+		if (r->__ndr_size > 10485760) {
 			return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
 		}
 		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_blob));
@@ -1830,7 +1830,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsAttributeValueCtr(struct ndr_pull *n
 	if (ndr_flags & NDR_SCALARS) {
 		NDR_CHECK(ndr_pull_align(ndr, 4));
 		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_values));
-		if (r->num_values < 0 || r->num_values > 10485760) {
+		if (r->num_values > 10485760) {
 			return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
 		}
 		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_values));
@@ -2074,7 +2074,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaAttributeCtr(struct ndr_pull
 	if (ndr_flags & NDR_SCALARS) {
 		NDR_CHECK(ndr_pull_align(ndr, 4));
 		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_attributes));
-		if (r->num_attributes < 0 || r->num_attributes > 1048576) {
+		if (r->num_attributes > 1048576) {
 			return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
 		}
 		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_attributes));
@@ -2278,7 +2278,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaMetaDataCtr(struct ndr_pull
 		NDR_CHECK(ndr_pull_array_size(ndr, &r->meta_data));
 		NDR_CHECK(ndr_pull_align(ndr, 8));
 		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
-		if (r->count < 0 || r->count > 1048576) {
+		if (r->count > 1048576) {
 			return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
 		}
 		NDR_PULL_ALLOC_N(ndr, r->meta_data, ndr_get_array_size(ndr, &r->meta_data));
@@ -2710,7 +2710,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr6(struct ndr_pull *
 		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->nc_object_count));
 		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->nc_linked_attributes_count));
 		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->linked_attributes_count));
-		if (r->linked_attributes_count < 0 || r->linked_attributes_count > 1048576) {
+		if (r->linked_attributes_count > 1048576) {
 			return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
 		}
 		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_linked_attributes));
@@ -3837,11 +3837,11 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetMembershipsCtr1(struct ndr_pull *
 		NDR_CHECK(ndr_pull_align(ndr, 4));
 		NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->status));
 		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_memberships));
-		if (r->num_memberships < 0 || r->num_memberships > 10000) {
+		if (r->num_memberships > 10000) {
 			return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
 		}
 		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_sids));
-		if (r->num_sids < 0 || r->num_sids > 10000) {
+		if (r->num_sids > 10000) {
 			return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
 		}
 		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info_array));
@@ -4324,7 +4324,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetNT4ChangeLogRequest1(struct ndr_p
 		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
 		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
 		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
-		if (r->length < 0 || r->length > 0x00A00000) {
+		if (r->length > 0x00A00000) {
 			return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
 		}
 		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
@@ -4479,11 +4479,11 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetNT4ChangeLogInfo1(struct ndr_pull
 	if (ndr_flags & NDR_SCALARS) {
 		NDR_CHECK(ndr_pull_align(ndr, 8));
 		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length1));
-		if (r->length1 < 0 || r->length1 > 0x00A00000) {
+		if (r->length1 > 0x00A00000) {
 			return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
 		}
 		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length2));
-		if (r->length2 < 0 || r->length2 > 0x00A00000) {
+		if (r->length2 > 0x00A00000) {
 			return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
 		}
 		NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown1));
@@ -5320,7 +5320,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsWriteAccountSpnRequest1(struct ndr_p
 			r->object_dn = NULL;
 		}
 		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
-		if (r->count < 0 || r->count > 10000) {
+		if (r->count > 10000) {
 			return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
 		}
 		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_spn_names));
@@ -6217,7 +6217,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfoCtr1(struct ndr_pull *ndr,
 	if (ndr_flags & NDR_SCALARS) {
 		NDR_CHECK(ndr_pull_align(ndr, 4));
 		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
-		if (r->count < 0 || r->count > 10000) {
+		if (r->count > 10000) {
 			return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
 		}
 		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
@@ -6585,7 +6585,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfoCtr2(struct ndr_pull *ndr,
 	if (ndr_flags & NDR_SCALARS) {
 		NDR_CHECK(ndr_pull_align(ndr, 4));
 		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
-		if (r->count < 0 || r->count > 10000) {
+		if (r->count > 10000) {
 			return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
 		}
 		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
@@ -6956,7 +6956,7 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetDCInfoCtr3(struct ndr_pull *ndr,
 	if (ndr_flags & NDR_SCALARS) {
 		NDR_CHECK(ndr_pull_align(ndr, 4));
 		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
-		if (r->count < 0 || r->count > 10000) {
+		if (r->count > 10000) {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list