[SCM] Samba Shared Repository - branch v3-5-stable updated

Karolin Seeger kseeger at samba.org
Thu Apr 1 07:26:59 MDT 2010


The branch, v3-5-stable has been updated
       via  a5e9217... WHATSNEW: Update changes since 3.5.1.
       via  cefc50e... s3:winbindd: make sure we don't try rpc requests against unaccessable domains
       via  3c88f43... WHATSNEW: Update changes since 3.5.1.
       via  cc29dc6... WHATSNEW: Prepare release notes for Samba 3.5.2.
       via  b15ef56... s3: signals are processed twice in child.
       via  42e88db... Fix bug 7310 - DOS attribute inconsistency with MS Office
       via  506caa5... s3:registry: eliminate race condition in creating/scanning sorted subkeys
       via  879d21a... s3:make "net conf addshare" atomic by wrapping all writes in one transaction
       via  e527d5f... s3: Remove the unused parameter "persistent" from fetch_locked_internal (cherry picked from commit a5db27936e9c6aad99300ea46808481803f57e08)
       via  de6d05b... s3: db->persistent==true was handled earlier, make this more obvious (cherry picked from commit c7835a4845bbc7e4d340a75229866b2d4946f6eb) (cherry picked from commit a3b71fc3b903d23e0866d7c7779a96dc81450dca)
       via  a445e62... s3: Add "g_lock_do" as a convenience wrapper function (cherry picked from commit 79100c242153ea174a4405afd45cbf635da313aa) (cherry picked from commit 5423a2cc8138db852fefa133a7da53dc5abf1961)
       via  e7aee6f... s3: Fix timeout calculation if g_lock_lock is given a timeout < 60s
       via  e46c217... s3: Slightly increase parallelism in g_lock
       via  fc4aa05... s3: Avoid starving locks when many processes die at the same time
       via  bf34871... s3: Avoid a thundering herd in g_lock_unlock
       via  1c0797d... s3: Optimize g_lock_lock for a heavily contended case
       via  cca616a... s3: Fix handling of processes that died in g_lock
       via  7641f94... s3: Fix a typo (cherry picked from commit bac235dd302570850bb25194ff4bd39b6d653f0d) (cherry picked from commit 8d4a14f3aa04812cd81aa4d56b878169dc41899c)
       via  870a9edb.. Fix warning messages on compile in g_lock.c Volker & Michael please check.
       via  a93751c... s3:g_lock: remove a nested event loop, replacing the inner loop by select
       via  ca0211b... s3:ctdb_conn: add ctdbd_conn_get_fd() to get the fd out of the ctdb connection
       via  aefbeef... s3:g_lock: remove an unreached code path.
       via  02a4220... s3:dbwrap_ctdb: fix reading/storing of special key __db_sequence_number__
       via  777a4d7... s3:dbwrap_ctdb: exit early when nothing has been written in transaction_commit.
       via  1747d23... s3:dbwrap_ctdb: fix brown paperbag bug in ctdb_transaction_commit.
       via  249d7ba... s3:dbwrap_ctdb: fix logic error in pull_newest_from_marshall_buffer().
       via  c440c6b... s3:dbwrap_ctdb: fix an uninitialized variable.
       via  b4055e8... s3:dbwrap_ctdb: fix two "may be used uninitialized" warnings
       via  8d81f93... s3:dbwrap_ctdb: fix db_ctdb_fetch_db_seqnum_from_db() when NT_STATUS_NOT_FOUND.
       via  17ba211... s3:build: remove checks for deprecated ctdb controls.
       via  5e6666f... s3:dbwrap_ctdb: maintain a database sequence number that bumps in transactions
       via  a3726f3... s3:dbwrap_ctdb: change db_ctdb_transaction_store() to return NTSTATUS.
       via  8f0bb64... s3:dbwrap_ctdb: update (C)
       via  470c9cf... build: Add a configure check for CTDB_CONTROL_TRANS3_COMMIT.
       via  cb699f5... s3:dbwrap_ctdb: start rewrite of transactions using the global lock (g_lock)
       via  826d4a0... s3: Add tdb_data_equal (cherry picked from commit ebc08b9938a4d266be16ca7e06d27813952cd00f) (cherry picked from commit 3f64cba12aea87ad57bd52547f7dc312cd9e8636)
       via  f124a04... s3:torture: add a test LOCAL-DBTRANS to torture dbwrap with transactions. (cherry picked from commit dcfbe61ab0381491e19827806cb06e0822fa69e7)
       via  7bdf48e... s3: setup debug for smbtorture (cherry picked from commit b13dd17840a598ae3441e48b130a2b2a2b940572) (cherry picked from commit 139a9fdcd6c33ef10af83fd9c640ed0191670c5b)
       via  2c6819d... s3: Add ctdb_conn_msg_ctx() (cherry picked from commit 12abab711b58237ddccfa1d9bb526f8c7dbb6e9f) (cherry picked from commit 803cf6da0bb93760902e6118952d73967d6fcdff)
       via  f9c3ae1e.. s3: Implement global locks in a g_lock tdb
       via  f215147... s3-smbd: add a rate limited cleanup of brl, connections and locking db
       via  b4bfadb... s3-brlock: we don't need these MSG_SMB_UNLOCK calls now
       via  46aefa5... s3-brlock: add a minimim retry time for pending blocking locks
       via  72eab03... s3-events: make the old timed events compatible with tevent
       via  9ebd3b5... Fix bug 7307 - man net usershare mistake
       via  c19b3ec... Fix bug #7283 - vfs_acl_tdb does not work as expected.
       via  e30163d... s3:winbindd: correctly retry if the netlogon pipe gets disconnected during a logon call
       via  0cf61bc... s3:rpc_client: remove more unused code
       via  4e7bd23... s3:rpc_client: remove unused code, we handle transport failures in the transport layer now
       via  f452180... s3:winbindd_reconnect: don't only reconnect on NT_STATUS_UNSUCCESSFUL
       via  7d61648... s3:winbindd_cm: invalidate connection if cm_connect_netlogon() fails
       via  447aeef... s3:winbindd: consistently use TALLOC_FREE(conn->foo_pipe) is we create a new connection
       via  516c77f... s3:winbindd_cm: use rpccli_is_connected() helper function
       via  11f938a... s3:winbindd_cm: use cli_state_is_connected() helper function
       via  8614195... s3:rpc_client: return at least 10 sec as old timeout in rpccli_set_timeout() instead of 0
       via  1bc9848... s3:rpc_client: add set_timeout hook to rpc_cli_transport
       via  0cc6966... s3:rpc_client: add rpccli_is_connected()
       via  354a543... s3:rpc_client: don't mix layers and keep a reference to cli_state in the caller
       via  d072e66... s3:rpc_transport_np: add comment about bad usage in a destructor
       via  165e252... s3:rpc_transport_np: use cli_state_is_connected() helper
       via  5119123... s3:libsmb: add cli_state_is_connected() function
       via  236c66d... s3:libsmb: don't let cli_shutdown() segfault with a NULL cli_state
       via  4917b27... s3:rpc_transport_np: handle trans rdata like the output of a normal read
       via  796d23a... s3: Fix bug 7212, "getent group does not return group members" (cherry picked from commit f4201fb61e575d38dc102befc1efceaf809fc68b)
       via  43aa817... Fix bug 7297 - smbd crashes with CUPS printers and no [printers] share defined.
       via  1b9a59b... s3 ntlm_auth: Don't malloc data that will be talloc_free()d
       via  80179fd... Fix bug #7269 - Job management commands don't work for CUPS queues.
       via  9b4ca38... Fix bug 7075 - bug in vfs_scannedonly rmdir implementation.
       via  181194b... s3: Fix a bad memleak in winbind (cherry picked from commit 13400a6589a20452097bc338fa742d834bbd6a34)
       via  ae0e63e... s3: Fix bug 7202 for multi-threaded applications
       via  880d2b7... s3: Fix bug 7202
       via  224c700... s3-winreg: Fix _winreg_QueryValue crash bugs and implement windows behavior.
       via  d4a7e2f... s3-winreg: add some debug statements to _winreg_QueryValue().
       via  f6fa576... s3: re-run make samba3-idl.
       via  2dd35c3... winreg: fix winreg_QueryValue IDL.
       via  dd8b434... s3-printing: Fix "printer admin" functionality.
       via  631cd60... s3-spoolss: Fix value-needed calculation in_spoolss_EnumPrinterData().
       via  e746957... s3: Fix an uninitialized variable read
       via  2168ed3... s3:smbd: make sure we always have a valid talloc stackframe
       via  4fb44f9... talloc_stack: reset stackframe pointers to NULL
       via  a05f961... talloc_stack: make sure we never let talloc_tos() return ts->talloc_stack[-1]
       via  a59864d... s3-netlogon: Fix bug #7237: _netr_SamLogon segfaults for clients sending NULL domain.
       via  16531dc... s3:release-scripts: fix create-tarball to treat vendor patch level correctly (cherry picked from commit b845025daf2da85eb1af6cbfa7878cf59a32f2a6) (cherry picked from commit 95c6a5a782caa77bc8bbe75de6ca249bc255507e)
       via  d3f3694... s4-smbtorture: add --option=torture:spoolss_check_size=yes.
       via  f71d5f7... s4-smbtorture: fix smbtorture after GetPrinterData{Ex} after IDL changes.
       via  eab076a... s4-smbtorture: fix RPC-SPOOLSS-WIN after PrinterData IDL changes.
       via  20f63aa... s4-spoolss: fix dcesrv_spoolss_GetPrinterData build.
       via  f983f0c... s4-spoolss: fix spoolss_GetPrinterData implementation after IDL change.
       via  9766812... s3: re-run make samba3-idl.
       via  09d8318... s3-libads: fix get_remote_printer_publishing_data after spoolss_EnumPrinterDataEx IDL change.
       via  3d37f7d... s3-spoolss: fix _spoolss_EnumPrinterDataEx after idl
       via  41e131f... s3-rpcclient: fix rpcclient after spoolss_EnumPrinterDataEx IDL change.
       via  fd4fb5e... s3-net: fix net after spoolss_EnumPrinterDataEx IDL change.
       via  26403e5... spoolss: fix spoolss_EnumPrinterDataEx IDL.
       via  8f10a57... s3-rpcclient: fix rpcclient after spoolss_GetPrinterData{Ex} IDL change.
       via  61cfb54... s3-spoolss: fix _spoolss_GetPrinterDataEx after IDL change.
       via  4b5fb3a... spoolss: rollback GetPrinterData[Ex] IDL.
       via  de7998e... s3-rpcclient: fix rpcclient after spoolss_SetPrinterData{Ex} IDL change.
       via  c7bd9f0... s3-net: fix net after spoolss_SetPrinterData{Ex} IDL change.
       via  93755c9... s3-spoolss: fix _spoolss_SetPrinterData{Ex} after IDL change.
       via  089f2e9... spoolss: rollback SetPrinterData{Ex} IDL.
       via  f34feca... Fix bug #7234 - Symlink delete fails but incorrectly reports success to client.
       via  754a709... s3:build: Fix automatic building of vfs_tsmsm if gpfs and dmapi are present.
       via  d8e3e20... s3: Fix a NULL pointer dereference
       via  fa0e5ef... s3:winbindd: add DEBUG(10,...) for the end of each top level
       via  2daac91... vfs_netatalk: Segfault if hide files or veto files has no ".AppleDouble"
       via  bde8200... s3: Fix the build of net_afs.c with --fake-kaserver=yes, bug 7216
       via  d06bf11... mount.cifs: don't allow it to be run as setuid root program
       via  ed18be9... mount.cifs: check for invalid characters in device name and mountpoint
       via  a395811... mount.cifs: take extra care that mountpoint isn't changed during mount
       via  fc8689c... s3: net_share.c: fix argc handling
       via  46f2152... s3:ads fix dn parsing name was always null
       via  19f8470... s3:vfs_aixacl2: add missing semicolon
       via  d30ac19... s3:winbindd: never mark external domains as internal!
       via  43224c9... Second part of fix for bug #7159 - client rpc_transport doesn't cope with bad server data returns.
       via  d13c735... First part of fix for bug #7159 - client rpc_transport doesn't cope with bad server data returns.
       via  a83ad62... Fix one of the valgrind warnings from bug #6814 - Fixes for problems reported by valgrind
       via  b32fbc0... s3: Fix bug 5198 -- parse chfn(1)-change gecos field (cherry picked from commit 2ea2d2a81e0666f478c5daf1469c8447a3096e8e) (cherry picked from commit 52a3ebc3a4ec54a427e54fa331251fd495c3c6aa)
      from  647836f... WHATSNEW: Start release notes for Samba 3.5.2.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-stable


