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

Karolin Seeger kseeger at samba.org
Tue Apr 26 12:13:58 MDT 2011


The branch, v3-6-stable has been updated
       via  0cfe941 WHATSNEW: Update changes since pre2.
       via  5e6e0a4 s3-utils: Fix Bug #8106. Fix the build of smbget on HP NonStop.
       via  c2e5a38 s3-waf: try to fix the build on sunos5.
       via  03e2bcc s3-waf: fix typo in comment.
       via  697c671 s3: Fix a typo
       via  23ad5e7 s3: Allow unlimited parallelism in pthreadpool (cherry picked from commit dbc36befb5459cd59ffe2527261886ec962ea941) (cherry picked from commit efc70fd0039302daa97223004d56f8c87f63a0df)
       via  ea15312 s3: Remove unused code
       via  a900d4b s3: Move setting the name_query timeout
       via  912e2ac No longer need to call SMB_VFS_LSTAT - check name hasn't changed above is sufficient.
       via  9166977 Correctly detect and deny symlinks anywhere in a path (not just the last component) if "follow symlinks = no". (cherry picked from commit eeb24c17739dd0bccf561b142841a7d2e560cdd0) (cherry picked from commit 78623e8ab4cef8e28194260dbb87535402cafd30)
       via  fe44df9 s3-selftest Rename s3 DC environment to s3dc
       via  6f97109 selftest: put the target on the environment
       via  945555d s3: Run pthreadpooltest in make test
       via  0b4acbb s3: Add pthreadpooltest to main build (cherry picked from commit 39375de8354b676904e1fea097a68178acd987e4) (cherry picked from commit 37d963684aae4c80c4a3286bb22503592156b630)
       via  383ced7 s3: pthreadpool_sig_fd->pthreadpool_signal_fd (cherry picked from commit f4a0f856f31291dd316a937f8060d2f205e8d4d6) (cherry picked from commit 28394b98affe38650c56cf37e110d08c71145f0f)
       via  7f6d693 s3: Tiny doc for pthreadpool (cherry picked from commit 3c405f5e1d81d33a01ab822aeba93634338d5b25) (cherry picked from commit 39ab4b06f8fde50489d68a554102fdcea78c1fec)
       via  f658c6a s3: Many pthreadpool fixes
       via  93ae867 s3: Fix Coverity ID 2478, UNINIT
       via  ed76489 s3:rpc_client: map fault codes to NTSTATUS with dcerpc_fault_to_nt_status()
       via  17f5c8c s3:winbindd: let winbindd_lookup_names() use dcerpc_binding_handle functions
       via  baed562 s3:winbindd: let winbindd_lookup_sids() dcerpc_binding_handle functions
       via  24968c3 docs-xml/smb.conf.5: %i and %I no longer contain IPv4 mapped IPv6 addresses
       via  b6295b2 s3:lib/util_sock: listen on IPv6 addresses with IPV6_ONLY (bug #7383)
       via  291f337 s3:lib/access: normalize IPv4 mapped IPv6 addresses in both directions (bug #7383)
       via  29115cd lib/util: add RBVAL, RBVALS, RSBVAL and RSRBVALS macros
       via  ce23bb0 s3:includes: simplify INO_T_VAL macros
       via  8196c37 s3:includes: simplify BIG_UINT macros
       via  09b4ca5 s3:smbd/trans2: make use of BVAL() and remove ugly LARGE_SMB_OFF_T ifdef's
       via  b11a83b s3:include/vfs.h: remove very old hints for vfs modules with interface version < 8
       via  e786be8 s3:smbd/nttrans: make use of BVAL() and remove ugly LARGE_SMB_OFF_T ifdef's
       via  621f9b2 s3:lib/sysquota: remove ugly LARGE_SMB_OFF_T ifdef's
       via  5b65359 s3:libsmb: make use of BVAL() and remove ugly LARGE_SMB_OFF_T ifdef's
       via  7f2fda3 WHATSNEW: Update changes since pre2.
       via  df07558 WHATSNEW: Add changes since pre2.
       via  c70b385 s3: Add a 10-second timeout for the 445 or netbios connection to a DC (cherry picked from commit 23a6af46c84cd9b738af403d80c5187d858eac03) (cherry picked from commit 6be972bd5b55c29f3a3a1ebcbee654a2ece020b6)
       via  15758e1 s3: Fix Coverity ID 2047, UNUSED_VALUE
       via  1523a3f s3: Fix Coverity ID 2325, RESOURCE_LEAK (cherry picked from commit 726fa732facef55da6a27750f9daf12145db6639) (cherry picked from commit fab8a81963897659814b339254f2409292272a5d)
       via  00c1bfa s3: Fix Coverity ID 2336, NULL_RETURNS (cherry picked from commit f9e3af71d391027de353f0240f70e425e766c0e5) (cherry picked from commit ec2513cc5baa1aafc173887a7dec45660506cf35)
       via  851f277 s3: Fix Coverity ID 2335, CHECKED_RETURN (cherry picked from commit 018595e2587b5b5dd90bf318a1cf8b675e47b66b) (cherry picked from commit 13d72e42e17c05c63670ce102981e9f8dd038290)
       via  0b28b16 asn1: Fix Coverity ID 2299, CHECKED_RETURN (cherry picked from commit 4981adcca37391b6745f10f5849fedd7c944410d) (cherry picked from commit ec3ca4ba431fdccfb3fdd3ddf13189158db8ab62)
       via  26e5d22 s3: Fix Coverity ID 2307, NULL_RETURNS (cherry picked from commit 3e8a8fad59cfdd053ad96afc39ea7d6e98b91764) (cherry picked from commit 135cb711f0b052c37595f64e1859606c8d0e58b2)
       via  d63beb2 s3: Fix Coverity ID 986, BUFFER_SIZE_WARNING
       via  dceb06a s3: Fix Coverity ID 1340, NULL_RETURNS (cherry picked from commit 7e7ad53cbd77ce2201fd46bd2c08a601725f9f5b) (cherry picked from commit 139336bd8b58cea93c82f7da9c100d6cccfe5180)
       via  c6ab875 Cosmetic. Fix bad indentation.
       via  c51a61d Fix compiler warning in debug message. (cherry picked from commit 644046f064d73ff97f95a7dfbc5fca199f0dd973) (cherry picked from commit 5adbcb5b293effd7cf26fd38f1cde821671b2085)
       via  ce81f2b Remove duplicate code - move to parent_dirname() as a common function. (cherry picked from commit 20baa11f33c5282c609258e21a07c7255df7ae30) (cherry picked from commit 42b2f84837f3978b0c24f3374dd876e7d7d84de7)
       via  72810b3 s3-vfs: rename open function to open_fn.
       via  d83a44d s3-build: move MAP_FILE define to the only place used.
       via  6dd8807 s4-smbtorture: restructure documentname handling in spoolss test a bit.
       via  36824e2 s3-spoolss: fix debug statement in spoolss_addprinterex_level_2().
       via  f774789 s3-smbd: fix the AIX 5.3 build.
       via  aaf05c8 tdb_backup: avoid transaction on backup file, use lockall
       via  2b6dbd2 Fix Bug #8099 setpwent() actually does endpwent() and vice versa on FreeBSD
       via  ad1d308 tdb: make sure we skip over recovery area correctly.
       via  c6977dc tdb_expand: limit the expansion with huge records
       via  e8e0415 tdb: tdb_repack() only when it's worthwhile.
       via  beacde8 tdb: fix transaction recovery area for converted tdbs.
       via  f09bc1f Fix bug 8088 - rpccli_samr_chng_pswd_auth_crap segfaults if any input blobs are null.
       via  ac578cb s3-build: fix the --with-profiling-data build on mac os x.
       via  9663850 s3 waf: Mimic the autoconf check for netgrent
       via  9e5c9ef s3 autobuild: Fix CFLAG check for netgrent tests
       via  3c56f98 s3: Fix a typo
       via  ad689c9 s3: Remove an unused variable (cherry picked from commit 35c71231accaa2f24a70f4066b967fa4999428f1) (cherry picked from commit 3eb3a4f733b5a042f0ad5e0bcc59d2db011e7c73)
       via  59e0188 s3: Use tevent_req_nterror properly in a few places (cherry picked from commit 10a552a9570bd274796639ba80d46d2d22828271) (cherry picked from commit 8894994b61dd8701806daae123bc615f5ee47390)
       via  69ab8a4 s3: guest sesssetup is only 13 words (cherry picked from commit 69650a2aaa8649570261df7efccb35ad76d7cfc1)
       via  f8a7971 s3: Use 
       via  d3d4043 Trying to track down the SMB2 error. Add an invariant test.
       via  c30fcdb s3: Fix the build of vfs_gpfs.c
       via  5828355 Use handle based xattr set if available.
       via  974e782 Ensure vfs_chown_fsp() is safe against races. (cherry picked from commit 525ccd589ede79e97e83699629a1d98538855803) (cherry picked from commit 525afe18d46e4e874d2eea3339505aede5d1ba69)
       via  d2b3417 s3: Fix bug 8066, wrong output in smbget
       via  8e30f6d Ensure change_dir_owner_to_parent() can't be raced.
       via  1cf08cd Fix bug #8083 - "inherit owner = yes" doesn't interact correctly with vfs_acl_xattr or vfs_acl_tdb module.
       via  f5a5756 Optimization for change_file_owner_to_parent() and change_dir_owner_to_parent()
       via  8a5e6c3 s3: Fix Coverity ID 2471: UNINIT
       via  a36d1c8 s3: Fix smbd with the async echo responder
       via  99a761b s3-build: make sure we pick up system tdb and talloc via #include.
       via  9fb6ecd s3-includes: move readahead prototype to its only user.
       via  2600f22 s3: only include smb profiling where needed.
       via  59f3613 s3-waf: add --with-profiling-data configure option.
       via  240afb8 s3: fix the build of --with-profiling-data.
       via  bdd6e27 s3-includes: only include acl prototypes when needed.
       via  3a1708a s3-includes: absolutely no need to globally include debugparse.h
       via  8d0acf9 s3-includes: include lib/util/debug.h headers in includes.h not smb.h
       via  8a68d06 s3-includes: remove unused schema_types enum.
       via  9fec681 s3-includes: move struct pipe_open_rec to srvsvc rpc server.
       via  d3f43fd s3-build: finally remove references to ndr and dcerpc headers that were included globally.
       via  fc2f141 s3-rpc_client: add and use rpc_client/rpc_client.h.
       via  cc1760a s3-netapi: remove two shadowed variables.
       via  5e3acc7 Fix WAF build for sids2xids. (cherry picked from commit f0bfd05517f682743175a9a9c043f679a26804ce)
       via  72b3929 s3: Add a test for sid2xids
       via  ee0195e s3: Add some debug to winbindd_sids_to_xids
       via  9333e19 s3: Use wbcSidsToUnixIds in create_local_token
       via  1e353cc nsswitch: Add wbinfo --sids-to-unix-ids
       via  428350d libwbclient: Add wbcSidsToUnixIds
       via  1a545c9 s3: Export WINBINDD_SIDS_TO_XIDS via the winbind pipe
       via  e042d3f s3: Add wbint_Sids2UnixIDs idl & implementation
       via  22fecb9 s3: Make idmap_find_domain public
       via  b21398e s3: Add is_domain_online
       via  d72e485 nsswitch: wbinfo --lookup-sids
       via  0e76fe7 lib: Move next_token next to next_token_talloc
       via  fbc6350 libwbclient: Add wbcLookupSids
       via  7e7a2c1 s3: Add winbindd_lookupsids
       via  b08c603 s3: Add wb_lookupsids
       via  1f11b8a s3: Add wbint_LookupSids
       via  83f1acc s3: Make parse_sidlist public
       via  b9ef627 s3: Simplify parse_sidlist
       via  fc59f9d Add dom_sid_parse_endp
       via  1ac8681 s3:WHATSNEW.txt: remove the "strict allocate" default value
       via  04b5937 talloc: fix compiler warnings with -Wc++-compat
       via  ced2e58 s3-cli_pipe: fix timeout in rpc_pipe_open_tcp_port().
       via  ce1cebd s3-util_sock: very brief documentation for open_socket_out().
       via  ac1aac8 s3-lib Remove unused skip_unibuf()
       via  c8e5d9a s3-lib Remove unused #define
       via  4b4287d s3: Fix Coverity ID 2470: STRAY_SEMICOLON
       via  5abee95 s3:idmap_tdb2: fix build of tdb2
      from  21b73d1 WHATSNEW: Start release notes for 3.6.0pre3.

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


- Log -----------------------------------------------------------------
commit 0cfe9418ff920b8b98c8d129d7e9ce394394f22c
Author: Karolin Seeger <kseeger at samba.org>
Date:   Tue Apr 26 19:58:48 2011 +0200

    WHATSNEW: Update changes since pre2.
    
    Karolin
    (cherry picked from commit 6f4ce6270bd32566d85d75f00aa966c964827cdb)

commit 5e6e0a4a9931cf1c1a5a83a4453de77acd11231f
Author: Günther Deschner <gd at samba.org>
Date:   Tue Apr 26 14:58:01 2011 +0200

    s3-utils: Fix Bug #8106. Fix the build of smbget on HP NonStop.
    
    Guenther
    
    Autobuild-User: Günther Deschner <gd at samba.org>
    Autobuild-Date: Tue Apr 26 16:41:17 CEST 2011 on sn-devel-104
    (cherry picked from commit 633dbabe912f43fd4199453720fab299ccfefe03)
    (cherry picked from commit dfe0029521f67163bdea3f82ccd90d91f82d74e6)

commit c2e5a3841f59ce512b79d433811fa9607ffb8156
Author: Günther Deschner <gd at samba.org>
Date:   Fri Apr 22 00:49:54 2011 +0200

    s3-waf: try to fix the build on sunos5.
    
    Guenther
    (cherry picked from commit 0e003515703469e9f66f5119d401366697cdb767)
    (cherry picked from commit 47a442c221024d5b18a61ce1c4c3b6bfd8c2fa6e)

commit 03e2bcc09139cd8d6183626df9f766a080558fb4
Author: Günther Deschner <gd at samba.org>
Date:   Fri Apr 22 00:49:28 2011 +0200

    s3-waf: fix typo in comment.
    
    Guenther
    (cherry picked from commit a505806aa088470c74ad3fbffac223d5400481fc)
    (cherry picked from commit 77ecb74ac65fe12b387312f079aa4795076de791)

commit 697c671d36ac66c7844f4f7d9aba1eeec39033c6
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Apr 26 12:40:07 2011 +0200

    s3: Fix a typo
    
    Autobuild-User: Volker Lendecke <vlendec at samba.org>
    Autobuild-Date: Tue Apr 26 13:31:08 CEST 2011 on sn-devel-104
    (cherry picked from commit 77ea148f7fca0b3d19fa5d4ec99010bba55c618d)
    (cherry picked from commit 218e1fc61d91020faf08cfc9f8b0a9b3e483ebb4)

commit 23ad5e73dca62d7c502427611411d46087d2fb81
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Apr 25 20:05:31 2011 +0200

    s3: Allow unlimited parallelism in pthreadpool
    (cherry picked from commit dbc36befb5459cd59ffe2527261886ec962ea941)
    (cherry picked from commit efc70fd0039302daa97223004d56f8c87f63a0df)

commit ea15312c98ee51a7f96a6d7db6f1bc663feb31da
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Apr 25 18:29:59 2011 +0200

    s3: Remove unused code
    
    This is done in name_query_send these days
    
    Autobuild-User: Volker Lendecke <vlendec at samba.org>
    Autobuild-Date: Mon Apr 25 19:24:58 CEST 2011 on sn-devel-104
    (cherry picked from commit 80c395aef44785497387d8c41eb767efa435bf3e)
    (cherry picked from commit 4572b3334f3a24facae6842087ac5cf649a6b0a2)

commit a900d4b61ab40d1d8ecb60dbe8eab5f48c10e64c
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Apr 25 17:37:08 2011 +0200

    s3: Move setting the name_query timeout
    
    An async caller might want a different timeout behaviour
    (cherry picked from commit a3d35ac44b53b8a79eac5c927ff771c1c6ceec12)
    (cherry picked from commit 60b221587baeb6ced2ef2bf0559802c3756b1c74)

commit 912e2ac9c97d3656e0cd0e524589375bbac8fe85
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 25 12:45:49 2011 -0700

    No longer need to call SMB_VFS_LSTAT - check name hasn't changed above is sufficient.
    
    Autobuild-User: Jeremy Allison <jra at samba.org>
    Autobuild-Date: Mon Apr 25 23:35:37 CEST 2011 on sn-devel-104
    (cherry picked from commit d00f1febd50b4779e8c5588055ee1f601448550c)
    (cherry picked from commit e4f6038fdefafd0e1020782f265843577bd44b53)

commit 91669776c82bd386dc16c915c77a0159b05e6a81
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Apr 21 22:29:06 2011 -0700

    Correctly detect and deny symlinks anywhere in a path (not just the last component) if "follow symlinks = no".
    (cherry picked from commit eeb24c17739dd0bccf561b142841a7d2e560cdd0)
    (cherry picked from commit 78623e8ab4cef8e28194260dbb87535402cafd30)

commit fe44df964f694e5e6fbadecf8fe5fc8423757a72
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 25 13:12:23 2011 -0700

    s3-selftest Rename s3 DC environment to s3dc
    
    This should avoid a clash with the s4 DC environment in a future
    combined 'make test'.
    (cherry picked from commit 2698b40a3d920cfc5bb85333818d98f2fced9d9d)

commit 6f971090309ce1cc2de9428a520c7d6dcf02bb0f
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon Apr 18 13:44:36 2011 +1000

    selftest: put the target on the environment
    
    This will allow us to have a 'switch' target type that creates
    environments from Samba3 or Samba4 as required.
    
    Andrew Bartlett
    (cherry picked from commit d041ed233d1b10604ef1b9f7f1e68f6f5cd96132)
    (cherry picked from commit 2df698ffec823938566de0a3c7120d149b57bf0a)

commit 945555db4d6b4ba2cba021515e7116c0aaea2b47
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Apr 24 10:36:56 2011 +0200

    s3: Run pthreadpooltest in make test
    
    Autobuild-User: Volker Lendecke <vlendec at samba.org>
    Autobuild-Date: Mon Apr 25 10:39:12 CEST 2011 on sn-devel-104
    (cherry picked from commit 422b2fa0d064f2afeeec400223bb8a47deecc4a5)
    (cherry picked from commit 4aba6e44cbd2d3cb3b20d864008971f424d99878)

commit 0b4acbbe93ea6275b7fbd8a8207d16dbd3498c85
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Apr 23 16:49:04 2011 +0200

    s3: Add pthreadpooltest to main build
    (cherry picked from commit 39375de8354b676904e1fea097a68178acd987e4)
    (cherry picked from commit 37d963684aae4c80c4a3286bb22503592156b630)

commit 383ced7969c8ff3fc83dabcdc864ab1dc4f9d7c3
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Apr 24 10:09:45 2011 +0200

    s3: pthreadpool_sig_fd->pthreadpool_signal_fd
    (cherry picked from commit f4a0f856f31291dd316a937f8060d2f205e8d4d6)
    (cherry picked from commit 28394b98affe38650c56cf37e110d08c71145f0f)

commit 7f6d69339582b9ca80023f68cdd83d8cd165a1cd
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Apr 23 22:25:36 2011 +0200

    s3: Tiny doc for pthreadpool
    (cherry picked from commit 3c405f5e1d81d33a01ab822aeba93634338d5b25)
    (cherry picked from commit 39ab4b06f8fde50489d68a554102fdcea78c1fec)

commit f658c6a9c30e052aee38a8cea53d494d9170deba
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Apr 22 11:47:11 2011 +0200

    s3: Many pthreadpool fixes
    
    In particular, this makes it fork-safe
    (cherry picked from commit 62689d8166b8e070f855e6910470796dd7e1b2c8)
    (cherry picked from commit 2caf8e097cd8f724c7cd93c3f8e1fc3cd095d8ff)

commit 93ae867c46644ded91cffcf04c9520fdcf6b27c5
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Apr 23 10:31:14 2011 +0200

    s3: Fix Coverity ID 2478, UNINIT
    
    Autobuild-User: Volker Lendecke <vlendec at samba.org>
    Autobuild-Date: Sat Apr 23 14:11:22 CEST 2011 on sn-devel-104
    (cherry picked from commit 123e5c1a75a7e6cfe245af05d2954ab126238acf)
    (cherry picked from commit 5f21737a7413750622d87f1f71dbd6eec843e882)

commit ed764893d2674cb6f9d80409e7df7948c24b795f
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sun Apr 24 00:00:40 2011 +0200

    s3:rpc_client: map fault codes to NTSTATUS with dcerpc_fault_to_nt_status()
    
    Most fault codes have a NTSTATUS representation, so use that.
    
    This brings the fault handling in common with the source4/librpc/rpc code,
    which make it possible to share more highlevel code, between source3 and
    source4 as the error checking can be the same now.
    
    metze
    
    Autobuild-User: Stefan Metzmacher <metze at samba.org>
    Autobuild-Date: Sun Apr 24 10:44:53 CEST 2011 on sn-devel-104
    (cherry picked from commit f7bc84409a7a6736ec2cf1110dd7200a954e3b7e)
    (cherry picked from commit 7031faeefc1c9ec5af5fdaee0bcfd3410640ff00)

commit 17f5c8cbd4901ea4cf8de390b84568bd89aef967
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Apr 23 23:57:19 2011 +0200

    s3:winbindd: let winbindd_lookup_names() use dcerpc_binding_handle functions
    
    metze
    (cherry picked from commit e7cf7204e60552b45952325f343ea894fda21346)
    (cherry picked from commit f8415f5cefa640a4da513335bc2d00a1bdc30bdf)

commit baed562ca01b4f76b120f2432e8741ab8f3456f6
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Apr 23 23:56:27 2011 +0200

    s3:winbindd: let winbindd_lookup_sids() dcerpc_binding_handle functions
    
    metze
    (cherry picked from commit 7309daa532c9689d64ce3f33da522f23635213d6)
    (cherry picked from commit 8b9bb30a6cc21152b642a8382cc2876d189cacde)

commit 24968c3dd42151e5c4731e76bab44be7471d1921
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Apr 25 17:40:25 2011 +0200

    docs-xml/smb.conf.5: %i and %I no longer contain IPv4 mapped IPv6 addresses
    
    metze
    
    Autobuild-User: Stefan Metzmacher <metze at samba.org>
    Autobuild-Date: Mon Apr 25 18:38:16 CEST 2011 on sn-devel-104
    (cherry picked from commit 7269e455a7d4f659777b4ab7db5d8b68376c8d19)
    (cherry picked from commit 632e11fa52cc790e962808e67da36ba0155f53b5)

commit b6295b21ebf34a5d80948f51850d212aceb4efe3
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Apr 23 11:29:51 2011 +0200

    s3:lib/util_sock: listen on IPv6 addresses with IPV6_ONLY (bug #7383)
    
    This avoids getting IPv4 addresses as mapped IPv6 addresses
    (e.g. ::ffff:192.168.0.1).
    
    Before the bahavior was inconsistent between operating system
    and distributions. Some system have IPV6_ONLY as default.
    
    Now we consistently get AF_INET for IPv4 addresses and AF_INET6
    for IPv6 addresses.
    
    It also makes it possible to listen only on IPv6 now
    as "::" doesn't imply "0.0.0.0" anymore. Which also
    avoids confusing log messages that we were not able to
    bind to "0.0.0.0".
    
    metze
    (cherry picked from commit a3a38ee90ab4ab2be68ac71d9c581daa6b9ee189)
    (cherry picked from commit c4c49be416aeac890628c9a9f2fd7975860884d4)

commit 291f337d4d58e55f00f0b6a3b082fa5128f80126
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sun Apr 24 21:20:19 2011 +0200

    s3:lib/access: normalize IPv4 mapped IPv6 addresses in both directions (bug #7383)
    
    metze
    (cherry picked from commit 4bfe2d5655d97fbc7e65744425b5a098e77f5ba1)
    (cherry picked from commit 62b2083c627abeb8a2fb7e5adc793c630d0d561c)

commit 29115cdfcc734e903071aae345a77a784a1efe2e
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Apr 23 11:01:34 2011 +0200

    lib/util: add RBVAL, RBVALS, RSBVAL and RSRBVALS macros
    
    They pull and push [u]int64_t values in big endian.
    
    metze
    (cherry picked from commit c0441b17e6580de65d87d28bfd9ae72d09a3508f)
    (cherry picked from commit 79c65e434283f41a1739cdbc132f0e78010b0b47)

commit ce23bb048a642f3e1072effc614fe897f785d52c
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Apr 23 11:15:30 2011 +0200

    s3:includes: simplify INO_T_VAL macros
    
    metze
    (cherry picked from commit 5b327085775f279976c66cdd5f105132fda0965a)
    (cherry picked from commit 0ef0fd81ba863379f28e1bde2808fc48fbe38d4b)

commit 8196c377ac286e9ded709f020e657847c970581d
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Apr 23 11:10:05 2011 +0200

    s3:includes: simplify BIG_UINT macros
    
    metze
    (cherry picked from commit d7aa2eb7b664c10551cb45c36d3b564d829e9d44)
    (cherry picked from commit 90edf53dd5d3768ad97748cca90cb177709223dd)

commit 09b4ca5e50c8223ad8a661014c5d55929ad8b065
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Apr 23 10:30:59 2011 +0200

    s3:smbd/trans2: make use of BVAL() and remove ugly LARGE_SMB_OFF_T ifdef's
    
    We rely on uint64_t for a long time now...
    
    metze
    (cherry picked from commit 9127e555ab043000adc516a9177e43812e52fd4b)
    (cherry picked from commit 3a9f8ec79c8a80430df81d97833f9c2816cfaef6)

commit b11a83ba8286692600fb3f4da1cb146827e5cbdc
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Apr 23 10:17:27 2011 +0200

    s3:include/vfs.h: remove very old hints for vfs modules with interface version < 8
    
    The interface version is at 28 now, and this defines cause problem
    on some systems, e.g. Tru64 defines vfs_init in the system headers.
    
    metze
    
    Autobuild-User: Stefan Metzmacher <metze at samba.org>
    Autobuild-Date: Sat Apr 23 12:07:35 CEST 2011 on sn-devel-104
    (cherry picked from commit 64e7fba1be0d2897c5cee40b41f869bd9e5b272a)
    (cherry picked from commit b82b990e30fe54d2733c4eb58e6e184c99a1acfe)

commit e786be820f828bc3453c36256a9bac7a1f605f8e
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Apr 23 10:30:59 2011 +0200

    s3:smbd/nttrans: make use of BVAL() and remove ugly LARGE_SMB_OFF_T ifdef's
    
    We rely on uint64_t for a long time now...
    
    metze
    (cherry picked from commit 4a4a774e61aa5d95fa4c90485c538629ce5d0c92)
    (cherry picked from commit ae132446595bf6af167d32c32430e8dceecc94a0)

commit 621f9b247adfd3309ac9c850ef918924a8d5ab16
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Apr 23 10:27:37 2011 +0200

    s3:lib/sysquota: remove ugly LARGE_SMB_OFF_T ifdef's
    
    We rely on uint64_t for a long time now...
    
    metze
    (cherry picked from commit 5186209277e0fec5c9f0c4df2ac57a5e16f74470)
    (cherry picked from commit 005ec263ac515bf76915a3364bd89d9ccf172107)

commit 5b65359bf884cf877a2302f65a366748395b79a9
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Apr 23 10:22:32 2011 +0200

    s3:libsmb: make use of BVAL() and remove ugly LARGE_SMB_OFF_T ifdef's
    
    We rely on uint64_t for a long time now...
    
    metze
    (cherry picked from commit 75ad18037955b1e787e48648a09b0016b1cdce8f)
    (cherry picked from commit 9e944049ea2b1cf6f7aed2e3b6319bb5138a5b65)

commit 7f2fda3e9f701ba38ef3b65a568991a14cfd6770
Author: Karolin Seeger <kseeger at samba.org>
Date:   Mon Apr 25 19:31:32 2011 +0200

    WHATSNEW: Update changes since pre2.
    
    Karolin
    (cherry picked from commit 6c08f12699e8c527c26dae042e74d0453ebb6bf5)

commit df075583f06f91d03345a7f79568a58db5ca52be
Author: Karolin Seeger <kseeger at samba.org>
Date:   Mon Apr 25 19:22:44 2011 +0200

    WHATSNEW: Add changes since pre2.
    
    Karolin
    (cherry picked from commit 423bad15899fb28bb7fa3ed4e02718cc478e29d1)

commit c70b385c8f915edd1f7496edce4eca276ec7c505
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Apr 17 20:16:07 2011 +0200

    s3: Add a 10-second timeout for the 445 or netbios connection to a DC
    (cherry picked from commit 23a6af46c84cd9b738af403d80c5187d858eac03)
    (cherry picked from commit 6be972bd5b55c29f3a3a1ebcbee654a2ece020b6)

commit 15758e18a9d921bfb2f78d05d7000375357cada1
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Apr 22 10:05:42 2011 +0200

    s3: Fix Coverity ID 2047, UNUSED_VALUE
    
    Autobuild-User: Volker Lendecke <vlendec at samba.org>
    Autobuild-Date: Fri Apr 22 10:53:24 CEST 2011 on sn-devel-104
    (cherry picked from commit b48e22347d9b2d0b3b128197b4ef662558b0f2e9)
    (cherry picked from commit 045895d9e23edc6aa47f90eefe92799c80f746a3)

commit 1523a3f8cf75869b0bb5eb16745ffd280998755b
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Apr 22 09:51:42 2011 +0200

    s3: Fix Coverity ID 2325, RESOURCE_LEAK
    (cherry picked from commit 726fa732facef55da6a27750f9daf12145db6639)
    (cherry picked from commit fab8a81963897659814b339254f2409292272a5d)

commit 00c1bfa59f9a7d760cfdb9c8ab28c58df54978d4
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Apr 22 09:48:10 2011 +0200

    s3: Fix Coverity ID 2336, NULL_RETURNS
    (cherry picked from commit f9e3af71d391027de353f0240f70e425e766c0e5)
    (cherry picked from commit ec2513cc5baa1aafc173887a7dec45660506cf35)

commit 851f2776a138dc28f82fbb609c93ac4067945626
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Apr 22 09:45:54 2011 +0200

    s3: Fix Coverity ID 2335, CHECKED_RETURN
    (cherry picked from commit 018595e2587b5b5dd90bf318a1cf8b675e47b66b)
    (cherry picked from commit 13d72e42e17c05c63670ce102981e9f8dd038290)

commit 0b28b16fba21360b548a90123888b93985676ceb
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Apr 22 09:41:52 2011 +0200

    asn1: Fix Coverity ID 2299, CHECKED_RETURN
    (cherry picked from commit 4981adcca37391b6745f10f5849fedd7c944410d)
    (cherry picked from commit ec3ca4ba431fdccfb3fdd3ddf13189158db8ab62)

commit 26e5d22bb2949695b4e3e5e954eef0af42c65a9c
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Apr 22 09:39:37 2011 +0200

    s3: Fix Coverity ID 2307, NULL_RETURNS
    (cherry picked from commit 3e8a8fad59cfdd053ad96afc39ea7d6e98b91764)
    (cherry picked from commit 135cb711f0b052c37595f64e1859606c8d0e58b2)

commit d63beb2850afe0553876fa441aeba3b2c9f11f1f
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Apr 22 09:34:35 2011 +0200

    s3: Fix Coverity ID 986, BUFFER_SIZE_WARNING
    
    strncpy can leave the destination unterminated
    (cherry picked from commit 9a0676d5c947033ac41f700be9ba92ab1666814e)
    (cherry picked from commit e3c271560adfab50568e06c7bfaba02cb5aae997)

commit dceb06abb4a52662f87c9b41882b34aa8575873f
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Apr 21 22:09:27 2011 +0200

    s3: Fix Coverity ID 1340, NULL_RETURNS
    (cherry picked from commit 7e7ad53cbd77ce2201fd46bd2c08a601725f9f5b)
    (cherry picked from commit 139336bd8b58cea93c82f7da9c100d6cccfe5180)

commit c6ab87553024b8f2ead8b44959745f9c8bf49fc4
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Apr 21 17:25:13 2011 -0700

    Cosmetic. Fix bad indentation.
    
    Autobuild-User: Jeremy Allison <jra at samba.org>
    Autobuild-Date: Fri Apr 22 03:16:43 CEST 2011 on sn-devel-104
    (cherry picked from commit e919e767fb846fc91160cf44cbc838a9b4f2a832)
    (cherry picked from commit 67636bb27c75fb291a8adf36c6da0903fea3a8e9)

commit c51a61d5417a8046caf51fa525e87c93c03ed48b
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Apr 21 17:22:44 2011 -0700

    Fix compiler warning in debug message.
    (cherry picked from commit 644046f064d73ff97f95a7dfbc5fca199f0dd973)
    (cherry picked from commit 5adbcb5b293effd7cf26fd38f1cde821671b2085)

commit ce81f2b07564649ef1dd30d75c9065b9b4044327
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Apr 21 16:50:49 2011 -0700

    Remove duplicate code - move to parent_dirname() as a common function.
    (cherry picked from commit 20baa11f33c5282c609258e21a07c7255df7ae30)
    (cherry picked from commit 42b2f84837f3978b0c24f3374dd876e7d7d84de7)

commit 72810b332afbf69f0a9907b2761fd1fb72108916
Author: Günther Deschner <gd at samba.org>
Date:   Wed Apr 20 22:55:25 2011 +0200

    s3-vfs: rename open function to open_fn.
    
    This should finally fix the AIX build and allow to remove AIX specific ifdefs.
    
    Guenther
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User: Jeremy Allison <jra at samba.org>
    Autobuild-Date: Thu Apr 21 02:01:20 CEST 2011 on sn-devel-104
    (cherry picked from commit c7073f8b545976719bfdba7b7bbd460d595041d5)
    (cherry picked from commit 02770631597d489851e52521a3f438533d18055e)

commit d83a44d7f3220f4d06e4c85dbef9e7419ce84f73
Author: Günther Deschner <gd at samba.org>
Date:   Wed Apr 20 18:21:25 2011 +0200

    s3-build: move MAP_FILE define to the only place used.
    
    Guenther
    
    Autobuild-User: Günther Deschner <gd at samba.org>
    Autobuild-Date: Wed Apr 20 19:16:47 CEST 2011 on sn-devel-104
    (cherry picked from commit 0b89ce671250daddc86400ef4e1996c37c126025)
    (cherry picked from commit c65b54c8ee1b9c1982eb81a1d7fa43ae46c0a378)

commit 6dd8807b86bb975b5c64df6c20eba4a2ddf591bb
Author: Günther Deschner <gd at samba.org>
Date:   Wed Apr 20 17:53:43 2011 +0200

    s4-smbtorture: restructure documentname handling in spoolss test a bit.
    
    Guenther
    (cherry picked from commit c8f9515f193e634da2ef01c525e2a05a3d519862)
    (cherry picked from commit bb88fdade421b0226805d32c448fa1be9eb7faa5)

commit 36824e24d5cc4de41df1487da35c494fd2c29824
Author: Günther Deschner <gd at samba.org>
Date:   Wed Apr 20 17:19:15 2011 +0200

    s3-spoolss: fix debug statement in spoolss_addprinterex_level_2().
    
    Guenther
    (cherry picked from commit 0cf9b47725b50fd916a7ca56ca3f7e9c9263411a)
    (cherry picked from commit 3d14ed92bb698a5f0f33c10f65cc840b330bb65c)

commit f774789fadf24a86e51a11625fefe09c441ed905
Author: Günther Deschner <gd at samba.org>
Date:   Wed Apr 20 17:54:24 2011 +0200

    s3-smbd: fix the AIX 5.3 build.
    
    (AIX defines open to be open64)
    
    Guenther
    (cherry picked from commit ae61a5c3d05192457f5a0b24dd9bd34317df566f)
    (cherry picked from commit 317b5d8fad7320f186c71b64d4d0470be634c71d)

commit aaf05c80c7784847537353ffd2ba30ee833bc75a
Author: Simo Sorce <idra at samba.org>
Date:   Sat Apr 9 22:21:35 2011 -0400

    tdb_backup: avoid transaction on backup file, use lockall
    
    Transactions have the side effect of generating bigger files.
    By removing the transaction files get as much as 30% smaller.
    
    Autobuild-User: Simo Sorce <idra at samba.org>
    Autobuild-Date: Tue Apr 19 23:34:37 CEST 2011 on sn-devel-104
    (cherry picked from commit 1804d9a64662d37f6c7c50bdd7b8edd80f42192b)
    (cherry picked from commit 9953e698611defdd6919883a965bdfc12ce51bd5)

commit 2b6dbd2883749090d451ecd12e56849decf66219
Author: Sergey Korsak <skif at 1plus1.net>
Date:   Mon Apr 18 14:48:47 2011 +0200

    Fix Bug #8099 setpwent() actually does endpwent() and vice versa on FreeBSD
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    
    Autobuild-User: Günther Deschner <gd at samba.org>
    Autobuild-Date: Tue Apr 19 19:15:14 CEST 2011 on sn-devel-104
    (cherry picked from commit 9bf3dc3ca796f2b90acf7e21b0eefdce444147e1)
    (cherry picked from commit 77b0bcca87114a51c273e98a1e5776da69024aa6)

commit ad1d30824163befc10e7a4395e501b0b0e5e2d97
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Tue Apr 19 21:00:59 2011 +0930

    tdb: make sure we skip over recovery area correctly.
    
    If it's really the recovery area, we can trust the rec_len field, and
    don't have to go groping for bitpatterns.
    
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
    
    Autobuild-User: Rusty Russell <rusty at rustcorp.com.au>
    Autobuild-Date: Tue Apr 19 14:15:22 CEST 2011 on sn-devel-104
    (cherry picked from commit 36cfa7b79e36d880cdbf24d0769558be44d0edda)
    (cherry picked from commit 261264325e5e1e71e114a26d4e1daa33e5c2e80d)

commit c6977dcf1ed78569022f92a06d659fe6bc26b862
Author: Simo Sorce <idra at samba.org>
Date:   Mon Apr 18 22:15:11 2011 +0930

    tdb_expand: limit the expansion with huge records
    
    ldb can create huge records when saving indexes.
    Limit the tdb expansion to avoid consuming a lot of memory for
    no good reason if the record being saved is huge.
    
    (cherry picked from commit cb884186a55c9ef8aca6ee48b16423b3c881e689)
    (cherry picked from commit 84a264a6f05675302b79eaf3da1edb45697836a6)

commit e8e04158b6990673a8f3534f50d8864069f17f91
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Apr 18 22:15:11 2011 +0930

    tdb: tdb_repack() only when it's worthwhile.
    
    tdb_repack() is expensive and consumes memory, so we can spend some
    effort to see if it's worthwhile.  In particular, tdbbackup doesn't
    need to repack: it started with an empty database!
    
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
    
    (cherry picked from commit 094ab60053bcc0bc3542af8144e394d83270053e)
    (cherry picked from commit 51761dbcb07f98168ede2fc54be633d4ecee69a2)

commit beacde8a0ce6b6f4f91f8be4aa604694b2e1ff7e
Author: Rusty Russell <rusty at rustcorp.com.au>
Date:   Mon Apr 18 22:15:11 2011 +0930

    tdb: fix transaction recovery area for converted tdbs.
    
    This is why macros are dangerous; these were converting the pointers, not the
    things pointed to!
    
    Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
    
    (cherry picked from commit 6aa72dae8fc341de5b497f831ded1f8f519fa8fb)
    (cherry picked from commit 59cccbf09e53b457bc400edd371e092ed8259acb)

commit f09bc1f520cebc37a163b306371c5beb850c8f31
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Apr 18 14:32:11 2011 -0700

    Fix bug 8088 - rpccli_samr_chng_pswd_auth_crap segfaults if any input blobs are null.
    
    Correct fix - ensure we have enough length, and correctly null out
    passed in structs if not.
    
    Jeremy.
    
    Autobuild-User: Jeremy Allison <jra at samba.org>
    Autobuild-Date: Tue Apr 19 00:17:08 CEST 2011 on sn-devel-104
    (cherry picked from commit bde2bcc8efd735d08b55ac3083d7b0f6490100d0)
    (cherry picked from commit 19af6216877577b11f97e132faebcfe1c15a3f7d)

commit ac578cbd6b852d60c49a101b9f81888214ae0b23
Author: Günther Deschner <gd at samba.org>
Date:   Fri Apr 15 12:39:15 2011 +0200

    s3-build: fix the --with-profiling-data build on mac os x.
    
    Guenther
    
    Autobuild-User: Günther Deschner <gd at samba.org>
    Autobuild-Date: Fri Apr 15 13:33:43 CEST 2011 on sn-devel-104
    (cherry picked from commit 0e18a59ed0aa48a8a9dee856faf05c1ad624e264)
    (cherry picked from commit 7299c198268530d40c282c20b230be629e961fdd)

commit 9663850c084d1f7c4b36ad3ec7aaabdb17d92b2c
Author: Kai Blin <kai at samba.org>
Date:   Mon Apr 18 14:55:51 2011 +0200

    s3 waf: Mimic the autoconf check for netgrent
    
    The autoconf check for netgrent headers makes sure that the compiler flag used
    (-Werror-implicit-function-declaration) is recognized by the compiler before
    using it for the test. Mimic this behaviour in the waf checks.
    Thanks to gd for noticing this.
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    
    Autobuild-User: Günther Deschner <gd at samba.org>
    Autobuild-Date: Mon Apr 18 16:24:15 CEST 2011 on sn-devel-104
    (cherry picked from commit c2a62e854632dcae69a5ae911b6ab11e272d0a81)
    (cherry picked from commit 2789b8bf8027d2a3ce6a588b8f005e8e9536ba30)

commit 9e5c9ef0c3965d099d1d4d76b75d54ee3f889a51
Author: Kai Blin <kai at samba.org>
Date:   Mon Apr 18 14:48:47 2011 +0200

    s3 autobuild: Fix CFLAG check for netgrent tests
    
    In 45ac8ffd I accidently added the wrong flag check. Fix this.
    Thanks to gd for noticing.
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    (cherry picked from commit d09f02909f6adae1d68264bd3790c77fcee5e80d)
    (cherry picked from commit e9b9e6bdd9d5663f04f31edf465d67aec0d0c500)

commit 3c56f98c606e7c5c4cc8a2a67a516ee43c6e5e19
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Apr 14 11:06:00 2011 +0200

    s3: Fix a typo
    
    Autobuild-User: Volker Lendecke <vlendec at samba.org>
    Autobuild-Date: Thu Apr 14 11:55:56 CEST 2011 on sn-devel-104
    (cherry picked from commit 15d6c7070770b3146c510996ab24afbdf8034ee8)
    (cherry picked from commit 7abd8b7b865cab12504ea337c1bbd3c4ee9e0c05)

commit ad689c9da70adade5cd5f088eca011038c43b33c
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Apr 16 15:27:53 2011 +0200

    s3: Remove an unused variable
    (cherry picked from commit 35c71231accaa2f24a70f4066b967fa4999428f1)
    (cherry picked from commit 3eb3a4f733b5a042f0ad5e0bcc59d2db011e7c73)

commit 59e018840496a9352dbb3b06f64d5afb414ecec2
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Apr 2 16:02:23 2011 +0200

    s3: Use tevent_req_nterror properly in a few places
    (cherry picked from commit 10a552a9570bd274796639ba80d46d2d22828271)
    (cherry picked from commit 8894994b61dd8701806daae123bc615f5ee47390)

commit 69ab8a441369ddea3269e99a9234499ceb4ec356
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Apr 2 23:53:27 2011 +0200

    s3: guest sesssetup is only 13 words
    (cherry picked from commit 69650a2aaa8649570261df7efccb35ad76d7cfc1)
    
    Autobuild-User: Volker Lendecke <vlendec at samba.org>
    Autobuild-Date: Sat Apr 16 16:20:08 CEST 2011 on sn-devel-104
    (cherry picked from commit ca5dcf241289fb3489bf9da9ea5dfd1de0a67fab)
    (cherry picked from commit 269af1a75eeb89f7fb9eb4eaa8291c9f8d58e108)

commit f8a797138566d4a85ec8101fabbfa54642fd639d
Author: Volker Lendecke <vl at samba.org>
Date:   Sun Apr 17 11:32:28 2011 +0200

    s3: Use \0 instead of NULL when 0-terminating a string
    
    Autobuild-User: Volker Lendecke <vlendec at samba.org>
    Autobuild-Date: Sun Apr 17 12:26:15 CEST 2011 on sn-devel-104
    (cherry picked from commit 0bf7c9646413673e24cfea94eb74dce88f79c470)
    (cherry picked from commit 3038237d1674013d523897c342e39b90c3ffe9cd)

commit d3d4043e2e2fb907cf80962073ab7d8bf1a97beb
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Apr 15 16:30:17 2011 -0700

    Trying to track down the SMB2 error. Add an invariant test.
    
    Autobuild-User: Jeremy Allison <jra at samba.org>
    Autobuild-Date: Sat Apr 16 02:15:38 CEST 2011 on sn-devel-104
    (cherry picked from commit 82fdad8a4c1e45d171a75b133eff8f9768edd682)
    (cherry picked from commit e55baa472e0deac16c5f3951420e18ef4216ac43)

commit c30fcdb7ca85e82918a551da8d5dd3a563e77467
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Apr 18 13:53:51 2011 +0200

    s3: Fix the build of vfs_gpfs.c
    
    Autobuild-User: Volker Lendecke <vlendec at samba.org>
    Autobuild-Date: Mon Apr 18 14:40:07 CEST 2011 on sn-devel-104
    (cherry picked from commit 83a0b94cf8c3a1a96d6060c21f0c93dfb67640d8)
    (cherry picked from commit ca44693196a97f53a1e84f2a4dfc7ce214663f25)

commit 5828355a69305b233e5241ce5cb3005d2203b6f7
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Apr 15 10:49:34 2011 -0700

    Use handle based xattr set if available.
    
    Autobuild-User: Jeremy Allison <jra at samba.org>
    Autobuild-Date: Fri Apr 15 22:11:12 CEST 2011 on sn-devel-104
    (cherry picked from commit e49893c68ef29f71ac6301f3955a7404e9c6daba)
    (cherry picked from commit c903dac2eb28c9807d6f42a499d7895054c52529)

commit 974e7827861908c634537736a918c4e4319d9627
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Apr 15 12:21:39 2011 -0700

    Ensure vfs_chown_fsp() is safe against races.
    (cherry picked from commit 525ccd589ede79e97e83699629a1d98538855803)
    (cherry picked from commit 525afe18d46e4e874d2eea3339505aede5d1ba69)

commit d2b3417d7028b00e40fa5c9bde6c6fd0dbe8e7c5
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Apr 7 22:03:49 2011 +0200

    s3: Fix bug 8066, wrong output in smbget
    
    Autobuild-User: Volker Lendecke <vlendec at samba.org>
    Autobuild-Date: Fri Apr 15 09:32:55 CEST 2011 on sn-devel-104
    (cherry picked from commit 53f50c2268122e648a09e4b0643cd29fcc7a4bfd)
    (cherry picked from commit bb47e2b46de1974c05fd555528c1ca31c090a651)

commit 8e30f6d00c341d5a6562d4357f531b169f980e9b
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Apr 14 13:56:05 2011 -0700

    Ensure change_dir_owner_to_parent() can't be raced.
    
    Autobuild-User: Jeremy Allison <jra at samba.org>
    Autobuild-Date: Thu Apr 14 23:39:55 CEST 2011 on sn-devel-104
    (cherry picked from commit 4389bf4bc94eefe034e7551371e6e43cca8d8bdb)
    (cherry picked from commit 72c9b37d4c882838734aa48ad44eedbe32f6c606)

commit 1cf08cd85aea221a34c3c28bdb0531b32319b8d9
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Apr 14 13:20:08 2011 -0700

    Fix bug #8083 - "inherit owner = yes" doesn't interact correctly with vfs_acl_xattr or vfs_acl_tdb module.
    
    If "inherit owner = yes", pass in the directory owner and group
    owner as the target for CREATOR_OWNER and CREATOR_GROUP substitutions,
    and also as the owner and primary group of the new security descriptor
    being applied to the object.
    
    Jeremy.
    (cherry picked from commit 182eea9ae26804d7f4eedcfa09eef0342ec3db5a)
    (cherry picked from commit 86364679519c225eb262945f6fb5aa73fa382bd8)

commit f5a575620933d912e33ad9b1d67f331428b12912
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Apr 14 12:49:58 2011 -0700

    Optimization for change_file_owner_to_parent() and change_dir_owner_to_parent()
    
    Don't do the chown if the owner is already correct.
    (cherry picked from commit 9c2ba9436d1abe66c493a512702101f631946cdf)
    (cherry picked from commit 232e35b48cce6619e409ed07cd367cedd34624c3)

commit 8a5e6c3d7dc48219a100436419ec4922b1e811b0
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Apr 12 10:48:03 2011 +0200

    s3: Fix Coverity ID 2471: UNINIT
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    
    Autobuild-User: Günther Deschner <gd at samba.org>
    Autobuild-Date: Thu Apr 14 16:22:58 CEST 2011 on sn-devel-104
    (cherry picked from commit d9c1d1f709ba49e57762456e529e283825a4fd7a)
    (cherry picked from commit f8607bdd1ec8b77c7ff749ac886480ac5659c0fb)

commit a36d1c8999e2274efacb812d87889b8bb6d0d33c
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Apr 14 14:05:43 2011 +0200

    s3: Fix smbd with the async echo responder
    
    We need to read from the echo socket, pass the socket to read
    from down to the read routines
    
    Autobuild-User: Volker Lendecke <vlendec at samba.org>
    Autobuild-Date: Thu Apr 14 15:34:36 CEST 2011 on sn-devel-104
    (cherry picked from commit 8b5d163d89651764981521178bc00352397f10f3)
    (cherry picked from commit dc85e87977d48ed1b8287d13aa6256ccb13a2613)

commit 99a761bf80511110313c19e0fdad6559999d3257
Author: Günther Deschner <gd at samba.org>
Date:   Thu Apr 14 11:43:31 2011 +0200

    s3-build: make sure we pick up system tdb and talloc via #include.
    
    Guenther
    
    Autobuild-User: Günther Deschner <gd at samba.org>
    Autobuild-Date: Thu Apr 14 12:56:28 CEST 2011 on sn-devel-104
    (cherry picked from commit 7ece43b15e11ccff6181266d53c88c14271167c2)
    (cherry picked from commit b206ba95a15000a6973dfb992f3c7d8c06c58828)

commit 9fb6ecd1c217a830768b4fbcf231f89ae5759b5b
Author: Günther Deschner <gd at samba.org>
Date:   Thu Apr 14 00:52:45 2011 +0200

    s3-includes: move readahead prototype to its only user.
    
    Guenther
    (cherry picked from commit daea6a4b8cf48c96718d6f757d01c430d1811446)
    (cherry picked from commit 1fee51dc6daea2b13cc71bc6ebb9eb378277f944)

commit 2600f2283923e614fddf8cb216fe37fb968dea47
Author: Günther Deschner <gd at samba.org>
Date:   Thu Apr 14 00:36:23 2011 +0200

    s3: only include smb profiling where needed.
    
    Guenther
    
    Autobuild-User: Günther Deschner <gd at samba.org>
    Autobuild-Date: Thu Apr 14 01:31:39 CEST 2011 on sn-devel-104
    (cherry picked from commit 165521e20d8aea1e35cc68e39ced57de64f8e560)
    (cherry picked from commit 3b913b9f5d9d70e0fbe9004167e6e170a8a07ec1)

commit 59f36137c7719606308a87295e9b0df888fc82c8
Author: Günther Deschner <gd at samba.org>
Date:   Thu Apr 14 00:17:29 2011 +0200

    s3-waf: add --with-profiling-data configure option.
    
    Guenther
    (cherry picked from commit 1b4d27d45a55c66ed20de64c2fe299583a710ddd)
    (cherry picked from commit 155db1d43c5d4280f8e8e6a313bd2b7e43a09f33)

commit 240afb88964f3e6123fda77509b99a393b5cca33
Author: Günther Deschner <gd at samba.org>
Date:   Thu Apr 14 00:04:08 2011 +0200

    s3: fix the build of --with-profiling-data.
    
    Guenther
    (cherry picked from commit bae2ce805478099c1f436e42cd2f47b3ca0caefd)
    (cherry picked from commit 32fadd25cc9a34d18b6074725de69a71e767250a)

commit bdd6e27b9d7f065e9e80dffa85d9b7e4530d91eb
Author: Günther Deschner <gd at samba.org>
Date:   Wed Apr 13 23:48:33 2011 +0200

    s3-includes: only include acl prototypes when needed.
    
    Guenther
    (cherry picked from commit 321587e44a337e8c47ed3a3c22dd1243d06d8a26)
    (cherry picked from commit 4769d7a278a2ca7f6e84b2c54e031b5b42ca552b)

commit 3a1708a57a60685b9d904b666d5d0fc3cf718ae2
Author: Günther Deschner <gd at samba.org>
Date:   Wed Apr 13 23:34:51 2011 +0200

    s3-includes: absolutely no need to globally include debugparse.h
    
    Guenther
    (cherry picked from commit c4331f6fcfa68822193a7ac9697d14bf8e0cde3b)
    (cherry picked from commit b5e484a2013a2c461912c253626db0fbd2fc8b56)

commit 8d0acf96b5dbf17548c7b4a7e7cda4143def5753
Author: Günther Deschner <gd at samba.org>
Date:   Wed Apr 13 23:34:25 2011 +0200

    s3-includes: include lib/util/debug.h headers in includes.h not smb.h
    
    Guenther
    (cherry picked from commit b4e4b60719061a04f8b21a6fd9212f1411e6a3f6)
    (cherry picked from commit dac9b1d86bcfd17a733130ee19994a2ef9276253)

commit 8a68d062564cb4e7e0e829817c08d6e9eb39fe07
Author: Günther Deschner <gd at samba.org>
Date:   Wed Apr 13 23:33:49 2011 +0200

    s3-includes: remove unused schema_types enum.
    
    Guenther
    (cherry picked from commit 76d4ede6db5479c4d1436f249ddfeb355762ebc5)
    (cherry picked from commit f44238926ab907e7dc75b2179d4931d9bba281dc)

commit 9fec681597c342c968953beb227c348de6952721
Author: Günther Deschner <gd at samba.org>
Date:   Wed Apr 13 23:03:56 2011 +0200

    s3-includes: move struct pipe_open_rec to srvsvc rpc server.
    
    Guenther
    (cherry picked from commit e7821116d12b94635e7a1709f60809264d397025)
    (cherry picked from commit f37da62a177bd94176d072791d8cd324afce7ca1)

commit d3f43fd761c500a0b719c61f8f5acfb27e33800d
Author: Günther Deschner <gd at samba.org>
Date:   Wed Apr 13 14:32:55 2011 +0200

    s3-build: finally remove references to ndr and dcerpc headers that were included globally.
    
    Guenther
    
    Autobuild-User: Günther Deschner <gd at samba.org>
    Autobuild-Date: Wed Apr 13 23:07:05 CEST 2011 on sn-devel-104
    (cherry picked from commit c3d89911642a9d6bbcba9e51fa93e5254cd7b2fc)
    (cherry picked from commit d5fa93310f07370cb0c4f3b450b8d264b13ebf94)

commit fc2f1417eb8de568a6fc75a32551de63abf69e7b
Author: Günther Deschner <gd at samba.org>
Date:   Wed Apr 13 14:32:16 2011 +0200

    s3-rpc_client: add and use rpc_client/rpc_client.h.
    
    Guenther
    (cherry picked from commit 9824e2e5ee336aa6c72fb121935f364f3d8fea6e)
    (cherry picked from commit d029d1150189a0eacc111d5e4660a205d7a3dd31)

commit cc1760aab67943a9e01f4c02f7da85d60caeee8f
Author: Günther Deschner <gd at samba.org>
Date:   Wed Apr 13 13:33:30 2011 +0200

    s3-netapi: remove two shadowed variables.
    
    Guenther
    (cherry picked from commit d2d976d8351c4bf7557a7bd8509db4a644de913d)
    (cherry picked from commit 99e7b53771cc66750f1c1c20c5d591ba7ee2f435)

commit 5e3acc72c121a1a4cccca37ef5ae57a9dd35a97a
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Apr 13 14:53:26 2011 -0700

    Fix WAF build for sids2xids.
    (cherry picked from commit f0bfd05517f682743175a9a9c043f679a26804ce)

commit 72b39294f00b416dc7c6eca74179f787e2ec19cf
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Apr 11 17:26:35 2011 +0200

    s3: Add a test for sid2xids
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 50ce453d2d51ab865964a0603e1da80a3f15dbf6)

commit ee0195ef3a3b80ef01821d9f3082cd023679e9bc
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Apr 12 13:32:20 2011 +0200

    s3: Add some debug to winbindd_sids_to_xids
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit ba00567fb07152125a5c96762d00f65f3aa30d18)

commit 9333e1903e1ce193ded226f907f90ec5663a0460
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Mar 23 18:31:38 2011 +0100

    s3: Use wbcSidsToUnixIds in create_local_token
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit b82f664ff25c69071aa9df8776c6dd1802cdfde5)

commit 1e353cc2d1b5cb3d9dad0c2ac2905ed3c916ec82
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Mar 23 18:31:17 2011 +0100

    nsswitch: Add wbinfo --sids-to-unix-ids
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 813086f7085c46ac8533a999bd7956a9144dd3af)