- Log -----------------------------------------------------------------
commit a5e9217d5ca9eb7697e5fa855572bb49f0e644ac
Author: Karolin Seeger <kseeger at samba.org>
Date:   Thu Apr 1 15:25:13 2010 +0200

    WHATSNEW: Update changes since 3.5.1.
    
    Karolin
    (cherry picked from commit 05bc07ccd7b7e6aa1a69c0142160fc99990fb0c1)

commit cefc50eb21060c4fab7f9a15e4c1618a1daac785
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Apr 1 09:29:38 2010 +0200

    s3:winbindd: make sure we don't try rpc requests against unaccessable domains
    
    This makes sure we don't crash while trying to dereference domain->conn.cli->foo
    while trying to establish a rpc connection to the server.
    
    This fixes bug #7316.
    
    metze
    (cherry picked from commit d930904b997d310aeff781bde1e7e3ce47dde8a1)
    (cherry picked from commit 01b60b113869f526dcf3bb478d70df21dbb207c8)

commit 3c88f438da44907ee12d17f65322c61ce6e4364b
Author: Karolin Seeger <kseeger at samba.org>
Date:   Thu Apr 1 11:32:46 2010 +0200

    WHATSNEW: Update changes since 3.5.1.
    
    Karolin
    (cherry picked from commit 5567d48e1cca30b244cdc0e6302c4f941aeb1bf5)

commit cc29dc6606bf5a6713c5a52e35e953256208a088
Author: Karolin Seeger <kseeger at samba.org>
Date:   Thu Apr 1 11:22:59 2010 +0200

    WHATSNEW: Prepare release notes for Samba 3.5.2.
    
    Karolin
    (cherry picked from commit c5b5cf35361fe4ea811a6f48a80ec63d5d4389ed)

commit b15ef56e7fdd254a145ea80c215fb342fadc61ab
Author: Bo Yang <boyang at samba.org>
Date:   Tue Feb 9 17:02:20 2010 +0800

    s3: signals are processed twice in child.
    
    Signed-off-by: Bo Yang <boyang at samba.org>
    (cherry picked from commit 8c8bb51de1ac2baa46ac0736fae12c034288e5d4)
    
    Fix bug #7206 (duplicate signal handler, signals are processed twice in child
    process).
    (cherry picked from commit 3d10185c518608c332d41e2814e49cfce47d02e6)

commit 42e88dbf2a53ba4cc4edd1576bfc1fe6308fa22c
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Mar 30 22:16:37 2010 -0700

    Fix bug 7310 - DOS attribute inconsistency with MS Office
    
    On rename we need to set the archive bit on the renamed file.
    
    Jeremy
    (cherry picked from commit 779c2052b3b13c8f1a793e59e6152c3704eb75c6)

commit 506caa5b9132b6fd20121ac47695be7bada89a2d
Author: Michael Adam <obnox at samba.org>
Date:   Mon Feb 8 11:01:47 2010 +0100

    s3:registry: eliminate race condition in creating/scanning sorted subkeys
    
    Called, from key_exists, scan_sorted_subkeys re-creates the sorted
    subkeys record of the given key and then searches through it.
    The race is that between creation and parsing of the sorted subkey
    record, another process that stores some other subkey of the same
    parent key will delete the sorted subkey record, resulting in an
    WERR_BADFILE of an operation that should actually succeed.
    
    This patch fixes the issue by wrapping the creation and parsing
    into a transaction.
    
    Michael
    (cherry picked from commit a752bbd10d661ebc93b8d51bd583eb62eb00ad18)
    
    Fix bug #7314 (registry: creation of sorted subkey record is racy (not atomic)).
    (cherry picked from commit 06d1aeb7b686b8b929cf9bff48aedc9dbb88b7c3)

commit 879d21a0db3066492a6b7830ada46623c5cd1d8b
Author: Michael Adam <obnox at samba.org>
Date:   Fri Jan 29 15:04:25 2010 +0100

    s3:make "net conf addshare" atomic by wrapping all writes in one transaction
    
    Michael
    (cherry picked from commit 09f3ed102472304d6b4446a6fab9cf6f05c9176a)
    
    Fix bug #7313 (Net conf addshare is not atomic).
    (cherry picked from commit 3ab90b2897cd4e05b21ce46e91e93609e596c80e)

commit e527d5f29b163183a10d754b038b264e423b0f2a
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Mar 5 15:30:22 2010 +0100

    s3: Remove the unused parameter "persistent" from fetch_locked_internal (cherry picked from commit a5db27936e9c6aad99300ea46808481803f57e08)
    
    The last 32 patches address bug #7232 (CTDB persistent transactions are racy).
    (cherry picked from commit f3ade095089d242484afd0f7fdbcc7826c311368)

commit de6d05b25755e2a15b269f88739e1fcc1a16cefe
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Mar 5 15:28:39 2010 +0100

    s3: db->persistent==true was handled earlier, make this more obvious (cherry picked from commit c7835a4845bbc7e4d340a75229866b2d4946f6eb)
    (cherry picked from commit a3b71fc3b903d23e0866d7c7779a96dc81450dca)

commit a445e62a5e6a4f026ecdd984c585bca4551cd109
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Mar 12 14:22:54 2010 +0100

    s3: Add "g_lock_do" as a convenience wrapper function (cherry picked from commit 79100c242153ea174a4405afd45cbf635da313aa)
    (cherry picked from commit 5423a2cc8138db852fefa133a7da53dc5abf1961)

commit e7aee6f328f07da3129b56f6491a8a6ab63fa6cf
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Feb 16 15:21:25 2010 +0100

    s3: Fix timeout calculation if g_lock_lock is given a timeout < 60s
    
    Detected while showing this code to obnox :-)
    (cherry picked from commit f8b246e44c819b909b23b4b98ef0999c84d2f4ff)
    (cherry picked from commit f73b306797f354d0a24ff8af40b05d6151e52a06)

commit e46c217efea9ed0a67fbb0aa75303be12b5e19fa
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Feb 16 12:31:58 2010 +0100

    s3: Slightly increase parallelism in g_lock
    
    There's no need to still hold the g_lock tdb-level lock while telling the
    waiters to retry
    (cherry picked from commit 83542d973ca771353109c7da4b0391d6ba910f53)
    (cherry picked from commit eb15655fe1fb71fb7145ce9f479cc112a459f72e)

commit fc4aa05714fb8c87e27f97d5bba7cbe040ba2f81
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Feb 16 12:28:53 2010 +0100

    s3: Avoid starving locks when many processes die at the same time
    
    In g_lock_unlock we have a little race between the process_exists and
    messaging_send call: We only send to 5 waiters now, they all might have died
    between us checking their existence and sending the message. This change makes
    g_lock_lock retry at least once every minute.
    (cherry picked from commit be919d6faed198cdc29322a4d9491946c0b044b3)
    (cherry picked from commit c5babceaa95fd163f785e1dfe5521b93402e06a3)

commit bf348712cf2fa98c65e22393c1d6bc3edb5f1e10
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Feb 16 12:22:08 2010 +0100

    s3: Avoid a thundering herd in g_lock_unlock
    
    Only notify the first 5 pending lock waiters. This avoids a thundering herd
    problem that is really nasty in a cluster. It also makes acquiring a lock a bit
    more FIFO, lock waiters are added to the end of the array.
    (cherry picked from commit 725b3654f831fbe0388cc09f46269903c9eef1d7)
    (cherry picked from commit 7e787c513e47875e7dbfc195d8bd1cecec3f08ce)

commit 1c0797d25d0a2454f74963d0c7a973d84ddf793e
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Feb 15 16:57:16 2010 +0100

    s3: Optimize g_lock_lock for a heavily contended case
    
    Only check the existence of the lock owner in g_lock_parse, check the rest of
    the records only when we got the lock successfully. This reduces the load on
    process_exists which can involve a network roundtrip in the clustered case.
    (cherry picked from commit 07978bd175395e0dc770f68fff5b8bd8b0fdeb51)
    (cherry picked from commit 9673c93933624ae6e02e83dae3c19351edfd301a)

commit cca616a10771d9eee4b1ff4de14a49bdfaacf867
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Feb 15 16:49:46 2010 +0100

    s3: Fix handling of processes that died in g_lock
    
    g_lock_parse might have thrown away entries from the locks array because the
    processes were not around anymore. Don't store the orphaned entries.
    (cherry picked from commit f3bdb163f461175c50b4930fa3464beaee30f4a8)
    (cherry picked from commit b2677d82dc5c6bc76b0343d90ec75972b5b2a8bf)

commit 7641f941e73f06171b7a28f7f0a2f79fb003ba30
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Feb 15 16:35:06 2010 +0100

    s3: Fix a typo (cherry picked from commit bac235dd302570850bb25194ff4bd39b6d653f0d)
    (cherry picked from commit 8d4a14f3aa04812cd81aa4d56b878169dc41899c)

commit 870a9edb56c0f0a4e31a339a1860943707f76e54
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Feb 12 22:21:19 2010 -0800

    Fix warning messages on compile in g_lock.c Volker & Michael please check.
    
    Jeremy.
    (cherry picked from commit 10e54fb422d9f1ae6d33e5fabbf8c651b0e57a8c)
    (cherry picked from commit d0ce7072bd89d11bb63b1fa976305d7087dcb9af)

commit a93751c7ec923e1ca08a0cfed4bb7e44dd8e281c
Author: Michael Adam <obnox at samba.org>
Date:   Sat Jan 23 01:17:06 2010 +0100

    s3:g_lock: remove a nested event loop, replacing the inner loop by select
    
    This made smbd crash in g_lock_lock() when trying to start a
    transaction on a db with an already started transaction,
    e.g. in a tcon_and_X where the share_info.tdb was not yet
    initialized but share_info.tdb was already locked by another
    process or writing acces to the winreg rpc pipe where the
    registry tdb was already locked by another process.
    
    What we really _want_ to do here by design is to react to
    MSG_DBWRAP_G_LOCK_RETRY messages that are either sent
    by a client doing g_lock_unlock or by ourselves when
    we receive a CTDB_SRVID_SAMBA_NOTIFY or
    CTDB_SRVID_RECONFIGURE message from ctdbd, i.e. when
    either a client holding a lock or a complete node
    has died.
    
    Doing this properly involves calling tevent_loop_once(),
    but doing this here with the main ctdbd messaging context
    creates a nested event loop when g_lock_lock() is called
    from the main event loop.
    
    So as a quick fix, we act a little corasely here: we do
    a select on the ctdb connection fd and when it is readable
    or we get EINTR, then we retry without actually parsing
    any ctdb packages or dispatching messages. This means that
    we retry more often than necessary and intended by design,
    but this does not harm and it is unobtrusive. When we have
    finished, the main loop will pick up all the messages and
    ctdb packets. The only extra twist is that we cannot use
    timed events here but have to handcode a timeout for select.
    
    Michael
    (cherry picked from commit 83fffbeb44441a87569e543054af21d975eb20ae)
    (cherry picked from commit 0a030b0de66e84f35637699377e44a083c445fa2)

commit ca0211b9c97d50ce504fd22911288f6656088268
Author: Michael Adam <obnox at samba.org>
Date:   Sat Jan 23 00:05:15 2010 +0100

    s3:ctdb_conn: add ctdbd_conn_get_fd() to get the fd out of the ctdb connection
    
    Michael
    (cherry picked from commit e4af0bc5af2c3ee025ca7fac251c3672ba2c8dd5)
    (cherry picked from commit 84505cb3157d23b6df170bf694cd6adecc1fe9f5)

commit aefbeef9f6009bf2a2df4296c6bfe98fb7f68b41
Author: Michael Adam <obnox at samba.org>
Date:   Fri Jan 22 15:56:28 2010 +0100

    s3:g_lock: remove an unreached code path.
    
    Michael
    (cherry picked from commit 8e306b51b79d3dacd68be9f13aa8455e2eb4c03f)
    (cherry picked from commit 77e4a72902856cd6c1f635dc3a952f846522b7d0)

commit 02a422096e8829d31d99570e9614caf1e133087c
Author: Michael Adam <obnox at samba.org>
Date:   Mon Jan 18 17:26:04 2010 +0100

    s3:dbwrap_ctdb: fix reading/storing of special key __db_sequence_number__
    
    The key for reading and writing was inconsistent due to a
    off by one data length.
    
    Michael
    (cherry picked from commit 1933214108d1a71bc6473a696ce35020a427d8f4)
    (cherry picked from commit c17daced42b3ea78fa8e6f6afc8c2550cac53ca0)