commit 428350d104c7edc6d5744571b0175811cd431bfe
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Mar 23 18:30:32 2011 +0100

    libwbclient: Add wbcSidsToUnixIds
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 9d19ddd88c787323cd87463dbe02ac1098c1da79)

commit 1a545c97fb1087976822f7c69c3dc0c6d08d6f85
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Mar 23 18:29:45 2011 +0100

    s3: Export WINBINDD_SIDS_TO_XIDS via the winbind pipe
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit d6d33b7a5fcedb315bc3248a294402e804a8474c)

commit e042d3fd680c25f1fcb952504f613af11137ea28
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Mar 23 18:18:13 2011 +0100

    s3: Add wbint_Sids2UnixIDs idl & implementation
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit fbdb9c26b9d271e5ec1fa9f14b2eb2665c9b355c)

commit 22fecb9f741ae9425f6d91bbce0b6f0ca7c5153f
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Mar 23 18:15:34 2011 +0100

    s3: Make idmap_find_domain public
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit a1b061e4002075177bb52f55c256551793777c9c)

commit b21398e0eeb809eb31f98c14fd3688b2df278bef
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Mar 22 16:37:41 2011 +0100

    s3: Add is_domain_online
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 6430e41a1a86bb14a5c7558813659c7605e6fcea)

commit d72e485886a27013ce18899516f5ea0e276c4554
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Mar 9 16:36:20 2011 +0100

    nsswitch: wbinfo --lookup-sids
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit ffe63d9346bab939bafd04400fc94b3803247b36)

commit 0e76fe7560d19e696d2083ed2345b25cb77ddb14
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Mar 9 16:34:49 2011 +0100

    lib: Move next_token next to next_token_talloc
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit c932faed8a61053fcfb63bc9915baa4bfa2678d4)

commit fbc63501be0ac90f2e5a49a708b71176ff1b0efb
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Mar 8 18:01:21 2011 +0100

    libwbclient: Add wbcLookupSids
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 0b192c0a53966d823e0e6cf8c2ce3e489f58ff34)

commit 7e7a2c1d1ab83381522764101141ceb9062f1b42
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Mar 8 14:31:44 2011 +0100

    s3: Add winbindd_lookupsids
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit d061260ab43e89999ce1f2e2216ee9bf8147bba3)

commit b08c603b699174ecdb26609d973c4d96616f4cf3
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Mar 7 13:40:30 2011 +0100

    s3: Add wb_lookupsids
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 13fefb36c15364e4e46d4c696d03df786db495c0)

commit 1f11b8ac9ea91405e41c7a9a17be0f4a32b70d5f
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Mar 11 12:48:11 2011 +0100

    s3: Add wbint_LookupSids
    
    This will be called from wb_lookupsids to query remote DCs via lsa
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit b8d47ca8703b5bbacbbbcb8e4c651277683ef6da)