commit 777a4d7e7818155c13ed733a94472e8a6bc369b9
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jan 13 23:53:54 2010 +0100

    s3:dbwrap_ctdb: exit early when nothing has been written in transaction_commit.
    
    This skips update of the __db_sequence_number__ record when nothing else has
    been written. There are transactions that are just openend and then nothing
    is written until transaction_commit is called. This is for instance the case
    with registry initialization routines: They start a transaction and only
    write somthing when the registry has not been initialized yet.
    So this change will skip many db_seqnum bumps and TRANS3_COMMIT roundtrips.
    
    Michael
    (cherry picked from commit c311697aded87ce624d40cbf14e05d6e6377c257)
    (cherry picked from commit 6f325fb6b092da554180218d1cbb42181f90bbfa)

commit 1747d23a5525c2a4e8060bff737ef7dd79678a0b
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jan 13 23:51:34 2010 +0100

    s3:dbwrap_ctdb: fix brown paperbag bug in ctdb_transaction_commit.
    
    I carefully prepared the return value only to "return 0;" at the bottom. :-(
    This may well have hit us for instance in the nested cancel case
    and produced random errors.
    
    Michael
    (cherry picked from commit 1d594bd734a2f7146ed52872456a16c5e41816f1)
    (cherry picked from commit 7fc2b612b8f77751effadcd53800c96e83e76418)

commit 249d7bab417a51fbdc1b84c5d84aa81ccdb3e94b
Author: Michael Adam <obnox at samba.org>
Date:   Wed Jan 6 00:37:21 2010 +0100

    s3:dbwrap_ctdb: fix logic error in pull_newest_from_marshall_buffer().
    
    The logic bug was that if a record was found in the marshall buffer,
    then always the ctdb header of tha last record in the marshall buffer
    was returned, and not the ctdb header of the last occurrence of the
    requested record.
    
    This is fixed by introducing an additional temporary variable.
    
    Michael
    (cherry picked from commit 524072b56bf659002410a817749bf86fe6f51e83)
    (cherry picked from commit e5cc0e718863d6cfaa59fbb4cac7d9b70fba0381)

commit c440c6ba9fc2f4da4d1452014e0f196efb6fd0c2
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jan 5 16:17:27 2010 +0100

    s3:dbwrap_ctdb: fix an uninitialized variable.
    
    Michael
    (cherry picked from commit 1505b69dea6044a13a59f672e22f5833256cb981)
    (cherry picked from commit 89cb10de5ec46384c5ae8d558ac29e4f9e00e8a1)

commit b4055e8baca43293257aed7291eef951a05ca754
Author: Michael Adam <obnox at samba.org>
Date:   Sat Dec 12 00:38:14 2009 +0100

    s3:dbwrap_ctdb: fix two "may be used uninitialized" warnings
    
    Michael
    (cherry picked from commit fb981cdb8282d3b9b46d9ca515a5685add232a72)
    (cherry picked from commit dfbc45f6d6ef2fb99652992e291b1bf5276dec28)

commit 8d81f930dbf5c076956be844af87d78232ce07ec
Author: Michael Adam <obnox at samba.org>
Date:   Sat Dec 12 00:30:37 2009 +0100

    s3:dbwrap_ctdb: fix db_ctdb_fetch_db_seqnum_from_db() when NT_STATUS_NOT_FOUND.
    
    Don't treat this as an error but return seqnum 0 instead.
    
    Michael
    (cherry picked from commit 10a44ee6930bb51b4b20ce42f35bc455ac1b7293)
    (cherry picked from commit 8926082d096b2a6e8688b1668bd7293632ebb508)

commit 17ba211072e629eb1692e6b1b942b0857cab7c70
Author: Michael Adam <obnox at samba.org>
Date:   Fri Dec 11 16:45:38 2009 +0100

    s3:build: remove checks for deprecated ctdb controls.
    
    Michael
    (cherry picked from commit 9113ce82b59c718ac709eb01b125e9e6746a96b7)
    (cherry picked from commit ffaa072801d94ffcac837e77ff9e6538ba335150)

commit 5e6666ff391b10ed9454fc8cba3c6795f3e2e036
Author: Michael Adam <obnox at samba.org>
Date:   Fri Dec 11 14:07:28 2009 +0100

    s3:dbwrap_ctdb: maintain a database sequence number that bumps in transactions
    
    For persistent databases, 64bit integer is kept in a special record
    __db_sequence_number__. This record is incremented with each completed
    transaction.
    
    The retry mechanism for failing TRANS3_COMMIT controls inside the
    db_ctdb_transaction_commit() function now relies one a modified
    behaviour of ctdbd's treatment of persistent databases in recoveries.
    Recently, a special treatment for persistent databases had been
    introduced in ctdb (1.0.108) to work around the problems with the
    orinal design of persistent transactions.
    Now with the rewrite we need to revert to the old behaviour that
    ctdb always takes the newest copies of all records.
    
    This change also paves the way for a next step, which will make
    recovery use the db seqnum to tell which node has the newest copy
    of a persistent db and use that node's copy. This will greatly
    reduce the amount of data transferred with each recovery.
    
    Michael
    (cherry picked from commit 3fe7ce141d6afe3825b06c5feb90558911e4df1e)
    (cherry picked from commit cfdf2d76878ee1ba32b2cb89f9ed740386990530)

commit a3726f340eb211dfbac3929ad36496de2ac836dc
Author: Michael Adam <obnox at samba.org>
Date:   Fri Dec 11 12:30:57 2009 +0100

    s3:dbwrap_ctdb: change db_ctdb_transaction_store() to return NTSTATUS.
    
    The return values calculated by the callers were wrong anyways since
    the new marshalling code does not set the local tdbs tdb error code.
    
    Michael
    (cherry picked from commit 26225d3e798892b39b3c238b0bee465bffac6550)
    (cherry picked from commit 06943fe1e6982c9df4886ee0a17572e502726897)

commit 8f0bb64c2cf698439ec7f0cb859f55f0d8158a4f
Author: Michael Adam <obnox at samba.org>
Date:   Fri Dec 11 10:35:50 2009 +0100

    s3:dbwrap_ctdb: update (C)
    
    Michael
    (cherry picked from commit 5a0c42770b349877928a2b3fd8316903dd62e5b7)
    (cherry picked from commit 60aabc946ed981efe7e37bb2b39307e82dd20fcc)

commit 470c9cf7ee818acbd0e97473264596910c751bcc
Author: Michael Adam <obnox at samba.org>
Date:   Fri Dec 4 11:49:21 2009 +0100

    build: Add a configure check for CTDB_CONTROL_TRANS3_COMMIT.
    
    This is the new implementation of ctdb transactions using the
    global lock feature. It is needed by the current dbwrap_ctdb code.
    
    Michael
    (cherry picked from commit d4c0afa841ecdae1cab955cc73360deae23f5873)
    (cherry picked from commit ea3c4c96e0fd1f2165282589becb12bfb40700d3)

commit cb699f51acdf6e1f7d7583647e42a9d8a5b615d5
Author: Michael Adam <obnox at samba.org>
Date:   Thu Dec 3 17:29:54 2009 +0100

    s3:dbwrap_ctdb: start rewrite of transactions using the global lock (g_lock)
    
    This simplifies the transaction code a lot:
    
    * transaction_start essentially consists of acquiring a global lock.
    
    * No write operations at all are performed on the local database
      until the transaction is committed: Every store operation is just
      going into the marshall buffer.
    
    * The commit operation calls a new simplified TRANS3_COMMIT control
      in ctdb which rolls out thae changes to all nodes including the
      node that is performing the transaction.
    
    Michael
    (cherry picked from commit 16bc6ba2268e3660d026076264de8666356e00bf)
    (cherry picked from commit c2354aa193617ffc3e4036fe0b9034c2664901fd)

commit 826d4a0069ad369fe2a71170839f69834b183114
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Dec 3 18:43:49 2009 +0100

    s3: Add tdb_data_equal (cherry picked from commit ebc08b9938a4d266be16ca7e06d27813952cd00f)
    (cherry picked from commit 3f64cba12aea87ad57bd52547f7dc312cd9e8636)

commit f124a041590cd410e344c339707ce43c8b8c1a7e
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Dec 11 15:37:52 2009 +0100

    s3:torture: add a test LOCAL-DBTRANS to torture dbwrap with transactions.
    (cherry picked from commit dcfbe61ab0381491e19827806cb06e0822fa69e7)

commit 7bdf48ec709b7e805676f791ddb13c9950572c6e
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Dec 7 00:36:51 2009 +0100

    s3: setup debug for smbtorture (cherry picked from commit b13dd17840a598ae3441e48b130a2b2a2b940572)
    (cherry picked from commit 139a9fdcd6c33ef10af83fd9c640ed0191670c5b)

commit 2c6819df67eae05d77579c08e683fc2c9990e03a
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Dec 4 13:22:30 2009 +0100

    s3: Add ctdb_conn_msg_ctx() (cherry picked from commit 12abab711b58237ddccfa1d9bb526f8c7dbb6e9f)
    (cherry picked from commit 803cf6da0bb93760902e6118952d73967d6fcdff)

commit f9c3ae1e17b109bd6d7832b5316dda1c688e0a5f
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Oct 25 16:12:12 2009 +0100

    s3: Implement global locks in a g_lock tdb
    
    This is the basis to implement global locks in ctdb without depending on a
    shared file system. The initial goal is to make ctdb persistent transactions
    deterministic without too many timeouts.
    (cherry picked from commit 4c1c3f2549f32fd069e0e7bf3aec299213f1e85b)
    (cherry picked from commit 98873e0d6a38abdcaed48af6504a9a39a23ae027)

commit f215147364f6c39e44d3a986a03214c294946197
Author: Andrew Tridgell <tridge at samba.org>
Date:   Fri Feb 5 21:08:56 2010 -0800

    s3-smbd: add a rate limited cleanup of brl, connections and locking db
    
    On unclean shutdown we can end up with stale entries in the brlock,
    connections and locking db. Previously we would do the cleanup on
    every unclean exit, but that can cause smbd to be completely
    unavailable for several minutes when a large number of child smbd
    processes exit.
    
    This adds a rate limited cleanup of the databases, with the default
    that cleanup happens at most every 20s
    (cherry picked from commit dd498d2eecf124a03b6117ddab892a1112f9e9db)
    
    The last 4 patches address bug #7312 (Many disconnecting clients renders
    clustered samba unusuable for some time).
    (cherry picked from commit 675c4b5522394e4431a88d9ab7647ca24765feb6)

commit b4bfadbf5132d0fe63c8c521f18531df9a09a150
Author: Andrew Tridgell <tridge at samba.org>
Date:   Fri Feb 5 21:02:24 2010 -0800

    s3-brlock: we don't need these MSG_SMB_UNLOCK calls now
    
    These have been replaced with the min timeout in blocking.c
    (cherry picked from commit 74267d652485cdcb711f734f0d80da0fb1495867)
    (cherry picked from commit 6a78929fd0543e027912346c30e6208b4a1f4362)

commit 46aefa59915d2d39d46d84fac9d1e6da876acbf1
Author: Andrew Tridgell <tridge at samba.org>
Date:   Fri Feb 5 20:59:43 2010 -0800

    s3-brlock: add a minimim retry time for pending blocking locks
    
    When we are waiting on a pending byte range lock, another smbd might
    exit uncleanly, and therefore not notify us of the removal of the
    lock, and thus not trigger the lock to be retried.
    
    We coped with this up to now by adding a message_send_all() in the
    SIGCHLD and cluster reconfigure handlers to send a MSG_SMB_UNLOCK to
    all smbd processes. That would generate O(N^2) work when a large
    number of clients disconnected at once (such as on a network outage),
    which could leave the whole system unusable for a very long time (many
    minutes, or even longer).
    
    By adding a minimum re-check time for pending byte range locks we
    avoid this problem by ensuring that pending locks are retried at a
    more regular interval.
    (cherry picked from commit 5b398edbee672392f2cea260ab17445ecca927d7)
    (cherry picked from commit aa9ab3ea57808b8e227c960b442911219405f1bf)

commit 72eab0330322677e773ea8d5ecc4ba23ab8b3257
Author: Andrew Tridgell <tridge at samba.org>
Date:   Fri Feb 5 19:14:45 2010 -0800

    s3-events: make the old timed events compatible with tevent
    
    tevent ensures that a timed event is only called once. The old events
    code relied on the called handler removing the event itself. If the
    handler removed the event after calling a function which invoked the
    event loop then the timed event could loop forever.
    
    This change makes the two timed event systems more compatible, by
    allowing the handler to free the te if it wants to, but ensuring it is
    off the linked list of events before the handler is called, and
    ensuring it is freed even if the handler doesn't free it.
    (cherry picked from commit 5dbf175c75bd6139f3238f36665000641f7f7f79)
    (cherry picked from commit 380e86e0f9c9314f4f69528227668dbbb222b144)