commit 83f1acc07f6ed594c9fc9a4cf6ff45da123cfd6f
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Mar 8 14:23:15 2011 +0100

    s3: Make parse_sidlist public
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 88bc0a25ff3c4bd71563c2d89d768e5dac4c52bf)

commit b9ef627c3e70d10c896a840e5f13fe789dc50fde
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Mar 7 20:27:30 2011 +0100

    s3: Simplify parse_sidlist
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit f54916e2db86e6d92f852439a74df44147f92515)

commit fc59f9daf288fec382e5e3f8065639c177a2a794
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Mar 7 20:16:13 2011 +0100

    Add dom_sid_parse_endp
    
    This returns a pointer to the first non-parsed character, along the lines of
    strtoul for example.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit 050cd77018006cdd87f7e64f9d10e67e4b84f1ea)

commit 1ac8681f97ee781d275f357a2f325d27f2fe8695
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Apr 13 20:33:45 2011 +0200

    s3:WHATSNEW.txt: remove the "strict allocate" default value
    
    commit dc36d75d5fddaa351025e8eb8140f401b66aeb9d
    reverted the change to true, because it makes Samba
    unusable on systems without Linux and a modern Filesystem.
    
    metze
    
    Autobuild-User: Stefan Metzmacher <metze at samba.org>
    Autobuild-Date: Wed Apr 13 21:21:10 CEST 2011 on sn-devel-104
    (cherry picked from commit 8acc57d6a26297d1430be0d73ce4dfbeba9a8b1c)
    (cherry picked from commit 0ec0aa8ee51742fa55714ce4efb09caa430bec90)

commit 04b59377f4f94598581e28ec1c9618aa94c814d1
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Apr 13 13:40:29 2011 +0200

    talloc: fix compiler warnings with -Wc++-compat
    
    metze
    
    Autobuild-User: Stefan Metzmacher <metze at samba.org>
    Autobuild-Date: Wed Apr 13 14:33:23 CEST 2011 on sn-devel-104
    (cherry picked from commit 94a97bf64cadf39b488158cc379aa0eeb10dbd88)
    (cherry picked from commit ad7b3ff05623fd189410c5a9602e1608724c9f2b)

commit ced2e589978d0392398b6c25807654f63598b54b
Author: Günther Deschner <gd at samba.org>
Date:   Wed Apr 13 17:41:36 2011 +0200

    s3-cli_pipe: fix timeout in rpc_pipe_open_tcp_port().
    
    Make sure we use a timeout of 60 seconds, not 60 milliseconds...
    
    This prevented us from successfully using the ncacn_ip_tcp client in a lot of
    places, I guess.
    
    Guenther
    
    Autobuild-User: Volker Lendecke <vlendec at samba.org>
    Autobuild-Date: Wed Apr 13 18:59:19 CEST 2011 on sn-devel-104
    (cherry picked from commit 4b3fe5247a6e16b1ad9f05269e9aa00e3120e36a)
    (cherry picked from commit ec1671ec9998bc581004fede4f60937d350f4df9)