commit 9ebd3b5ae08a7afa7a3a168f65cc8a8a4ef8457c
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Mar 29 14:24:18 2010 -0700

    Fix bug 7307 - man net usershare mistake
    
    Fix bad usage message, reported by headset001 at yahoo.com.
    
    Jeremy.
    (cherry picked from commit e14a6fbf8c9e4d16b2727e48c708ceccfd157e59)
    (cherry picked from commit 9620f5fbe64910d86cae51345156a1a4dd71e231)

commit c19b3ec2573d8f7f5206d816fa0d227a68d1e2f0
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Mar 24 10:02:18 2010 -0700

    Fix bug #7283 - vfs_acl_tdb does not work as expected.
    
    both vfs_acl_common.c and vfs_acl_tdb.c were using the connection
    handle, thus conflicted. Fix this.
    
    Jeremy.
    (cherry picked from commit 12a5c447dbdbcfb74438270e5fc9189388e5d18a)

commit e30163d4e9820e2809f55ca8d8254b4d7032cad9
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Mar 29 22:03:55 2010 +0200

    s3:winbindd: correctly retry if the netlogon pipe gets disconnected during a logon call
    
    This fixes hopefully the last part of bug #7295.
    
    metze
    (cherry picked from commit 4c6cde99c0751a073120d8bc36d40922d8027344)
    (cherry picked from commit 482518fcafb18bda1f084ebf1906a2ad02436b80)

commit 0cf61bc8b407011c1f3a0f2f9b4772b1c6ae9d63
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Mar 25 15:54:29 2010 +0100

    s3:rpc_client: remove more unused code
    
    metze
    (cherry picked from commit cac9981b1a88a37c703a76a951b0691fa4ba7b4b)
    (cherry picked from commit 877c6d0cf99dfe642f2c8dc733e075768aab2d95)

commit 4e7bd23dd8c8dd9b2bffc02bff670ef90d487670
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Mar 25 15:29:05 2010 +0100

    s3:rpc_client: remove unused code, we handle transport failures in the transport layer now
    
    metze
    (cherry picked from commit 13cf592bb8478453dccd4d78bdb4dabec7aeddc2)
    (cherry picked from commit 86cbe6f85a732601b18f97b143976cbf92f56467)

commit f4521808598705f33959cf16b65b26f5c72801e8
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Mar 29 16:31:13 2010 +0200

    s3:winbindd_reconnect: don't only reconnect on NT_STATUS_UNSUCCESSFUL
    
    metze
    (cherry picked from commit 6bd5a2a3739938f95fce23ab2da652c9b5a48111)
    (cherry picked from commit 169628fcb656ba5987a99bd50c7f588b731eae51)

commit 7d61648988c51e14c982ea9864c85503c491d11e
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Mar 25 15:25:47 2010 +0100

    s3:winbindd_cm: invalidate connection if cm_connect_netlogon() fails
    
    metze
    (cherry picked from commit 94a4bcd2f0c0464e192556679c6636639cb307ea)
    (cherry picked from commit c046ae8428fb62ff2749689e7c738f1a2e8f8251)

commit 447aeef011ebc622175caa7506606a2163ed24b6
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Mar 25 15:17:07 2010 +0100

    s3:winbindd: consistently use TALLOC_FREE(conn->foo_pipe) is we create a new connection
    
    metze
    (cherry picked from commit 4f391fedac7111683d13f2d79fee7c0dbc27f86e)
    (cherry picked from commit c462e54142c00fdd81c2847d16a75119b1cc89fc)

commit 516c77f6fa2ccdba731431db6432c14b5c4690f7
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Mar 25 15:15:57 2010 +0100

    s3:winbindd_cm: use rpccli_is_connected() helper function
    
    metze
    (cherry picked from commit d980c06a994d032a833adc8d56d2f2c037f8fdaf)
    (cherry picked from commit aa7d54ed04585a183a88363406ed7f3244b24d85)

commit 11f938abaf899956fd3eded416ea1b9880cf24a5
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Mar 25 15:14:02 2010 +0100

    s3:winbindd_cm: use cli_state_is_connected() helper function
    
    metze
    (cherry picked from commit 408a3eb35a0e61b5d66a3b48ebbd1a6796672d0f)
    (cherry picked from commit 00a93190d2cae31cd2213b810ea348c055670399)

commit 8614195230d8de7d9bd5b16f422dbfe984076e07
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sun Mar 28 19:34:34 2010 +0200

    s3:rpc_client: return at least 10 sec as old timeout in rpccli_set_timeout() instead of 0
    
    metze
    (cherry picked from commit 3e70da3f470eeb122f95477fb48d89939f501b3e)
    (cherry picked from commit 60861fba533027b6c9a0ff704b95dcf631ea3ca3)

commit 1bc98483c2397b8d245195a255720cdfa23c789a
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Mar 25 15:51:51 2010 +0100

    s3:rpc_client: add set_timeout hook to rpc_cli_transport
    
    metze
    (cherry picked from commit 99664ad15460530b6fb44957b6c57823f09884bf)
    (cherry picked from commit 89164eb8363ffc0b951256578be48d37ddba46b1)

commit 0cc696632675435f2ffae7d6db37961cf0c357f3
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Mar 25 15:00:38 2010 +0100

    s3:rpc_client: add rpccli_is_connected()
    
    metze
    (cherry picked from commit 4f41b53487ac9bc96c7960e8edab464558656373)
    (cherry picked from commit 958b49323968740e2cbf69dc2a0a5dd57d5bcf87)

commit 354a543657b5b312441ceeb409fdbbf1a26298e3
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Mar 29 14:58:19 2010 +0200

    s3:rpc_client: don't mix layers and keep a reference to cli_state in the caller
    
    We should not rely on the backend to have a reference to the cli_state.
    This will make it possible for the backend to set its cli_state reference
    to NULL, when the transport is dead.
    
    metze
    (cherry picked from commit dc09b12681ea0e6d4c2b0f1c99dfeb1f23019c65)
    (cherry picked from commit 1e2e47da82aeb249dce431541738a62cb139aebb)

commit d072e664476fa3bd9132dca1cd464441817b73c0
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Mar 25 14:10:25 2010 +0100

    s3:rpc_transport_np: add comment about bad usage in a destructor
    
    metze
    (cherry picked from commit 5f8fc63515a02aaf55719cb8d3be8ce695178fe9)
    (cherry picked from commit 8d576661d15f1c032a4fe17ed03bfeb376039bdb)

commit 165e2527e779230961c04f8f4647c7776aa2ab57
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Mar 25 14:08:42 2010 +0100

    s3:rpc_transport_np: use cli_state_is_connected() helper
    
    metze
    (cherry picked from commit b862351da8624df893ec77e020a456c1d23c58ed)
    (cherry picked from commit 8c2f4426ce178ac33748cfba01532ec2fd205710)

commit 511912370a82111a49307e00ddc6e901e9d55600
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Mar 25 13:20:56 2010 +0100

    s3:libsmb: add cli_state_is_connected() function
    
    metze
    (cherry picked from commit d7bf30ef92031ffddcde3680b38e602510bcae24)
    (cherry picked from commit 956514c98975d152c6ab50e0ee2d88971aa06f55)

commit 236c66dde66815dac8add3ef5c4e23e717c2759c
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Mar 29 18:23:40 2010 +0200

    s3:libsmb: don't let cli_shutdown() segfault with a NULL cli_state
    
    metze
    (similar to commit 47e10ab9a85960c78af807b66b99bcd139713644)
    (cherry picked from commit 85aae5e96363d0b5b03d31fb36465121d3381cb2)

commit 4917b2729632e2ab563e1e58211e17051474888d
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Feb 20 09:08:16 2010 +0100

    s3:rpc_transport_np: handle trans rdata like the output of a normal read
    
    Inspired by bug #7159.
    
    metze
    (cherry picked from commit 911287285cc4c8485b75edfad3c1ece901a69b0b)
    (cherry picked from commit e2739a2bf37e654c37cbea6e510f63a7ce4adfea)

commit 796d23a9568319089265b70985b4715f36e5f847
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Mar 29 16:59:48 2010 +0200

    s3: Fix bug 7212, "getent group does not return group members"
    (cherry picked from commit f4201fb61e575d38dc102befc1efceaf809fc68b)

commit 43aa817ad6990b3398b0f351655bcb4225e2b353
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Mar 25 17:09:23 2010 -0700

    Fix bug 7297 - smbd crashes with CUPS printers and no [printers] share defined.
    
    Ensure we don't dereference an array with an index of -1.
    
    Jeremy.
    (cherry picked from commit e4127ab299e654777c43d983b2e0a158baa7d79a)

commit 1b9a59bf28ccf0e3d9f9f22e824d69d1004c38e4
Author: Kai Blin <kai at samba.org>
Date:   Thu Mar 25 22:22:56 2010 +0100

    s3 ntlm_auth: Don't malloc data that will be talloc_free()d
    
    This fixes bug #7290
    Thanks to Mohan <mohann at silver-peak.com> for the bug report.
    (cherry picked from commit 66565a364afe6336773acab35b96b8e74da078b3)

commit 80179fd40c0bc4cf24df9a562cba0e6f1717d3ec
Author: Michael Karcher <samba at mkarcher.dialup.fu-berlin.de>
Date:   Wed Mar 24 17:33:21 2010 -0700

    Fix bug #7269 - Job management commands don't work for CUPS queues.
    
    Samba needs to retrieve pjob->sysjob from the CUPS response (as
    is done in the iprint backend).
    (cherry picked from commit 1790e88f0f9c4fae90dcb53101f70c97ba6a6a5d)

commit 9b4ca386937665df69ad2251c0bb817d93323d10
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Feb 4 16:23:32 2010 -0800

    Fix bug 7075 - bug in vfs_scannedonly rmdir implementation.
    
    Check for NULL on opendir, correctly call next rmdir.
    
    Jeremy.
    (cherry picked from commit 39fad1417eefe69712fd1a805a41dcfe0d34fdf1)

commit 181194b77d570a785d41aee451a2b3bda8b2621b
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Mar 22 15:29:19 2010 +0100

    s3: Fix a bad memleak in winbind
    (cherry picked from commit 13400a6589a20452097bc338fa742d834bbd6a34)
    
    Fix bug #7278 (winbind has a bad memleak).
    (cherry picked from commit 75a0354420e5ad8cb668b7602f97e62d1097d720)

commit ae0e63e6e89049dc4bda3083884f6cfa5fc14afe
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Mar 21 17:49:06 2010 +0100

    s3: Fix bug 7202 for multi-threaded applications
    
    Thanks to Sergey Tereschenko <serg.partizan at gmail.com> for providing good
    feedback!
    
    Volker
    (cherry picked from commit 68ea9765177f1c343750d9a5d199ec5af52b9678)

commit 880d2b79be4d3e2e7f973cf76d6a41427afaea9c
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Mar 20 15:23:17 2010 +0100

    s3: Fix bug 7202
    
    Make sure _nss_wins_gethostbyname_r has a talloc stackframe available
    
    Thanks to Sergey Tereschenko <serg.partizan at gmail.com> for reporting the bug!
    
    Volker
    (cherry picked from commit 3c68414b2fe1e8db66469b4b6374b26b5fe9fbcb)

commit 224c7005144ea4835edcd92973cd185a88fbb8bb
Author: Günther Deschner <gd at samba.org>
Date:   Thu Mar 11 12:21:08 2010 +0100

    s3-winreg: Fix _winreg_QueryValue crash bugs and implement windows behavior.
    
    Found by RPC-WINREG smbtorture test.
    
    Guenther
    (cherry picked from commit cddc542ba5f30316ff4ee8fa591a54808b7be4c8)
    
    The last 4 patches address bug #7258 (NULL pointer derref crash in
    _winreg_QueryValue).
    (cherry picked from commit 55436299da49d995a2d9b3d7b702122ebb2ce156)

commit d4a7e2fae741d7d446412ef215170a31d31c9339
Author: Günther Deschner <gd at samba.org>
Date:   Wed Mar 10 14:17:23 2010 +0100

    s3-winreg: add some debug statements to _winreg_QueryValue().
    
    Guenther
    (cherry picked from commit c5ba525748fdab6b182e35673983719b7c235127)
    (cherry picked from commit 6740503b0bace52d09d2a306f8da8b168c2e7ab0)