commit ce1cebd67209b51594ea9a59ec191245b9d808f4
Author: Günther Deschner <gd at samba.org>
Date:   Wed Apr 13 17:35:44 2011 +0200

    s3-util_sock: very brief documentation for open_socket_out().
    
    The most important bit is to document that timeout is in MILLIseconds, not
    seconds.
    
    Guenther
    (cherry picked from commit 8b8014198c16a11f48e13e2c11f3114cd20ad8d3)
    (cherry picked from commit e7f38a78691277778af2cfb5c520643e5c6707c9)

commit ac1aac82af542da33cda91d580853cfa2cbbfc83
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue Apr 12 16:10:57 2011 +1000

    s3-lib Remove unused skip_unibuf()
    
    Signed-off-by: Andrew Tridgell <tridge at samba.org>
    (cherry picked from commit ba2b7f72c0459123c6bf88ee1c272e94dbfdcf9b)
    (cherry picked from commit 646cc4d380a7b0673afe5d2561f07c3b6e33ffe8)

commit c8e5d9af7903a1efdd44c2f75c659a61bc129f56
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue Apr 12 16:11:13 2011 +1000

    s3-lib Remove unused #define
    
    Signed-off-by: Andrew Tridgell <tridge at samba.org>
    (cherry picked from commit a82fba349989376397dbbb07ca3212713424c411)
    (cherry picked from commit 9ef17d60bbbe34764dad83478d03ca2d90a11e58)

commit 4b4287dadafaa24c1b4ce5b1feb769e2c4149d17
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Apr 12 10:53:36 2011 +0200

    s3: Fix Coverity ID 2470: STRAY_SEMICOLON
    
    Signed-off-by: Günther Deschner <gd at samba.org>
    
    Autobuild-User: Günther Deschner <gd at samba.org>
    Autobuild-Date: Wed Apr 13 12:57:43 CEST 2011 on sn-devel-104
    (cherry picked from commit 6a77b52169a8289262f7ccd6356946439224051c)
    (cherry picked from commit 428ae8eaae171fc1094c41e48ee8d8a17902290b)

commit 5abee955c274a87967877af16f3d54e08d09e7a7
Author: Michael Adam <obnox at samba.org>
Date:   Mon Apr 4 11:46:31 2011 +0200

    s3:idmap_tdb2: fix build of tdb2
    
    The include of system/filesys.h was removed from includes.h. ...
    (cherry picked from commit b7e330a2b325463e49abceb8f3e8d792248179ed)
    (cherry picked from commit 6e482682528445659d05574c2bd37b8730e35ce5)

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

Summary of changes:
 WHATSNEW.txt                                       |   44 ++-
 docs-xml/manpages-3/smb.conf.5.xml                 |    4 +
 examples/VFS/skel_opaque.c                         |    2 +-
 examples/VFS/skel_transparent.c                    |    2 +-
 lib/talloc/talloc.c                                |   10 +-
 lib/tdb/common/io.c                                |   25 +-
 lib/tdb/common/summary.c                           |   13 +-
 lib/tdb/common/tdb_private.h                       |    4 +
 lib/tdb/common/transaction.c                       |   87 ++-
 lib/tdb/tools/tdbbackup.c                          |   21 +-
 lib/util/asn1.c                                    |    6 +-
 lib/util/byteorder.h                               |   17 +-
 lib/util/charset/util_unistr.c                     |   46 --
 lib/util/debug_s3.h                                |    1 +
 lib/util/util.c                                    |   46 ++
 libcli/security/dom_sid.c                          |   14 +-
 libcli/security/dom_sid.h                          |    2 +
 librpc/idl/lsa.idl                                 |    6 +-
 nsswitch/libwbclient/wbc_idmap.c                   |   93 +++
 nsswitch/libwbclient/wbc_sid.c                     |  183 ++++++
 nsswitch/libwbclient/wbclient.h                    |   42 ++-
 nsswitch/wbinfo.c                                  |  141 +++++
 nsswitch/winbind_nss_freebsd.c                     |    8 +-
 nsswitch/winbind_struct_protocol.h                 |    4 +-
 selftest/selftest.pl                               |   16 +-
 selftest/target/Samba3.pm                          |   58 +-
 source3/Makefile.in                                |   18 +-
 source3/auth/auth_util.c                           |   26 +-
 source3/configure.in                               |    8 +-
 source3/include/client.h                           |   27 -
 source3/include/includes.h                         |   56 +--
 source3/include/ntdomain.h                         |    2 +
 source3/include/proto.h                            |    9 +-
 source3/include/pthreadpool.h                      |   42 --
 source3/include/smb.h                              |   18 -
 source3/include/smbprofile.h                       |    5 +
 source3/include/util_tdb.h                         |    4 +-
 source3/include/vfs.h                              |   15 +-
 source3/lib/access.c                               |   31 +-
 source3/lib/fncall.c                               |    4 +-
 .../examples/netdomjoin-gui/netdomjoin-gui.c       |    2 +-
 source3/lib/netapi/group.c                         |    1 +
 source3/lib/netapi/localgroup.c                    |    1 +
 source3/lib/netapi/samr.c                          |    3 +-
 source3/lib/netapi/user.c                          |    2 +-
 source3/lib/pthreadpool.c                          |  505 ----------------
 source3/lib/pthreadpool/Makefile                   |    9 +
 source3/lib/pthreadpool/pthreadpool.c              |  611 ++++++++++++++++++++
 source3/lib/pthreadpool/pthreadpool.h              |   97 +++
 source3/lib/pthreadpool/tests.c                    |  362 ++++++++++++
 source3/lib/smbconf/smbconf_reg.c                  |    4 +
 source3/lib/sysacls.c                              |   20 +
 source3/lib/sysquotas.c                            |   24 -
 source3/lib/sysquotas_nfs.c                        |    6 +-
 source3/lib/tdb_validate.h                         |    2 +-
 source3/lib/tldap.c                                |    3 -
 source3/lib/util_sock.c                            |   36 ++
 source3/lib/util_unistr.c                          |   24 -
 source3/libads/ldap.c                              |    4 +
 source3/libads/ldap_printer.c                      |    1 +
 source3/libnet/libnet_join.c                       |    2 +-
 source3/libnet/libnet_samsync.c                    |    1 +
 source3/librpc/idl/wbint.idl                       |   25 +-
 source3/libsmb/cliconnect.c                        |    2 +-
 source3/libsmb/cliquota.c                          |   62 +--
 source3/libsmb/clireadwrite.c                      |   18 +-
 source3/libsmb/libsmb_dir.c                        |    4 +
 source3/libsmb/libsmb_xattr.c                      |    1 +
 source3/libsmb/namequery.c                         |   24 +-
 source3/libsmb/smbsock_connect.c                   |   13 +-
 source3/locking/locking.c                          |    5 +-
 source3/modules/vfs_acl_common.c                   |   30 +-
 source3/modules/vfs_acl_tdb.c                      |    2 +-
 source3/modules/vfs_acl_xattr.c                    |    2 +-
 source3/modules/vfs_aio_fork.c                     |    4 +
 source3/modules/vfs_aixacl_util.c                  |    1 +
 source3/modules/vfs_audit.c                        |    2 +-
 source3/modules/vfs_cap.c                          |    2 +-
 source3/modules/vfs_catia.c                        |    2 +-
 source3/modules/vfs_commit.c                       |    2 +-
 source3/modules/vfs_crossrename.c                  |    2 +-
 source3/modules/vfs_default.c                      |    3 +-
 source3/modules/vfs_extd_audit.c                   |    2 +-
 source3/modules/vfs_full_audit.c                   |    2 +-
 source3/modules/vfs_gpfs.c                         |    1 +
 source3/modules/vfs_hpuxacl.c                      |    2 +
 source3/modules/vfs_irixacl.c                      |    2 +
 source3/modules/vfs_onefs.c                        |    2 +-
 source3/modules/vfs_onefs_shadow_copy.c            |    2 +-
 source3/modules/vfs_posixacl.c                     |    2 +-
 source3/modules/vfs_prealloc.c                     |    2 +-
 source3/modules/vfs_preopen.c                      |    2 +-
 source3/modules/vfs_readahead.c                    |    4 +
 source3/modules/vfs_scannedonly.c                  |    2 +-
 source3/modules/vfs_shadow_copy2.c                 |    2 +-
 source3/modules/vfs_smb_traffic_analyzer.c         |    2 +-
 source3/modules/vfs_solarisacl.c                   |    2 +-
 source3/modules/vfs_streams_depot.c                |    2 +-
 source3/modules/vfs_streams_xattr.c                |    2 +-
 source3/modules/vfs_syncops.c                      |    2 +-
 source3/modules/vfs_time_audit.c                   |    2 +-
 source3/modules/vfs_tru64acl.c                     |    1 +
 source3/nmbd/nmbd_elections.c                      |    1 +
 source3/nmbd/nmbd_incomingdgrams.c                 |    1 +
 source3/nmbd/nmbd_synclists.c                      |    1 +
 source3/passdb/lookup_sid.c                        |  103 ++++
 source3/passdb/lookup_sid.h                        |    3 +
 source3/passdb/pdb_ipa.c                           |    5 +-
 source3/printing/nt_printing_migrate.c             |    1 +
 source3/printing/print_aix.c                       |    1 +
 source3/printing/print_cups.c                      |    4 +-
 source3/printing/printspoolss.c                    |    1 +
 source3/profile/profile.c                          |    3 +
 source3/registry/reg_backend_db.c                  |    2 -
 source3/rpc_client/cli_lsarpc.c                    |    1 +
 source3/rpc_client/cli_netlogon.c                  |    1 +
 source3/rpc_client/cli_pipe.c                      |   10 +-
 source3/rpc_client/cli_pipe.h                      |    2 +
 source3/rpc_client/cli_samr.c                      |   22 +-
 source3/rpc_client/cli_spoolss.c                   |    1 +
 source3/rpc_client/rpc_client.h                    |   55 ++
 source3/rpc_server/spoolss/srv_spoolss_nt.c        |    4 +-
 source3/rpc_server/srv_pipe_register.c             |    1 +
 source3/rpc_server/srvsvc/srv_srvsvc_nt.c          |    9 +
 source3/script/tests/test_pthreadpool.sh           |   17 +
 source3/script/tests/test_wbinfo_sids2xids.sh      |   11 +
 source3/script/tests/test_wbinfo_sids2xids_int.py  |   47 ++
 source3/selftest/tests.py                          |   53 +-
 source3/smbd/dosmode.c                             |    9 +-
 source3/smbd/fileio.c                              |    1 +
 source3/smbd/ipc.c                                 |    1 +
 source3/smbd/lanman.c                              |    1 +
 source3/smbd/message.c                             |    1 +
 source3/smbd/negprot.c                             |    1 +
 source3/smbd/nttrans.c                             |   50 +--
 source3/smbd/open.c                                |   25 +-
 source3/smbd/process.c                             |   26 +-
 source3/smbd/proto.h                               |    2 +
 source3/smbd/reply.c                               |    6 +-
 source3/smbd/sec_ctx.c                             |    1 +
 source3/smbd/server.c                              |    1 +
 source3/smbd/sesssetup.c                           |    1 +
 source3/smbd/smb2_server.c                         |    1 +
 source3/smbd/statcache.c                           |    1 +
 source3/smbd/trans2.c                              |   31 +-
 source3/smbd/vfs.c                                 |  217 +++++---
 source3/torture/test_smbsock_any_connect.c         |    2 +-
 source3/utils/net_printing.c                       |    1 +
 source3/utils/net_rpc_audit.c                      |    1 +
 source3/utils/net_rpc_printer.c                    |    1 +
 source3/utils/net_rpc_registry.c                   |    1 +
 source3/utils/net_rpc_rights.c                     |    1 +
 source3/utils/net_rpc_service.c                    |    1 +
 source3/utils/net_rpc_sh_acct.c                    |    1 +
 source3/utils/smbget.c                             |   14 +-
 source3/utils/status_profile.c                     |    1 +
 source3/winbindd/idmap.c                           |    2 +-
 source3/winbindd/idmap_tdb2.c                      |    1 +
 source3/winbindd/wb_lookupsids.c                   |  601 +++++++++++++++++++
 source3/winbindd/winbindd.c                        |    4 +
 source3/winbindd/winbindd_ads.c                    |    1 +
 source3/winbindd/winbindd_cm.c                     |    6 +-
 source3/winbindd/winbindd_dual_srv.c               |  110 ++++
 source3/winbindd/winbindd_getsidaliases.c          |   42 --
 source3/winbindd/winbindd_lookupsids.c             |  145 +++++
 source3/winbindd/winbindd_msrpc.c                  |   67 ++-
 source3/winbindd/winbindd_pam.c                    |   10 +-
 source3/winbindd/winbindd_proto.h                  |   32 +
 source3/winbindd/winbindd_rpc.c                    |   99 ++++
 source3/winbindd/winbindd_samr.c                   |    1 +
 source3/winbindd/winbindd_sids_to_xids.c           |  306 ++++++++++
 source3/winbindd/winbindd_util.c                   |   36 ++
 source3/wscript                                    |   19 +-
 source3/wscript_build                              |    7 +-
 source4/torture/rpc/spoolss.c                      |    7 +-
 175 files changed, 4076 insertions(+), 1306 deletions(-)
 delete mode 100644 source3/include/pthreadpool.h
 delete mode 100644 source3/lib/pthreadpool.c
 create mode 100644 source3/lib/pthreadpool/Makefile
 create mode 100644 source3/lib/pthreadpool/pthreadpool.c
 create mode 100644 source3/lib/pthreadpool/pthreadpool.h
 create mode 100644 source3/lib/pthreadpool/tests.c
 create mode 100644 source3/rpc_client/rpc_client.h
 create mode 100755 source3/script/tests/test_pthreadpool.sh
 create mode 100755 source3/script/tests/test_wbinfo_sids2xids.sh
 create mode 100755 source3/script/tests/test_wbinfo_sids2xids_int.py
 create mode 100644 source3/winbindd/wb_lookupsids.c
 create mode 100644 source3/winbindd/winbindd_lookupsids.c
 create mode 100644 source3/winbindd/winbindd_sids_to_xids.c


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index a5cdeca..eaeba02 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -225,7 +225,6 @@ smb.conf changes
    smb2 max read		       New	       1048576
    smb2 max trans		       New	       1048576
    smb2 max write		       New	       1048576
-   strict allocate		       Changed Default Yes
    username map cache time	       New	       0
    winbind max clients		       New	       200
 
@@ -252,6 +251,49 @@ o   Andreas Schneider <asn at samba.org>
 Changes since 3.6.0pre2
 -----------------------
 
+o   Michael Adam <obnox at samba.org>
+    * Fix build of tdb2.
+
+
+o   Jeremy Allison <jra at samba.org>
+    * BUG 8083: "inherit owner = yes" doesn't interact correctly with
+      vfs_acl_xattr or vfs_acl_tdb module.
+    * BUG 8088: rpccli_samr_chng_pswd_auth_crap segfaults if any input blobs
+      are null.
+    * Correctly detect and deny symlinks anywhere in a path (not just the last
+      component) if "follow symlinks = no".
+
+
+o   Günther Deschner <gd at samba.org>
+    * BUG 8106: Fix the build of 'smbget' on HP NonStop.
+    * Fix timeout in rpc_pipe_open_tcp_port().
+    * Fix the build of "--with-profiling-data".
+    * Fix the AIX 5.3 build.
+
+
+o   Sergey Korsak <skif at 1plus1.net>
+    * BUG #8099: setpwent() actually does endpwent() and vice versa on FreeBSD.
+
+
+o   Volker Lendecke <vl at samba.org>
+    * BUG 8066: Fix wrong output in 'smbget'.
+    * Fix Coverity IDs 986, 1340, 2047, 2299, 2307, 2325, 2335, 2336, 2470,
+      2471, 2478.
+    * nsswitch: Add 'wbinfo --lookup-sids'.
+    * nsswitch: Add 'wbinfo --sids-to-unix-ids'.
+    * Fix smbd with the async echo responder.
+    * Fix the build of vfs_gpfs.c.
+    * Add a 10-second timeout for the 445 or netbios connection to a DC.
+    * Many pthreadpool fixes.
+
+
+o   Stefan Metzmacher <metze at samba.org>
+    * BUG 7383: Listen on IPv6 addresses with IPV6_ONLY.
+
+
+o   Rusty Russell <rusty at rustcorp.com.au>
+    * Fix transaction recovery area for converted tdbs.
+
 
 
 Changes since 3.6.0pre1
diff --git a/docs-xml/manpages-3/smb.conf.5.xml b/docs-xml/manpages-3/smb.conf.5.xml
index 2b93065..f5f252b 100644
--- a/docs-xml/manpages-3/smb.conf.5.xml
+++ b/docs-xml/manpages-3/smb.conf.5.xml
@@ -503,12 +503,16 @@ chmod 1770 /usr/local/samba/lib/usershares
 		<varlistentry>
 		<term>%I</term>
 		<listitem><para>the IP address of the client machine.</para>
+		<para>Before 3.6.0 it could contain IPv4 mapped IPv6 addresses,
+			now it only contains IPv4 or IPv6 addresses.</para>
 		</listitem>
 		</varlistentry>
 
 		<varlistentry>
 		<term>%i</term>
 		<listitem><para>the local IP address to which a client connected.</para>