commit f6fa576e4eb3d78932a783b5ebf3641e6fe13a53
Author: Günther Deschner <gd at samba.org>
Date:   Wed Mar 17 12:06:39 2010 +0100

    s3: re-run make samba3-idl.
    
    Guenther
    (cherry picked from commit bd3a8505a90eac76b61b354dfc9565c69c164e95)

commit 2dd35c3f47a8cbe01495646c4fac4b1726974a5d
Author: Günther Deschner <gd at samba.org>
Date:   Fri Mar 5 21:56:50 2010 +0100

    winreg: fix winreg_QueryValue IDL.
    
    Note that before this change pidl generated code that just dereferenced size_is
    and length_is values from unique pointers without checking whether these
    pointers were actually NULL.
    
    With this change, pidl now throws a warning like:
    
    	warning: Got pointer for `data_size', expected fully derefenced variable
    
    which is not correct, probably because pidl does not evaluate the C expression.
    
    Guenther
    (cherry picked from commit f258e98e177f0f75bab99654b9f32b10bb7ce37f)
    (cherry picked from commit f9a52643a5665efd5b11733179e574e3d0282e8b)

commit dd8b43413dcc12f53940760e7b176997c065dabc
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Mar 18 11:21:15 2010 +0100

    s3-printing: Fix "printer admin" functionality.
    
    Fix bug #7255 ("printer admin" parameter does not work as expected).
    (cherry picked from commit 0d6d068bc4f76c2816f969fcce6013e1945794d4)
    (cherry picked from commit e74ced9f90ade37fa7bd179a91803f775c77e25b)

commit 631cd600844d89e7622eeb354fcd17ac8af3eae2
Author: Günther Deschner <gd at samba.org>
Date:   Tue Mar 16 10:30:04 2010 +0100

    s3-spoolss: Fix value-needed calculation in_spoolss_EnumPrinterData().
    
    Guenther
    
    Fix bug #7256 (incorrect value-needed calculation in
    _spoolss_EnumPrinterData()).
    (cherry picked from commit 400801c2314c5effd5165e77cdefc833dee1b6b2)

commit e746957ec88e34b6c0499ad888172e39231746c0
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Mar 14 21:18:34 2010 +0100

    s3: Fix an uninitialized variable read
    
    Found by Laurent Gaffie <laurent.gaffie at gmail.com>
    
    Thanks for that,
    
    Volker
    
    Fix bug #7254 (An uninitialized variable read could cause an smbd crash).
    (cherry picked from commit 9280051bfba337458722fb157f3082f93cbd9f2b)

commit 2168ed3fe979d3a0be88ebe443d3842860c53e78
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Mar 15 14:42:17 2010 +0100

    s3:smbd: make sure we always have a valid talloc stackframe
    
    metze
    (cherry picked from commit 386f15c62bb4d3517de719c750252e06cf3b1fb1)
    
    Last 3 patches address bug #7251 (Segfault in DEBUG(2,("waiting for
    connections...)
    (cherry picked from commit 6bda49023a9e748776438cfc419a2ed7afd78920)

commit 4fb44f9106dfda85759d9c3d6859198008529b1b
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Mar 15 14:39:11 2010 +0100

    talloc_stack: reset stackframe pointers to NULL
    
    This makes it easier to debug the code in future.
    
    metze
    (cherry picked from commit d23581b4d7a4936002c1d2d748836aead9215120)
    (cherry picked from commit 29eb47bdaf9a80e819c30e4c1fac9d07040d32bc)

commit a05f9615840de80dad216348fc3c7678911802d9
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Mar 15 14:32:52 2010 +0100

    talloc_stack: make sure we never let talloc_tos() return ts->talloc_stack[-1]
    
    In smbd there's a small gab between TALLOC_FREE(frame); before
    we call smbd_parent_loop() where we don't have a valid talloc stackframe.
    
    smbd_parent_loop() calls talloc_stackframe() only within the while(1) loop.
    As DEBUG(2,("waiting for connections")) uses talloc_tos() to construct
    the time header for the debug message we crash on some systems.
    
    metze
    (cherry picked from commit 10ed809a1a31be50ce09142eb99b3a243ae8b940)
    (cherry picked from commit 0c0e54cbb967150b91b3d83fb75c8c971875cb21)

commit a59864d90b061909b96d6876a24e0a0a3e9d38b8
Author: Günther Deschner <gd at samba.org>
Date:   Fri Mar 12 00:30:52 2010 +0100

    s3-netlogon: Fix bug #7237: _netr_SamLogon segfaults for clients sending NULL domain.
    
    Thanks to Marc Muehlfeld <muehlfeld at medizinische-genetik.de>.
    
    Guenther
    (cherry picked from commit eb81e0d732a327a555091e16dce91dd75ffd5092)

commit 16531dc613fc875aa377b2575f6b2bf1748c4a92
Author: Michael Adam <obnox at samba.org>
Date:   Mon Mar 8 23:37:21 2010 +0100

    s3:release-scripts: fix create-tarball to treat vendor patch level correctly
    (cherry picked from commit b845025daf2da85eb1af6cbfa7878cf59a32f2a6)
    (cherry picked from commit 95c6a5a782caa77bc8bbe75de6ca249bc255507e)

commit d3f3694b054dbcd5b3473ce4d1fa7599332f9d89
Author: Günther Deschner <gd at samba.org>
Date:   Fri Feb 19 14:25:19 2010 +0100

    s4-smbtorture: add --option=torture:spoolss_check_size=yes.
    
    This disables the size calculation comparison by default.
    
    Guenther
    (cherry picked from commit f2ecec3dcdafd63cd72d13019a998bf99539a9ba)
    
    The last 18 patches address bug #6727 (Printer issues on 3.4.x).
    (cherry picked from commit a7bb1455a12084ce7400507bc6351f7dead14c0a)

commit f71d5f75f7dd6037f6bc8d952011816ab0bfd43e
Author: Günther Deschner <gd at samba.org>
Date:   Thu Mar 4 22:40:31 2010 +0100

    s4-smbtorture: fix smbtorture after GetPrinterData{Ex} after IDL changes.
    
    Guenther
    (cherry picked from commit 4be0bf13f019543c5cc0afc7b4bf074f23421f9c)

commit eab076af34ab09429adc09b9e036cd10a029172b
Author: Günther Deschner <gd at samba.org>
Date:   Fri Mar 5 20:32:16 2010 +0100

    s4-smbtorture: fix RPC-SPOOLSS-WIN after PrinterData IDL changes.
    
    Guenther
    (cherry picked from commit 58c9070746a3e0725f5d3a3ce6deda8fad0c5974)
    (cherry picked from commit 71a9d145d365d09588ecea1ad8a53535c3638b4f)

commit 20f63aa00b2cc4f5a09b531ddad22f0b814ac74c
Author: Günther Deschner <gd at samba.org>
Date:   Fri Mar 5 16:34:17 2010 +0100

    s4-spoolss: fix dcesrv_spoolss_GetPrinterData build.
    
    really not my day today...
    
    Guenther
    (cherry picked from commit 91ff11d50458a951ab0adc9b37bcb0ef4ee09e15)
    (cherry picked from commit 1fef62b5b8688984e00c4271d08d08aff9c27dd2)

commit f983f0c97bb1182d97b59e3e05d2cebb2b8d6974
Author: Günther Deschner <gd at samba.org>
Date:   Thu Mar 4 18:21:50 2010 +0100

    s4-spoolss: fix spoolss_GetPrinterData implementation after IDL change.
    
    Guenther
    (cherry picked from commit ae74c1cf66ca463026a3cb68aa040c9df18a87b8)

commit 97668127c48056ad62d8ca36b59ab1e20f8dbda6
Author: Günther Deschner <gd at samba.org>
Date:   Fri Mar 5 17:17:49 2010 +0100

    s3: re-run make samba3-idl.
    
    Guenther
    (cherry picked from commit ffbc52150d7e2101da05fafd7ce8ed16967db253)

commit 09d831877d35a4c1577097585f448480bd0ca4ed
Author: Günther Deschner <gd at samba.org>
Date:   Thu Mar 4 17:58:49 2010 +0100

    s3-libads: fix get_remote_printer_publishing_data after spoolss_EnumPrinterDataEx IDL change.
    
    Guenther
    (cherry picked from commit 8e6dd25391d77b69859a3b622a1b116fa8000a40)
    (cherry picked from commit 6c01c8108b6d196415d056e185458a1bf0be592d)

commit 3d37f7d7ed34bd557d41d7e88140db4e00ed5a9f
Author: Günther Deschner <gd at samba.org>
Date:   Thu Mar 4 16:47:33 2010 +0100

    s3-spoolss: fix _spoolss_EnumPrinterDataEx after idl
    
    Guenther
    (cherry picked from commit 55326549852a3ab1114a8cb1536578ae02183eb8)
    (cherry picked from commit e1527e2c4ed276b3821c1d8157ef0cb512ce5c64)

commit 41e131f5213b098a0453d13c3ef17b735b215f31
Author: Günther Deschner <gd at samba.org>
Date:   Thu Mar 4 16:47:10 2010 +0100

    s3-rpcclient: fix rpcclient after spoolss_EnumPrinterDataEx IDL change.
    
    Guenther
    (cherry picked from commit becbb624eb90b84ff20b128de1aee5f5acfc3dbc)
    (cherry picked from commit 55511d7553b5163f56f1736d8a549b454cd5c460)

commit fd4fb5e8fa3c8fa53bfe7c000fd8099009703242
Author: Günther Deschner <gd at samba.org>
Date:   Thu Mar 4 16:46:53 2010 +0100

    s3-net: fix net after spoolss_EnumPrinterDataEx IDL change.
    
    Guenther
    (cherry picked from commit a99ac4f236d9a93d4ca8bd874cbab89b155c644a)
    (cherry picked from commit 35b5b6f214efde97ae0412676ef0ea47501a780d)

commit 26403e5e25c433f3be8395b24317f5bdad255b83
Author: Günther Deschner <gd at samba.org>
Date:   Thu Mar 4 16:40:31 2010 +0100

    spoolss: fix spoolss_EnumPrinterDataEx IDL.
    
    Guenther
    (cherry picked from commit 4df1047e8398a9af4df94c7e245d993d1f60ef5f)
    (cherry picked from commit c04c030553cdec1f8490b844632e2f2c08467de2)

commit 8f10a57a445d3b4fea1d7ee09413d0cf8a6a3830
Author: Günther Deschner <gd at samba.org>
Date:   Thu Mar 4 15:46:28 2010 +0100

    s3-rpcclient: fix rpcclient after spoolss_GetPrinterData{Ex} IDL change.
    
    Guenther
    (cherry picked from commit 7643afa70e879efc059c75b8309bf89dbb3c459b)
    (cherry picked from commit 6b331e7414c80f8f2bbe4c27b07af9ac27230101)

commit 61cfb54932b5baeb1c955694a960077562c6a963
Author: Günther Deschner <gd at samba.org>
Date:   Thu Mar 4 15:39:59 2010 +0100

    s3-spoolss: fix _spoolss_GetPrinterDataEx after IDL change.
    
    Guenther
    (cherry picked from commit fbb6d00eed6bca960aa53a5967a2dea426cacfe2)
    (cherry picked from commit 133671120889aa97102c2a056e3c5f54aba739f8)

commit 4b5fb3a03b3705f457b1ef36c29f2d966d59cfa3
Author: Günther Deschner <gd at samba.org>
Date:   Thu Mar 4 15:38:18 2010 +0100

    spoolss: rollback GetPrinterData[Ex] IDL.
    
    Guenther
    (cherry picked from commit 0e779b573bf5c27bf08ceefa09a7e2b07691f948)
    (cherry picked from commit 20a9f029f10346bed2beb999979b06801b7b1c9e)

commit de7998e02ee71b37052fe73e0198e123a6fb9326
Author: Günther Deschner <gd at samba.org>
Date:   Thu Mar 4 15:34:49 2010 +0100

    s3-rpcclient: fix rpcclient after spoolss_SetPrinterData{Ex} IDL change.
    
    Guenther
    (cherry picked from commit 4956650369156dfff96ccc827e55697ec642240d)
    (cherry picked from commit 9d4b8360e208d06a739f34e40c206c9dbe7857ba)

commit c7bd9f058d3a81a00cfe220eb0892ce9da16685c
Author: Günther Deschner <gd at samba.org>
Date:   Thu Mar 4 15:34:22 2010 +0100

    s3-net: fix net after spoolss_SetPrinterData{Ex} IDL change.
    
    Guenther
    (cherry picked from commit 37ca9288d2631b48a8eb50c01d6c0cc462d8ee31)
    (cherry picked from commit cbc766eb1fff67ba01cf57e1da215299c5927d0b)

commit 93755c9b0f966bb2d043fa94de6b9e4d4182c9d0
Author: Günther Deschner <gd at samba.org>
Date:   Thu Mar 4 17:00:34 2010 +0100

    s3-spoolss: fix _spoolss_SetPrinterData{Ex} after IDL change.
    
    Guenther
    (cherry picked from commit 9a934832797c3e72859770719e05d19a5eefa14d)
    (cherry picked from commit c98e6bf312741ab410afb177ba74d809b1101bcc)

commit 089f2e9f5546ad7b27c0a6a4a2e64b2953410426
Author: Günther Deschner <gd at samba.org>
Date:   Wed Mar 3 18:22:57 2010 +0100

    spoolss: rollback SetPrinterData{Ex} IDL.
    
    Guenther
    (cherry picked from commit 0528515be44c40603827bb153ff0e2bac7b0f041)
    (cherry picked from commit 1aa10318d0c72ff07284d840e7d381d0f6aff727)

commit f34fecab7fc5b43a189e157718d3353451796d18
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Mar 10 14:06:18 2010 -0800

    Fix bug #7234 - Symlink delete fails but incorrectly reports success to client.
    
    Typo called LSTAT instead of STAT in the unlink by pathname path.
    
    Jeremy.
    (cherry picked from commit 367ddc3d1b525525a9dae077335e33dc0017b58e)
    (cherry picked from commit 8f30cb3d43cf043a997711ee96400e1f7697f16f)

commit 754a7097b5045a1e6f9cf5df7382c0426c8bde7a
Author: Michael Adam <obnox at samba.org>
Date:   Mon Mar 8 22:32:41 2010 +0100

    s3:build: Fix automatic building of vfs_tsmsm if gpfs and dmapi are present.
    
    Michael
    (cherry picked from commit 9113e14b291c10c824d2d8ea5cb28ffc0adcb63b)
    
    Fix bug #7231 (vfs_tsmsm not built automatically).
    (cherry picked from commit 8087ceb42d72f2a07f70e8ab5462775a08303546)

commit d8e3e206262a1158de58ab70c92fde33e90cd7b9
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Mar 9 11:14:14 2010 +0100

    s3: Fix a NULL pointer dereference
    
    Found by Laurent Gaffie <laurent.gaffie at gmail.com>.
    
    Thanks!
    
    Volker
    (cherry picked from commit 25452a2268ac7013da28125f3df22085139af12d)
    
    Fix bug #7229 (NULL pointer dereference).
    (cherry picked from commit bf40d130a1761daa14ce6a2cf3d02dbd9095c2b5)

commit fa0e5ef76de06abf4a89aa9b71ff30d773a6454e
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Mar 5 11:16:12 2010 +0100

    s3:winbindd: add DEBUG(10,...) for the end of each top level
    
    That will hopefully make debugging a bit easier (at least for me).
    
    metze
    (cherry picked from commit 31293c64a323eb59fd8e81cd44bb33768a43e0c0)
    
    Fix bug #7225 (Make winbindd logs more verbose for troubleshooting).
    (cherry picked from commit 1c8e5543195e418605ff468eecf64bfa7e0761aa)

commit 2daac91ae3dea2d7658163b5420eb7e49b1bbe4f
Author: SATOH Fumiyasu <fumiyas at osstech.co.jp>
Date:   Wed Mar 10 12:15:44 2010 +0900

    vfs_netatalk: Segfault if hide files or veto files has no ".AppleDouble"
    
    Fix bug #1206 (netatalk vfs causes segfaults in samba).
    (cherry picked from commit 531a9ebd52fe65196bb01632a296b40a92a43b4c)

commit bde82007c6748252413360244a4b9dc9e06eeafb
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Mar 6 12:57:35 2010 +0100

    s3: Fix the build of net_afs.c with --fake-kaserver=yes, bug 7216
    
    Thanks to Geza Gemes <geza at kzsdabas.hu> for filing this bug
    (cherry picked from commit 5a3633faf12cdec41dc18064d5364a3fd067a22d)
    (cherry picked from commit cb627d3628da1da3c167de3b319cd92948e862eb)

commit d06bf1173728c32f9067c84eb28b21281f1c85e7
Author: Jeff Layton <jlayton at redhat.com>
Date:   Tue Jan 26 08:36:11 2010 -0500

    mount.cifs: don't allow it to be run as setuid root program
    
    mount.cifs has been the subject of several "security" fire drills due to
    distributions installing it as a setuid root program. This program has
    not been properly audited for security and the Samba team highly
    recommends that it not be installed as a setuid root program at this
    time.
    
    To make that abundantly clear, this patch forcibly disables the ability
    for mount.cifs to run as a setuid root program. People are welcome to
    trivially patch this out, but they do so at their own peril.
    
    A security audit and redesign of this program is in progress and we hope
    that we'll be able to remove this in the near future.
    
    Signed-off-by: Jeff Layton <jlayton at redhat.com>
    
    The last 3 patches address bug #6853 (mount.cifs race that allows user to
    replace mountpoint with a symlink).
    (cherry picked from commit e6c856ac84ee18a192edc3e8a6547e2e9387a1b5)

commit ed18be92ed14de689b6493d534e65dfa3855fbc2
Author: Jeff Layton <jlayton at redhat.com>
Date:   Tue Jan 26 08:36:03 2010 -0500

    mount.cifs: check for invalid characters in device name and mountpoint
    
    It's apparently possible to corrupt the mtab if you pass embedded
    newlines to addmntent. Apparently tabs are also a problem with certain
    earlier glibc versions. Backslashes are also a minor issue apparently,
    but we can't reasonably filter those.
    
    Make sure that neither the devname or mountpoint contain any problematic
    characters before allowing the mount to proceed.
    
    Signed-off-by: Jeff Layton <jlayton at redhat.com>
    (cherry picked from commit ae24005a5a2c165dfd9b859bf1c02b5f7e967be5)

commit a395811b01e1ee40198749e45eeaf56d0093a7b6
Author: Jeff Layton <jlayton at redhat.com>
Date:   Tue Jan 26 08:35:35 2010 -0500

    mount.cifs: take extra care that mountpoint isn't changed during mount
    
    It's possible to trick mount.cifs into mounting onto the wrong directory
    by replacing the mountpoint with a symlink to a directory. mount.cifs
    attempts to check the validity of the mountpoint, but there's still a
    possible race between those checks and the mount(2) syscall.
    
    To guard against this, chdir to the mountpoint very early, and only deal
    with it as "." from then on out.
    
    Signed-off-by: Jeff Layton <jlayton at redhat.com>
    (cherry picked from commit a60afceaa71c0c9b53b2ec1014db5d09d777803d)

commit fc8689cf9ec4588d57d734999d524f6725d34b1d
Author: Holger Hetterich <hhetter at novell.com>
Date:   Wed Mar 3 12:58:15 2010 +0100

    s3: net_share.c: fix argc handling
    
    The "net share" command was no longer possible because it enters
    the net_share function with argc == 0.
    
    Fix bug #7203 (net share doesn't work anymore).
    (cherry picked from commit cc5e6e62acc75699951e1860acde4af82646f747)

commit 46f2152086f91da78f1a6790ed4cbc788975d170
Author: Simo Sorce <idra at samba.org>
Date:   Mon Mar 1 14:50:50 2010 -0500

    s3:ads fix dn parsing name was always null
    
    While there also use ldap_exploded_dn instead of ldb_dn_validate()
    so we can remove a huge dependency that is hanging there only for one very
    minor marginal use.
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    (cherry picked from commit 8492f92843aa17eaf4a3ea9d5a9c6319afc97854)
    
    Fix bug #7204 (net ads join createcomputer=Servers/Unix fails with out of
    memory).
    (cherry picked from commit 36b7a2d8dcfccca45e70b6a013316409244ab641)

commit 19f8470db4e3e2dd08b173e45f5ea4abbe61408c
Author: Björn Jacke <bj at sernet.de>
Date:   Tue Mar 2 13:00:19 2010 +0100

    s3:vfs_aixacl2: add missing semicolon
    
    fixes #7197. Thanks to William Jojo for the correction.
    (cherry picked from commit d18840830e3950a91c2adb4866b3c8819b15869b)
    (cherry picked from commit 6253cb5445232aba662f874e44fae93f4d3b9ea3)

commit d30ac197fbb0a51e6c0122a6c3fafae871604709
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Feb 23 08:42:41 2010 +0100

    s3:winbindd: never mark external domains as internal!
    
    This way we can endup with silently using builtin_passdb_methods
    for an ad domain without an inbound trust.
    
    This fixes bug #7170.
    
    metze
    (cherry picked from commit f924b7749280b31ece19885de1c3ad1bd71942ac)
    (cherry picked from commit aa224cdad41b6f6e349763adeba2eef6f917549b)

commit 43224c993504d14c2ccc0c84046f4e0318d3481e
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Feb 19 14:24:17 2010 -0800

    Second part of fix for bug #7159 - client rpc_transport doesn't cope with bad server data returns.
    
    If server returns zero on a NP read. Report pipe broken.
    Prevents client from looping if it thinks there should be
    more data.
    
    Jeremy.
    (cherry picked from commit 0055e33dbed0e81548464d01bcf864255bab3159)
    (cherry picked from commit f5ca9f84e9b511c2ba7a4280b1997daa441f9877)

commit d13c73510529d820dc2f5ff48b3f9a4b72a5db53
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Feb 19 14:18:51 2010 -0800

    First part of fix for bug #7159 - client rpc_transport doesn't cope with bad server data returns.
    
    Ensure that subreq is *always* talloc_free'd in the _done
    function, as it has an event timeout attached. If the
    read requests look longer than the cli->timeout, then
    the timeout fn is called with already freed data.
    
    Jeremy.
    (cherry picked from commit ad77ae1d5870e06f8587ecf634e0b6bdcbb950d7)
    (cherry picked from commit 6e5b6b5acb30869eb63b25ed1406014101a5e89d)

commit a83ad62de26c26fb0731f4052bb396bbc4efc606
Author: Roel van Meer <rolek at alt001.com>
Date:   Fri Feb 26 14:54:22 2010 -0800

    Fix one of the valgrind warnings from bug #6814 - Fixes for problems reported by valgrind
    
    The timeval passed to event_add_to_select_args() must be initialized
    as event_add_to_select_args() uses a timeval_min() on this and next_event.
    (cherry picked from commit 78c6291bb310799212f7fc8bf218d4c908e8971e)

commit b32fbc0a23ab636d7bf535b1848a7ea6322bcce9
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Feb 6 13:26:06 2010 +0100

    s3: Fix bug 5198 -- parse chfn(1)-change gecos field
    (cherry picked from commit 2ea2d2a81e0666f478c5daf1469c8447a3096e8e)
    (cherry picked from commit 52a3ebc3a4ec54a427e54fa331251fd495c3c6aa)

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

Summary of changes:
 WHATSNEW.txt                                |   98 ++++-
 client/mount.cifs.c                         |  107 ++++-
 docs-xml/manpages-3/net.8.xml               |    2 +-
 lib/tevent/tevent.c                         |    7 +
 lib/tevent/tevent_internal.h                |    1 +
 lib/tevent/tevent_signal.c                  |   33 +-
 lib/util/talloc_stack.c                     |    4 +-
 lib/util/util_tdb.c                         |    8 +
 lib/util/util_tdb.h                         |    1 +
 librpc/gen_ndr/cli_spoolss.c                |   48 +-
 librpc/gen_ndr/cli_spoolss.h                |   32 +-
 librpc/gen_ndr/cli_winreg.c                 |    8 +-
 librpc/gen_ndr/cli_winreg.h                 |    4 +-
 librpc/gen_ndr/ndr_spoolss.c                |  305 ++++-------
 librpc/gen_ndr/ndr_spoolss.h                |   30 -
 librpc/gen_ndr/ndr_winreg.c                 |   24 +-
 librpc/gen_ndr/spoolss.h                    |  130 +-----
 librpc/gen_ndr/srv_spoolss.c                |    8 +-
 librpc/gen_ndr/winreg.h                     |    4 +-
 librpc/idl/spoolss.idl                      |   72 +---
 librpc/idl/winreg.idl                       |    2 +-
 librpc/ndr/ndr_spoolss_buf.c                |  287 ----------
 librpc/ndr/ndr_spoolss_buf.h                |    6 -
 nsswitch/wins.c                             |    5 +
 release-scripts/create-tarball              |    2 +-
 source3/Makefile.in                         |    2 +
 source3/configure.in                        |   26 +-
 source3/include/client.h                    |    4 +
 source3/include/ctdbd_conn.h                |    5 +
 source3/include/g_lock.h                    |   59 ++
 source3/include/proto.h                     |    9 +-
 source3/lib/ctdbd_conn.c                    |   89 +++-
 source3/lib/dbwrap_ctdb.c                   |  611 ++++++++++------------
 source3/lib/events.c                        |   21 +-
 source3/lib/g_lock.c                        |  766 +++++++++++++++++++++++++++
 source3/libads/ldap.c                       |   35 +-
 source3/libads/ldap_printer.c               |   40 +-
 source3/librpc/gen_ndr/messaging.h          |    4 +-
 source3/librpc/gen_ndr/ndr_messaging.c      |    1 +
 source3/librpc/idl/messaging.idl            |    3 +-
 source3/libsmb/clientgen.c                  |    4 +
 source3/libsmb/clierror.c                   |   18 +
 source3/modules/vfs_acl_tdb.c               |   48 +--
 source3/modules/vfs_aixacl2.c               |    2 +-
 source3/modules/vfs_netatalk.c              |    2 +-
 source3/modules/vfs_scannedonly.c           |    6 +-
 source3/passdb/passdb.c                     |   35 ++-
 source3/printing/nt_printing.c              |    2 +-
 source3/printing/print_cups.c               |   10 +-
 source3/registry/reg_backend_db.c           |   17 +
 source3/rpc_client/cli_pipe.c               |   66 ++-
 source3/rpc_client/cli_spoolss.c            |   16 +-
 source3/rpc_client/ndr.c                    |   14 -
 source3/rpc_client/rpc_transport_np.c       |  127 ++++-
 source3/rpc_client/rpc_transport_smbd.c     |  105 +++-
 source3/rpc_client/rpc_transport_sock.c     |  103 ++--
 source3/rpc_server/srv_netlog_nt.c          |   18 +-
 source3/rpc_server/srv_spoolss_nt.c         |   66 ++--
 source3/rpc_server/srv_winreg_nt.c          |   27 +-
 source3/rpcclient/cmd_spoolss.c             |   61 ++-
 source3/smbd/blocking.c                     |   20 +
 source3/smbd/posix_acls.c                   |    4 +-
 source3/smbd/process.c                      |   11 +-
 source3/smbd/reply.c                        |   17 +-
 source3/smbd/server.c                       |   53 ++-
 source3/smbd/service.c                      |    2 +-
 source3/smbd/sesssetup.c                    |    2 +-
 source3/torture/torture.c                   |  132 +++++
 source3/utils/net.c                         |    7 +
 source3/utils/net_afs.c                     |    2 +-
 source3/utils/net_conf.c                    |   42 ++-
 source3/utils/net_g_lock.c                  |  208 ++++++++
 source3/utils/net_proto.h                   |    3 +
 source3/utils/net_rpc_printer.c             |   41 +--
 source3/utils/net_share.c                   |    4 +-
 source3/utils/ntlm_auth.c                   |   24 +-
 source3/winbindd/wb_next_grent.c            |    1 +
 source3/winbindd/winbindd.c                 |   33 +-
 source3/winbindd/winbindd.h                 |    1 +
 source3/winbindd/winbindd_cm.c              |   69 ++-
 source3/winbindd/winbindd_dual.c            |    8 +
 source3/winbindd/winbindd_pam.c             |    4 +-
 source3/winbindd/winbindd_reconnect.c       |   73 ++-
 source4/ntptr/simple_ldb/ntptr_simple_ldb.c |  122 +++--
 source4/rpc_server/spoolss/dcesrv_spoolss.c |    3 +-
 source4/torture/rpc/spoolss.c               |  107 +++--
 source4/torture/rpc/spoolss_win.c           |    7 +-
 87 files changed, 3014 insertions(+), 1636 deletions(-)
 create mode 100644 source3/include/g_lock.h
 create mode 100644 source3/lib/g_lock.c
 create mode 100644 source3/utils/net_g_lock.c


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 6602941..e3726f2 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,20 +1,110 @@
                    =============================
                    Release Notes for Samba 3.5.2
-			    , 2010
+			   April 7, 2010
                    =============================
 
 
-This is the third stable release of Samba 3.5.
+This is the latest stable release of Samba 3.5.
 
 Major enhancements in Samba 3.5.2 include:
 
-o 
+  o Fix smbd segfaults in _netr_SamLogon for clients sending null domain
+    (bug #7237).
+  o Fix smbd segfaults in "waiting for connections" message (bug #7251).
+  o Fix an uninitialized variable read in smbd (bug #7254).
+  o Fix a memleak in Winbind (bug #7278).
+  o Fix Winbind reconnection to it's own domain (bug #7295).
+
 
 Changes since 3.5.1
 -------------------
 
 
-o  
+o   Michael Adam <obnox at samba.org>
+    * BUG 7231: Fix automatic building of vfs_tsmsm if gpfs and dmapi are
+      present.
+    * BUG 7232: Fix race conditions in CTDB persistent transactions.
+    * BUG 7313: Make 'net conf addshare' atomic.
+    * BUG 7314: Eliminate race condition in creating/scanning sorted subkeys in
+      the registry backend.
+
+
+o   Jeremy Allison <jra at samba.org>
+    * BUG 7075: Fix bug in vfs_scannedonly rmdir implementation.
+    * BUG 7159: Fix handling of bad server data returns in client rpc_transport.
+    * BUG 7234: Symlink delete fails but incorrectly reports success to client.
+    * BUG 7255: Fix "printer admin" functionality.
+    * BUG 7283: Fix smbd segfault if using vfs_acl_tdb.
+    * BUG 7297: Fix smbd crashes with CUPS printers and no [printers] share defined.
+    * BUG 7310: Fix DOS attribute inconsistency with MS Office.
+
+
+o   Kai Blin <kai at samba.org>
+    * BUG 7290: Fix core dump in 'ntlm_auth' with "gss-spnego" helper.
+
+
+o   Günther Deschner <gd at samba.org>
+    * BUG 6727: Fix several printing issues.
+    * BUG 7237: Fix smbd segfaults in _netr_SamLogon for clients sending
+      null domain.
+    * BUG 7256: Fix value-needed calculation in_spoolss_EnumPrinterData().
+    * BUG 7258: Fix _winreg_QueryValue crash bugs and implement Windows
+      behavior.
+
+
+o   Holger Hetterich <hhetter at novell.com>
+    * BUG 7203: Fix 'net share' command.
+
+
+o   Michael Karcher <samba at mkarcher.dialup.fu-berlin.de>
+    * BUG 7269: Fix job management commands for CUPS queues.
+
+
+o   Jeff Layton <jlayton at redhat.com>
+    * BUG 6853: Fix race condition in mount.cifs that allows user to replace
+      mountpoint with a symlink.
+
+
+o   Volker Lendecke <vl at samba.org>
+    * BUG 5198: Fix parsing of the gecos field.
+    * BUG 7202: Fix access by multi-threaded applications.
+    * BUG 7212: Fix returning of group members with 'getent group'.
+    * BUG 7216: Fix the build of net_afs.c with --fake-kaserver=yes.
+    * BUG 7229: Fix a NULL pointer dereference in smbd.
+    * BUG 7232: Fix race conditions in CTDB persistent transactions.
+    * BUG 7254: Fix an uninitialized variable read in smbd.
+    * BUG 7278: Fix a memleak in Winbind.
+
+
+o   Roel van Meer <rolek at alt001.com>
+    * BUG 6814: Fix valgrind warning.
+
+
+o   Stefan Metzmacher <metze at samba.org>
+    * BUG 7170: Never mark external domains as internal in Winbind.
+    * BUG 7225: Make Winbind logs more verbose for troubleshooting.
+    * BUG 7251: Fix smbd segfault in "waiting for connections" message.
+    * BUG 7295: Fix Winbind reconnection to it's own domain.
+    * BUG 7316: Winbind possibly segfaults when trying a trusted domain without
+      inbound trust.
+
+
+o   SATOH Fumiyasu <fumiyas at osstech.co.jp>
+    * BUG 1206: Fix segfault if hide files or veto files has no ".AppleDouble".
+
+
+o   Simo Sorce <idra at samba.org>
+    * BUG 7204: Fix DN parsing name was always null.
+
+
+o   Andrew Tridgell <tridge at samba.org>
+    * BUG 7312: Many disconnecting clients render clustered Samba unusuable
+      for some time.
+
+
+o   Bo Yang <boyang at samba.org>
+    * BUG 7206: Signals are processed twice in child.
+
 
 
 ######################################################################
diff --git a/client/mount.cifs.c b/client/mount.cifs.c
index 3baaad7..0b8d5b4 100644
--- a/client/mount.cifs.c
+++ b/client/mount.cifs.c
@@ -43,7 +43,7 @@
 #include "mount.h"
 
 #define MOUNT_CIFS_VERSION_MAJOR "1"
-#define MOUNT_CIFS_VERSION_MINOR "13"
+#define MOUNT_CIFS_VERSION_MINOR "14"
 
 #ifndef MOUNT_CIFS_VENDOR_SUFFIX
  #ifdef _SAMBA_BUILD_
@@ -89,6 +89,17 @@
 #define MAX_ADDRESS_LEN INET6_ADDRSTRLEN
 
 /*
+ * mount.cifs has been the subject of many "security" bugs that have arisen
+ * because of users and distributions installing it as a setuid root program.
+ * mount.cifs has not been audited for security. Thus, we strongly recommend
+ * that it not be installed setuid root. To make that abundantly clear,
+ * mount.cifs now check whether it's running setuid root and exit with an
+ * error if it is. If you wish to disable this check, then set the following
+ * #define to 1, but please realize that you do so at your own peril.
+ */
+#define CIFS_DISABLE_SETUID_CHECK 0
+
+/*
  * By default, mount.cifs follows the conventions set forth by /bin/mount
  * for user mounts. That is, it requires that the mount be listed in
  * /etc/fstab with the "user" option when run as an unprivileged user and
@@ -179,7 +190,7 @@ check_mountpoint(const char *progname, char *mountpoint)
 	struct stat statbuf;
 
 	/* does mountpoint exist and is it a directory? */
-	err = stat(mountpoint, &statbuf);
+	err = stat(".", &statbuf);
 	if (err) {
 		fprintf(stderr, "%s: failed to stat %s: %s\n", progname,
 				mountpoint, strerror(errno));
@@ -213,6 +224,29 @@ check_mountpoint(const char *progname, char *mountpoint)
 	return 0;
 }
 
+#if CIFS_DISABLE_SETUID_CHECK
+static int
+check_setuid(void)
+{
+	return 0;
+}
+#else /* CIFS_DISABLE_SETUID_CHECK */
+static int
+check_setuid(void)
+{
+	if (getuid() && !geteuid()) {
+		printf("This mount.cifs program has been built with the "
+			"ability to run as a setuid root program disabled.\n"
+			"mount.cifs has not been well audited for security "
+			"holes. Therefore the Samba team does not recommend "
+			"installing it as a setuid root program.\n");
+		return 1;
+	}
+
+	return 0;
+}
+#endif /* CIFS_DISABLE_SETUID_CHECK */
+
 #if CIFS_LEGACY_SETUID_CHECK
 static int
 check_fstab(const char *progname, char *mountpoint, char *devname,
@@ -1165,6 +1199,36 @@ static void print_cifs_mount_version(void)
 		MOUNT_CIFS_VENDOR_SUFFIX);
 }
 
+/*
+ * This function borrowed from fuse-utils...
+ *
+ * glibc's addmntent (at least as of 2.10 or so) doesn't properly encode
+ * newlines embedded within the text fields. To make sure no one corrupts
+ * the mtab, fail the mount if there are embedded newlines.
+ */
+static int check_newline(const char *progname, const char *name)
+{
+    char *s;
+    for (s = "\n"; *s; s++) {
+        if (strchr(name, *s)) {
+            fprintf(stderr, "%s: illegal character 0x%02x in mount entry\n",
+                    progname, *s);
+            return EX_USAGE;
+        }
+    }
+    return 0;
+}
+
+static int check_mtab(const char *progname, const char *devname,
+			const char *dir)
+{
+	if (check_newline(progname, devname) == -1 ||
+	    check_newline(progname, dir) == -1)
+		return EX_USAGE;
+	return 0;
+}
+
+
 int main(int argc, char ** argv)
 {
 	int c;
@@ -1197,6 +1261,9 @@ int main(int argc, char ** argv)
 	struct sockaddr_in6 *addr6;
 	FILE * pmntfile;
 
+	if (check_setuid())
+		return EX_USAGE;
+
 	/* setlocale(LC_ALL, "");
 	bindtextdomain(PACKAGE, LOCALEDIR);
 	textdomain(PACKAGE); */
@@ -1378,6 +1445,14 @@ int main(int argc, char ** argv)
 	}
 
 	/* make sure mountpoint is legit */
+	rc = chdir(mountpoint);
+	if (rc) {
+		fprintf(stderr, "Couldn't chdir to %s: %s\n", mountpoint,
+				strerror(errno));
+		rc = EX_USAGE;
+		goto mount_exit;
+	}
+
 	rc = check_mountpoint(thisprogram, mountpoint);
 	if (rc)
 		goto mount_exit;
@@ -1440,13 +1515,23 @@ int main(int argc, char ** argv)
 	
 	/* BB save off path and pop after mount returns? */
 	resolved_path = (char *)malloc(PATH_MAX+1);
-	if(resolved_path) {
-		/* Note that if we can not canonicalize the name, we get
-		another chance to see if it is valid when we chdir to it */
-		if (realpath(mountpoint, resolved_path)) {
-			mountpoint = resolved_path; 
-		}
+	if (!resolved_path) {
+		fprintf(stderr, "Unable to allocate memory.\n");
+		rc = EX_SYSERR;
+		goto mount_exit;
+	}
+
+	/* Note that if we can not canonicalize the name, we get
+	   another chance to see if it is valid when we chdir to it */
+	if(!realpath(".", resolved_path)) {
+		fprintf(stderr, "Unable to resolve %s to canonical path: %s\n",
+				mountpoint, strerror(errno));
+		rc = EX_SYSERR;
+		goto mount_exit;
 	}
+
+	mountpoint = resolved_path;
+
 	if(got_user == 0) {
 		/* Note that the password will not be retrieved from the
 		   USER env variable (ie user%password form) as there is
@@ -1590,7 +1675,11 @@ mount_retry:
 	if (verboseflag)
 		fprintf(stderr, "\n");
 
-	if (!fakemnt && mount(dev_name, mountpoint, "cifs", flags, options)) {
+	rc = check_mtab(thisprogram, dev_name, mountpoint);
+	if (rc)
+		goto mount_exit;
+
+	if (!fakemnt && mount(dev_name, ".", "cifs", flags, options)) {
 		switch (errno) {
 		case ECONNREFUSED:
 		case EHOSTUNREACH:
diff --git a/docs-xml/manpages-3/net.8.xml b/docs-xml/manpages-3/net.8.xml
index 794a222..76ef51f 100644
--- a/docs-xml/manpages-3/net.8.xml
+++ b/docs-xml/manpages-3/net.8.xml
@@ -1312,7 +1312,7 @@ can create user defined shares on demand using the commands below.
 <para>The usershare commands are:
 
 <simplelist>
-<member>net usershare add sharename path [comment] [acl] [guest_ok=[y|n]] - to add or change a user defined share.</member>
+<member>net usershare add sharename path [comment [acl] [guest_ok=[y|n]]] - to add or change a user defined share.</member>
 <member>net usershare delete sharename - to delete a user defined share.</member>
 <member>net usershare info [-l|--long] [wildcard sharename] - to print info about a user defined share.</member>
 <member>net usershare list [-l|--long] [wildcard sharename] - to list user defined shares.</member>
diff --git a/lib/tevent/tevent.c b/lib/tevent/tevent.c
index 56d0da3..a0ee208 100644
--- a/lib/tevent/tevent.c
+++ b/lib/tevent/tevent.c
@@ -176,6 +176,13 @@ int tevent_common_context_destructor(struct tevent_context *ev)
 		sn = se->next;
 		se->event_ctx = NULL;
 		DLIST_REMOVE(ev->signal_events, se);
+		/*
+		 * This is important, Otherwise signals
+		 * are handled twice in child. eg, SIGHUP.
+		 * one added in parent, and another one in
+		 * the child. -- BoYang
+		 */
+		tevent_cleanup_pending_signal_handlers(se);
 	}
 
 	return 0;
diff --git a/lib/tevent/tevent_internal.h b/lib/tevent/tevent_internal.h
index e10f52e..7f5fd64 100644
--- a/lib/tevent/tevent_internal.h
+++ b/lib/tevent/tevent_internal.h
@@ -299,6 +299,7 @@ struct tevent_signal *tevent_common_add_signal(struct tevent_context *ev,
 					       const char *handler_name,
 					       const char *location);
 int tevent_common_check_signal(struct tevent_context *ev);
+void tevent_cleanup_pending_signal_handlers(struct tevent_signal *se);
 
 bool tevent_standard_init(void);
 bool tevent_select_init(void);
diff --git a/lib/tevent/tevent_signal.c b/lib/tevent/tevent_signal.c
index 0f3d83e..45f65cf 100644
--- a/lib/tevent/tevent_signal.c
+++ b/lib/tevent/tevent_signal.c
@@ -133,7 +133,9 @@ static void tevent_common_signal_handler_info(int signum, siginfo_t *info,
 
 static int tevent_common_signal_list_destructor(struct tevent_common_signal_list *sl)
 {
-	DLIST_REMOVE(sig_state->sig_handlers[sl->se->signum], sl);
+	if (sig_state->sig_handlers[sl->se->signum]) {
+		DLIST_REMOVE(sig_state->sig_handlers[sl->se->signum], sl);
+	}
 	return 0;
 }
 
@@ -154,12 +156,16 @@ static int tevent_signal_destructor(struct tevent_signal *se)
 
 	if (sig_state->sig_handlers[se->signum] == NULL) {
 		/* restore old handler, if any */
-		sigaction(se->signum, sig_state->oldact[se->signum], NULL);
-		sig_state->oldact[se->signum] = NULL;
+		if (sig_state->oldact[se->signum]) {
+			sigaction(se->signum, sig_state->oldact[se->signum], NULL);
+			sig_state->oldact[se->signum] = NULL;
+		}
 #ifdef SA_SIGINFO
 		if (se->sa_flags & SA_SIGINFO) {
-			talloc_free(sig_state->sig_info[se->signum]);
-			sig_state->sig_info[se->signum] = NULL;
+			if (sig_state->sig_info[se->signum]) {
+				talloc_free(sig_state->sig_info[se->signum]);
+				sig_state->sig_info[se->signum] = NULL;
+			}
 		}
 #endif
 	}
@@ -398,3 +404,20 @@ int tevent_common_check_signal(struct tevent_context *ev)
 
 	return 1;
 }
+
+void tevent_cleanup_pending_signal_handlers(struct tevent_signal *se)
+{
+	struct tevent_common_signal_list *sl;
+	sl = talloc_get_type(se->additional_data,
+			     struct tevent_common_signal_list);
+
+	tevent_common_signal_list_destructor(sl);
+
+	if (sig_state->sig_handlers[se->signum] == NULL) {
+		if (sig_state->oldact[se->signum]) {
+			sigaction(se->signum, sig_state->oldact[se->signum], NULL);
+			sig_state->oldact[se->signum] = NULL;
+		}
+	}
+	return;
+}
diff --git a/lib/util/talloc_stack.c b/lib/util/talloc_stack.c
index 596efbf..f34d495 100644
--- a/lib/util/talloc_stack.c
+++ b/lib/util/talloc_stack.c
@@ -103,8 +103,10 @@ static int talloc_pop(TALLOC_CTX *frame)
 			break;
 		}
 		talloc_free(ts->talloc_stack[i]);
+		ts->talloc_stack[i] = NULL;
 	}
 
+	ts->talloc_stack[i] = NULL;
 	ts->talloc_stacksize = i;
 	return 0;
 }
@@ -181,7 +183,7 @@ TALLOC_CTX *talloc_tos(void)
 	struct talloc_stackframe *ts =
 		(struct talloc_stackframe *)SMB_THREAD_GET_TLS(global_ts);
 
-	if (ts == NULL) {
+	if (ts == NULL || ts->talloc_stacksize == 0) {
 		talloc_stackframe();
 		ts = (struct talloc_stackframe *)SMB_THREAD_GET_TLS(global_ts);
 		DEBUG(0, ("no talloc stackframe around, leaking memory\n"));
diff --git a/lib/util/util_tdb.c b/lib/util/util_tdb.c
index cda8dc7..46dbf6d 100644
--- a/lib/util/util_tdb.c
+++ b/lib/util/util_tdb.c
@@ -38,6 +38,14 @@ TDB_DATA make_tdb_data(const uint8_t *dptr, size_t dsize)
 	return ret;
 }
 
+bool tdb_data_equal(TDB_DATA t1, TDB_DATA t2)
+{
+	if (t1.dsize != t2.dsize) {
+		return false;
+	}
+	return (memcmp(t1.dptr, t2.dptr, t1.dsize) == 0);
+}
+
 TDB_DATA string_tdb_data(const char *string)
 {
 	return make_tdb_data((const uint8_t *)string, string ? strlen(string) : 0 );
diff --git a/lib/util/util_tdb.h b/lib/util/util_tdb.h
index da6378e..79c4671 100644
--- a/lib/util/util_tdb.h
+++ b/lib/util/util_tdb.h
@@ -6,6 +6,7 @@
  Make a TDB_DATA and keep the const warning in one place
 ****************************************************************/
 TDB_DATA make_tdb_data(const uint8_t *dptr, size_t dsize);
+bool tdb_data_equal(TDB_DATA t1, TDB_DATA t2);
 TDB_DATA string_tdb_data(const char *string);
 TDB_DATA string_term_tdb_data(const char *string);
 
diff --git a/librpc/gen_ndr/cli_spoolss.c b/librpc/gen_ndr/cli_spoolss.c
index c6bb8ed..c674f94 100644
--- a/librpc/gen_ndr/cli_spoolss.c
+++ b/librpc/gen_ndr/cli_spoolss.c
@@ -4152,9 +4152,9 @@ struct tevent_req *rpccli_spoolss_GetPrinterData_send(TALLOC_CTX *mem_ctx,
 						      struct rpc_pipe_client *cli,
 						      struct policy_handle *_handle /* [in] [ref] */,
 						      const char *_value_name /* [in] [charset(UTF16)] */,
-						      uint32_t _offered /* [in]  */,
 						      enum winreg_Type *_type /* [out] [ref] */,
-						      union spoolss_PrinterData *_data /* [out] [subcontext_size(offered),ref,subcontext(4),switch_is(*type)] */,
+						      uint8_t *_data /* [out] [ref,size_is(offered)] */,
+						      uint32_t _offered /* [in]  */,
 						      uint32_t *_needed /* [out] [ref] */)
 {
 	struct tevent_req *req;
@@ -4226,7 +4226,7 @@ static void rpccli_spoolss_GetPrinterData_done(struct tevent_req *subreq)
 
 	/* Copy out parameters */
 	*state->orig.out.type = *state->tmp.out.type;
-	*state->orig.out.data = *state->tmp.out.data;
+	memcpy(state->orig.out.data, state->tmp.out.data, (state->tmp.in.offered) * sizeof(*state->orig.out.data));
 	*state->orig.out.needed = *state->tmp.out.needed;
 
 	/* Copy result */
@@ -4265,9 +4265,9 @@ NTSTATUS rpccli_spoolss_GetPrinterData(struct rpc_pipe_client *cli,
 				       TALLOC_CTX *mem_ctx,
 				       struct policy_handle *handle /* [in] [ref] */,
 				       const char *value_name /* [in] [charset(UTF16)] */,
-				       uint32_t offered /* [in]  */,
 				       enum winreg_Type *type /* [out] [ref] */,
-				       union spoolss_PrinterData *data /* [out] [subcontext_size(offered),ref,subcontext(4),switch_is(*type)] */,
+				       uint8_t *data /* [out] [ref,size_is(offered)] */,
+				       uint32_t offered /* [in]  */,
 				       uint32_t *needed /* [out] [ref] */,
 				       WERROR *werror)
 {
@@ -4295,7 +4295,7 @@ NTSTATUS rpccli_spoolss_GetPrinterData(struct rpc_pipe_client *cli,
 
 	/* Return variables */
 	*type = *r.out.type;
-	*data = *r.out.data;
+	memcpy(data, r.out.data, (r.in.offered) * sizeof(*data));
 	*needed = *r.out.needed;
 
 	/* Return result */
@@ -4321,8 +4321,8 @@ struct tevent_req *rpccli_spoolss_SetPrinterData_send(TALLOC_CTX *mem_ctx,
 						      struct policy_handle *_handle /* [in] [ref] */,
 						      const char *_value_name /* [in] [charset(UTF16)] */,
 						      enum winreg_Type _type /* [in]  */,
-						      union spoolss_PrinterData _data /* [in] [subcontext(4),switch_is(type)] */,


-- 
Samba Shared Repository


More information about the samba-cvs mailing list