+		<para>Before 3.6.0 it could contain IPv4 mapped IPv6 addresses,
+			now it only contains IPv4 or IPv6 addresses.</para>
 		</listitem>
 		</varlistentry>
 
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index ef7c3af..f60f0fe 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -801,7 +801,7 @@ struct vfs_fn_pointers skel_transparent_fns = {
 
 	/* File operations */
 
-	.open = skel_open,
+	.open_fn = skel_open,
 	.create_file = skel_create_file,
 	.close_fn = skel_close_fn,
 	.vfs_read = skel_vfs_read,
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index 403e28d..f06e02a 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -745,7 +745,7 @@ struct vfs_fn_pointers skel_transparent_fns = {
 
 	/* File operations */
 
-	.open = skel_open,
+	.open_fn = skel_open,
 	.create_file = skel_create_file,
 	.close_fn = skel_close_fn,
 	.vfs_read = skel_vfs_read,
diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c
index 6f952dc..91452bf 100644
--- a/lib/talloc/talloc.c
+++ b/lib/talloc/talloc.c
@@ -131,7 +131,7 @@ static struct {
 #define TC_INVALIDATE_FULL_FILL_CHUNK(_tc) do { \
 	if (unlikely(talloc_fill.enabled)) { \
 		size_t _flen = (_tc)->size; \
-		char *_fptr = TC_PTR_FROM_CHUNK(_tc); \
+		char *_fptr = (char *)TC_PTR_FROM_CHUNK(_tc); \
 		memset(_fptr, talloc_fill.fill_value, _flen); \
 	} \
 } while (0)
@@ -155,7 +155,7 @@ static struct {
 #define TC_INVALIDATE_SHRINK_FILL_CHUNK(_tc, _new_size) do { \
 	if (unlikely(talloc_fill.enabled)) { \
 		size_t _flen = (_tc)->size - (_new_size); \
-		char *_fptr = TC_PTR_FROM_CHUNK(_tc); \
+		char *_fptr = (char *)TC_PTR_FROM_CHUNK(_tc); \
 		_fptr += (_new_size); \
 		memset(_fptr, talloc_fill.fill_value, _flen); \
 	} \
@@ -165,7 +165,7 @@ static struct {
 /* Mark the unused bytes not accessable */
 #define TC_INVALIDATE_SHRINK_VALGRIND_CHUNK(_tc, _new_size) do { \
 	size_t _flen = (_tc)->size - (_new_size); \
-	char *_fptr = TC_PTR_FROM_CHUNK(_tc); \
+	char *_fptr = (char *)TC_PTR_FROM_CHUNK(_tc); \
 	_fptr += (_new_size); \
 	VALGRIND_MAKE_MEM_NOACCESS(_fptr, _flen); \
 } while (0)
@@ -430,7 +430,7 @@ _PUBLIC_ const char *talloc_parent_name(const void *ptr)
 #define TC_INVALIDATE_FILL_POOL(_pool_tc) do { \
 	if (unlikely(talloc_fill.enabled)) { \
 		size_t _flen = TC_POOL_SPACE_LEFT(_pool_tc); \
-		char *_fptr = (_pool_tc)->pool; \
+		char *_fptr = (char *)(_pool_tc)->pool; \
 		memset(_fptr, talloc_fill.fill_value, _flen); \
 	} \
 } while(0)
@@ -439,7 +439,7 @@ _PUBLIC_ const char *talloc_parent_name(const void *ptr)
 /* Mark the whole remaining pool as not accessable */
 #define TC_INVALIDATE_VALGRIND_POOL(_pool_tc) do { \
 	size_t _flen = TC_POOL_SPACE_LEFT(_pool_tc); \
-	char *_fptr = (_pool_tc)->pool; \
+	char *_fptr = (char *)(_pool_tc)->pool; \
 	VALGRIND_MAKE_MEM_NOACCESS(_fptr, _flen); \
 } while(0)
 #else
diff --git a/lib/tdb/common/io.c b/lib/tdb/common/io.c
index 058ca6c..78bbf2e 100644
--- a/lib/tdb/common/io.c
+++ b/lib/tdb/common/io.c
@@ -299,7 +299,7 @@ static int tdb_expand_file(struct tdb_context *tdb, tdb_off_t size, tdb_off_t ad
 int tdb_expand(struct tdb_context *tdb, tdb_off_t size)
 {
 	struct tdb_record rec;
-	tdb_off_t offset, new_size;	
+	tdb_off_t offset, new_size, top_size, map_size;
 
 	if (tdb_lock(tdb, -1, F_WRLCK) == -1) {
 		TDB_LOG((tdb, TDB_DEBUG_ERROR, "lock failed in tdb_expand\n"));
@@ -309,10 +309,25 @@ int tdb_expand(struct tdb_context *tdb, tdb_off_t size)
 	/* must know about any previous expansions by another process */
 	tdb->methods->tdb_oob(tdb, tdb->map_size + 1, 1);
 
-	/* always make room for at least 100 more records, and at
-           least 25% more space. Round the database up to a multiple
-           of the page size */
-	new_size = MAX(tdb->map_size + size*100, tdb->map_size * 1.25);
+	/* limit size in order to avoid using up huge amounts of memory for
+	 * in memory tdbs if an oddball huge record creeps in */
+	if (size > 100 * 1024) {
+		top_size = tdb->map_size + size * 2;
+	} else {
+		top_size = tdb->map_size + size * 100;
+	}
+
+	/* always make room for at least top_size more records, and at
+	   least 25% more space. if the DB is smaller than 100MiB,
+	   otherwise grow it by 10% only. */
+	if (tdb->map_size > 100 * 1024 * 1024) {
+		map_size = tdb->map_size * 1.10;
+	} else {
+		map_size = tdb->map_size * 1.25;
+	}
+
+	/* Round the database up to a multiple of the page size */
+	new_size = MAX(top_size, map_size);
 	size = TDB_ALIGN(new_size, tdb->page_size) - tdb->map_size;
 
 	if (!(tdb->flags & TDB_INTERNAL))
diff --git a/lib/tdb/common/summary.c b/lib/tdb/common/summary.c
index b222a59..171a1a2 100644
--- a/lib/tdb/common/summary.c
+++ b/lib/tdb/common/summary.c
@@ -86,12 +86,13 @@ static size_t get_hash_length(struct tdb_context *tdb, unsigned int i)
 
 _PUBLIC_ char *tdb_summary(struct tdb_context *tdb)
 {
-	tdb_off_t off;
+	tdb_off_t off, rec_off;
 	struct tally freet, keys, data, dead, extra, hash, uncoal;
 	struct tdb_record rec;
 	char *ret = NULL;
 	bool locked;
 	size_t len, unc = 0;
+	struct tdb_record recovery;
 
 	/* Read-only databases use no locking at all: it's best-effort.
 	 * We may have a write lock already, so skip that case too. */
@@ -103,6 +104,10 @@ _PUBLIC_ char *tdb_summary(struct tdb_context *tdb)
 		locked = true;
 	}
 
+	if (tdb_recovery_area(tdb, tdb->methods, &rec_off, &recovery) != 0) {
+		goto unlock;
+	}
+
 	tally_init(&freet);
 	tally_init(&keys);
 	tally_init(&data);
@@ -135,7 +140,11 @@ _PUBLIC_ char *tdb_summary(struct tdb_context *tdb)
 		case TDB_RECOVERY_INVALID_MAGIC:
 		case 0x42424242:
 			unc++;
-			rec.rec_len = tdb_dead_space(tdb, off) - sizeof(rec);
+			/* If it's a valid recovery, we can trust rec_len. */
+			if (off != rec_off) {
+				rec.rec_len = tdb_dead_space(tdb, off)
+					- sizeof(rec);
+			}
 			/* Fall through */
 		case TDB_DEAD_MAGIC:
 			tally_add(&dead, rec.rec_len);
diff --git a/lib/tdb/common/tdb_private.h b/lib/tdb/common/tdb_private.h
index 0186fb9..140d4ec 100644
--- a/lib/tdb/common/tdb_private.h
+++ b/lib/tdb/common/tdb_private.h
@@ -238,6 +238,10 @@ void tdb_release_transaction_locks(struct tdb_context *tdb);
 int tdb_transaction_lock(struct tdb_context *tdb, int ltype,
 			 enum tdb_lock_flags lockflags);
 int tdb_transaction_unlock(struct tdb_context *tdb, int ltype);
+int tdb_recovery_area(struct tdb_context *tdb,
+		      const struct tdb_methods *methods,
+		      tdb_off_t *recovery_offset,
+		      struct tdb_record *rec);
 int tdb_allrecord_lock(struct tdb_context *tdb, int ltype,
 		       enum tdb_lock_flags flags, bool upgradable);
 int tdb_allrecord_unlock(struct tdb_context *tdb, int ltype, bool mark_lock);
diff --git a/lib/tdb/common/transaction.c b/lib/tdb/common/transaction.c
index c49de38..e4573cb 100644
--- a/lib/tdb/common/transaction.c
+++ b/lib/tdb/common/transaction.c
@@ -138,8 +138,8 @@ struct tdb_transaction {
 	/* old file size before transaction */
 	tdb_len_t old_map_size;
 
-	/* we should re-pack on commit */
-	bool need_repack;
+	/* did we expand in this transaction */
+	bool expanded;
 };
 
 
@@ -403,7 +403,7 @@ static int transaction_expand_file(struct tdb_context *tdb, tdb_off_t size,
 		return -1;
 	}
 
-	tdb->transaction->need_repack = true;
+	tdb->transaction->expanded = true;
 
 	return 0;
 }
@@ -658,6 +658,34 @@ static tdb_len_t tdb_recovery_size(struct tdb_context *tdb)
 	return recovery_size;
 }
 
+int tdb_recovery_area(struct tdb_context *tdb,
+		      const struct tdb_methods *methods,
+		      tdb_off_t *recovery_offset,
+		      struct tdb_record *rec)
+{
+	if (tdb_ofs_read(tdb, TDB_RECOVERY_HEAD, recovery_offset) == -1) {
+		return -1;
+	}
+
+	if (*recovery_offset == 0) {
+		rec->rec_len = 0;
+		return 0;
+	}
+
+	if (methods->tdb_read(tdb, *recovery_offset, rec, sizeof(*rec),
+			      DOCONV()) == -1) {
+		return -1;
+	}
+
+	/* ignore invalid recovery regions: can happen in crash */
+	if (rec->magic != TDB_RECOVERY_MAGIC &&
+	    rec->magic != TDB_RECOVERY_INVALID_MAGIC) {
+		*recovery_offset = 0;
+		rec->rec_len = 0;
+	}
+	return 0;
+}
+
 /*
   allocate the recovery area, or use an existing recovery area if it is
   large enough
@@ -671,25 +699,11 @@ static int tdb_recovery_allocate(struct tdb_context *tdb,
 	const struct tdb_methods *methods = tdb->transaction->io_methods;
 	tdb_off_t recovery_head;
 
-	if (tdb_ofs_read(tdb, TDB_RECOVERY_HEAD, &recovery_head) == -1) {
+	if (tdb_recovery_area(tdb, methods, &recovery_head, &rec) == -1) {
 		TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_recovery_allocate: failed to read recovery head\n"));
 		return -1;
 	}
 
-	rec.rec_len = 0;
-
-	if (recovery_head != 0) {
-		if (methods->tdb_read(tdb, recovery_head, &rec, sizeof(rec), DOCONV()) == -1) {
-			TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_recovery_allocate: failed to read recovery record\n"));
-			return -1;
-		}
-		/* ignore invalid recovery regions: can happen in crash */
-		if (rec.magic != TDB_RECOVERY_MAGIC &&
-		    rec.magic != TDB_RECOVERY_INVALID_MAGIC) {
-			recovery_head = 0;
-		}
-	}
-
 	*recovery_size = tdb_recovery_size(tdb);
 
 	if (recovery_head != 0 && *recovery_size <= rec.rec_len) {
@@ -786,7 +800,7 @@ static int transaction_setup_recovery(struct tdb_context *tdb,
 	rec->data_len = recovery_size;
 	rec->rec_len  = recovery_max_size;
 	rec->key_len  = old_map_size;
-	CONVERT(rec);
+	CONVERT(*rec);
 
 	/* build the recovery data into a single blob to allow us to do a single
 	   large write, which should be more efficient */
@@ -833,7 +847,9 @@ static int transaction_setup_recovery(struct tdb_context *tdb,
 	/* and the tailer */
 	tailer = sizeof(*rec) + recovery_max_size;
 	memcpy(p, &tailer, 4);
-	CONVERT(p);
+	if (DOCONV()) {
+		tdb_convert(p, 4);
+	}
 
 	/* write the recovery data to the recovery area */
 	if (methods->tdb_write(tdb, recovery_offset, data, sizeof(*rec) + recovery_size) == -1) {
@@ -981,6 +997,28 @@ _PUBLIC_ int tdb_transaction_prepare_commit(struct tdb_context *tdb)
 	return _tdb_transaction_prepare_commit(tdb);
 }
 
+/* A repack is worthwhile if the largest is less than half total free. */
+static bool repack_worthwhile(struct tdb_context *tdb)
+{
+	tdb_off_t ptr;
+	struct tdb_record rec;
+	tdb_len_t total = 0, largest = 0;
+
+	if (tdb_ofs_read(tdb, FREELIST_TOP, &ptr) == -1) {
+		return false;
+	}
+
+	while (ptr != 0 && tdb_rec_free_read(tdb, ptr, &rec) == 0) {
+		total += rec.rec_len;
+		if (rec.rec_len > largest) {
+			largest = rec.rec_len;
+		}
+		ptr = rec.next;
+	}
+
+	return total > largest * 2;
+}
+
 /*
   commit the current transaction
 */
@@ -988,7 +1026,7 @@ _PUBLIC_ int tdb_transaction_commit(struct tdb_context *tdb)
 {
 	const struct tdb_methods *methods;
 	int i;
-	bool need_repack;
+	bool need_repack = false;
 
 	if (tdb->transaction == NULL) {
 		TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_transaction_commit: no transaction\n"));
@@ -1056,6 +1094,11 @@ _PUBLIC_ int tdb_transaction_commit(struct tdb_context *tdb)
 		SAFE_FREE(tdb->transaction->blocks[i]);
 	} 
 
+	/* Do this before we drop lock or blocks. */
+	if (tdb->transaction->expanded) {
+		need_repack = repack_worthwhile(tdb);
+	}
+
 	SAFE_FREE(tdb->transaction->blocks);
 	tdb->transaction->num_blocks = 0;
 
@@ -1079,8 +1122,6 @@ _PUBLIC_ int tdb_transaction_commit(struct tdb_context *tdb)
 	utime(tdb->name, NULL);
 #endif
 
-	need_repack = tdb->transaction->need_repack;
-
 	/* use a transaction cancel to free memory and remove the
 	   transaction locks */
 	_tdb_transaction_cancel(tdb);
diff --git a/lib/tdb/tools/tdbbackup.c b/lib/tdb/tools/tdbbackup.c
index 6aca8dd..11ecaa0 100644
--- a/lib/tdb/tools/tdbbackup.c
+++ b/lib/tdb/tools/tdbbackup.c
@@ -152,8 +152,9 @@ static int backup_tdb(const char *old_name, const char *new_name, int hash_size)
 		return 1;
 	}
 
-	if (tdb_transaction_start(tdb_new) != 0) {
-		printf("Failed to start transaction on new tdb\n");
+	/* lock the backup tdb so that nobody else can change it */
+	if (tdb_lockall(tdb_new) != 0) {
+		printf("Failed to lock backup tdb\n");
 		tdb_close(tdb);
 		tdb_close(tdb_new);
 		unlink(tmp_name);
@@ -177,12 +178,16 @@ static int backup_tdb(const char *old_name, const char *new_name, int hash_size)
 	/* close the old tdb */
 	tdb_close(tdb);
 
-	if (tdb_transaction_commit(tdb_new) != 0) {
-		fprintf(stderr, "Failed to commit new tdb\n");
-		tdb_close(tdb_new);
-		unlink(tmp_name);
-		free(tmp_name);		
-		return 1;
+	/* copy done, unlock the backup tdb */
+	tdb_unlockall(tdb_new);
+
+#ifdef HAVE_FDATASYNC
+	if (fdatasync(tdb_fd(tdb_new)) != 0) {
+#else
+	if (fsync(tdb_fd(tdb_new)) != 0) {
+#endif
+		/* not fatal */
+		fprintf(stderr, "failed to fsync backup file\n");
 	}
 
 	/* close the new tdb and re-open read-only */
diff --git a/lib/util/asn1.c b/lib/util/asn1.c
index f4a6bc5..b716da6 100644
--- a/lib/util/asn1.c
+++ b/lib/util/asn1.c
@@ -290,7 +290,11 @@ bool ber_write_partial_OID_String(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, const ch
 	/* Add partially encoded sub-identifier */
 	if (p) {
 		DATA_BLOB tmp_blob = strhex_to_data_blob(tmp_ctx, p);
-		data_blob_append(mem_ctx, blob, tmp_blob.data, tmp_blob.length);
+		if (!data_blob_append(mem_ctx, blob, tmp_blob.data,
+				      tmp_blob.length)) {
+			talloc_free(tmp_ctx);
+			return false;
+		}
 	}
 
 	talloc_free(tmp_ctx);
diff --git a/lib/util/byteorder.h b/lib/util/byteorder.h
index 59ad837..6bcf71e 100644
--- a/lib/util/byteorder.h
+++ b/lib/util/byteorder.h
@@ -201,18 +201,29 @@ static __inline__ void st_le32(uint32_t *addr, const uint32_t val)
 
 #endif /* not CAREFUL_ALIGNMENT */
 
+/* 64 bit macros */
+#define BVAL(p, ofs) (IVAL(p,ofs) | (((uint64_t)IVAL(p,(ofs)+4)) << 32))
+#define BVALS(p, ofs) ((int64_t)BVAL(p,ofs))
+#define SBVAL(p, ofs, v) (SIVAL(p,ofs,(v)&0xFFFFFFFF), SIVAL(p,(ofs)+4,((uint64_t)(v))>>32))
+#define SBVALS(p, ofs, v) (SBVAL(p,ofs,(uint64_t)v))
+
 /* now the reverse routines - these are used in nmb packets (mostly) */
 #define SREV(x) ((((x)&0xFF)<<8) | (((x)>>8)&0xFF))
 #define IREV(x) ((SREV(x)<<16) | (SREV((x)>>16)))
+#define BREV(x) ((IREV(x)<<32) | (IREV((x)>>32)))
 
 #define RSVAL(buf,pos) SREV(SVAL(buf,pos))


-- 
Samba Shared Repository


More information about the samba-cvs mailing list