samba.git
14 years agotalloc_stack: make sure we never let talloc_tos() return ts->talloc_stack[-1]
Stefan Metzmacher [Mon, 15 Mar 2010 13:32:52 +0000 (14:32 +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)

14 years agos3-netlogon: Fix bug #7237: _netr_SamLogon segfaults for clients sending NULL domain.
Günther Deschner [Thu, 11 Mar 2010 23:30:52 +0000 (00:30 +0100)]
s3-netlogon: Fix bug #7237: _netr_SamLogon segfaults for clients sending NULL domain.

Thanks to Marc Muehlfeld <muehlfeld@medizinische-genetik.de>.

Guenther
(cherry picked from commit eb81e0d732a327a555091e16dce91dd75ffd5092)

14 years agos3:release-scripts: fix create-tarball to treat vendor patch level correctly
Michael Adam [Mon, 8 Mar 2010 22:37:21 +0000 (23:37 +0100)]
s3:release-scripts: fix create-tarball to treat vendor patch level correctly
(cherry picked from commit b845025daf2da85eb1af6cbfa7878cf59a32f2a6)
(cherry picked from commit 95c6a5a782caa77bc8bbe75de6ca249bc255507e)

14 years agos4-smbtorture: add --option=torture:spoolss_check_size=yes.
Günther Deschner [Fri, 19 Feb 2010 13:25:19 +0000 (14:25 +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)

14 years agos4-smbtorture: fix smbtorture after GetPrinterData{Ex} after IDL changes.
Günther Deschner [Thu, 4 Mar 2010 21:40:31 +0000 (22:40 +0100)]
s4-smbtorture: fix smbtorture after GetPrinterData{Ex} after IDL changes.

Guenther
(cherry picked from commit 4be0bf13f019543c5cc0afc7b4bf074f23421f9c)

14 years agos4-smbtorture: fix RPC-SPOOLSS-WIN after PrinterData IDL changes.
Günther Deschner [Fri, 5 Mar 2010 19:32:16 +0000 (20:32 +0100)]
s4-smbtorture: fix RPC-SPOOLSS-WIN after PrinterData IDL changes.

Guenther
(cherry picked from commit 58c9070746a3e0725f5d3a3ce6deda8fad0c5974)
(cherry picked from commit 71a9d145d365d09588ecea1ad8a53535c3638b4f)

14 years agos4-spoolss: fix dcesrv_spoolss_GetPrinterData build.
Günther Deschner [Fri, 5 Mar 2010 15:34:17 +0000 (16:34 +0100)]
s4-spoolss: fix dcesrv_spoolss_GetPrinterData build.

really not my day today...

Guenther
(cherry picked from commit 91ff11d50458a951ab0adc9b37bcb0ef4ee09e15)
(cherry picked from commit 1fef62b5b8688984e00c4271d08d08aff9c27dd2)

14 years agos4-spoolss: fix spoolss_GetPrinterData implementation after IDL change.
Günther Deschner [Thu, 4 Mar 2010 17:21:50 +0000 (18:21 +0100)]
s4-spoolss: fix spoolss_GetPrinterData implementation after IDL change.

Guenther
(cherry picked from commit ae74c1cf66ca463026a3cb68aa040c9df18a87b8)

14 years agos3: re-run make samba3-idl.
Günther Deschner [Fri, 5 Mar 2010 16:17:49 +0000 (17:17 +0100)]
s3: re-run make samba3-idl.

Guenther
(cherry picked from commit ffbc52150d7e2101da05fafd7ce8ed16967db253)

14 years agos3-libads: fix get_remote_printer_publishing_data after spoolss_EnumPrinterDataEx...
Günther Deschner [Thu, 4 Mar 2010 16:58:49 +0000 (17:58 +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)

14 years agos3-spoolss: fix _spoolss_EnumPrinterDataEx after idl
Günther Deschner [Thu, 4 Mar 2010 15:47:33 +0000 (16:47 +0100)]
s3-spoolss: fix _spoolss_EnumPrinterDataEx after idl

Guenther
(cherry picked from commit 55326549852a3ab1114a8cb1536578ae02183eb8)
(cherry picked from commit e1527e2c4ed276b3821c1d8157ef0cb512ce5c64)

14 years agos3-rpcclient: fix rpcclient after spoolss_EnumPrinterDataEx IDL change.
Günther Deschner [Thu, 4 Mar 2010 15:47:10 +0000 (16:47 +0100)]
s3-rpcclient: fix rpcclient after spoolss_EnumPrinterDataEx IDL change.

Guenther
(cherry picked from commit becbb624eb90b84ff20b128de1aee5f5acfc3dbc)
(cherry picked from commit 55511d7553b5163f56f1736d8a549b454cd5c460)

14 years agos3-net: fix net after spoolss_EnumPrinterDataEx IDL change.
Günther Deschner [Thu, 4 Mar 2010 15:46:53 +0000 (16:46 +0100)]
s3-net: fix net after spoolss_EnumPrinterDataEx IDL change.

Guenther
(cherry picked from commit a99ac4f236d9a93d4ca8bd874cbab89b155c644a)
(cherry picked from commit 35b5b6f214efde97ae0412676ef0ea47501a780d)

14 years agospoolss: fix spoolss_EnumPrinterDataEx IDL.
Günther Deschner [Thu, 4 Mar 2010 15:40:31 +0000 (16:40 +0100)]
spoolss: fix spoolss_EnumPrinterDataEx IDL.

Guenther
(cherry picked from commit 4df1047e8398a9af4df94c7e245d993d1f60ef5f)
(cherry picked from commit c04c030553cdec1f8490b844632e2f2c08467de2)

14 years agos3-rpcclient: fix rpcclient after spoolss_GetPrinterData{Ex} IDL change.
Günther Deschner [Thu, 4 Mar 2010 14:46:28 +0000 (15:46 +0100)]
s3-rpcclient: fix rpcclient after spoolss_GetPrinterData{Ex} IDL change.

Guenther
(cherry picked from commit 7643afa70e879efc059c75b8309bf89dbb3c459b)
(cherry picked from commit 6b331e7414c80f8f2bbe4c27b07af9ac27230101)

14 years agos3-spoolss: fix _spoolss_GetPrinterDataEx after IDL change.
Günther Deschner [Thu, 4 Mar 2010 14:39:59 +0000 (15:39 +0100)]
s3-spoolss: fix _spoolss_GetPrinterDataEx after IDL change.

Guenther
(cherry picked from commit fbb6d00eed6bca960aa53a5967a2dea426cacfe2)
(cherry picked from commit 133671120889aa97102c2a056e3c5f54aba739f8)

14 years agospoolss: rollback GetPrinterData[Ex] IDL.
Günther Deschner [Thu, 4 Mar 2010 14:38:18 +0000 (15:38 +0100)]
spoolss: rollback GetPrinterData[Ex] IDL.

Guenther
(cherry picked from commit 0e779b573bf5c27bf08ceefa09a7e2b07691f948)
(cherry picked from commit 20a9f029f10346bed2beb999979b06801b7b1c9e)

14 years agos3-rpcclient: fix rpcclient after spoolss_SetPrinterData{Ex} IDL change.
Günther Deschner [Thu, 4 Mar 2010 14:34:49 +0000 (15:34 +0100)]
s3-rpcclient: fix rpcclient after spoolss_SetPrinterData{Ex} IDL change.

Guenther
(cherry picked from commit 4956650369156dfff96ccc827e55697ec642240d)
(cherry picked from commit 9d4b8360e208d06a739f34e40c206c9dbe7857ba)

14 years agos3-net: fix net after spoolss_SetPrinterData{Ex} IDL change.
Günther Deschner [Thu, 4 Mar 2010 14:34:22 +0000 (15:34 +0100)]
s3-net: fix net after spoolss_SetPrinterData{Ex} IDL change.

Guenther
(cherry picked from commit 37ca9288d2631b48a8eb50c01d6c0cc462d8ee31)
(cherry picked from commit cbc766eb1fff67ba01cf57e1da215299c5927d0b)

14 years agos3-spoolss: fix _spoolss_SetPrinterData{Ex} after IDL change.
Günther Deschner [Thu, 4 Mar 2010 16:00:34 +0000 (17:00 +0100)]
s3-spoolss: fix _spoolss_SetPrinterData{Ex} after IDL change.

Guenther
(cherry picked from commit 9a934832797c3e72859770719e05d19a5eefa14d)
(cherry picked from commit c98e6bf312741ab410afb177ba74d809b1101bcc)

14 years agospoolss: rollback SetPrinterData{Ex} IDL.
Günther Deschner [Wed, 3 Mar 2010 17:22:57 +0000 (18:22 +0100)]
spoolss: rollback SetPrinterData{Ex} IDL.

Guenther
(cherry picked from commit 0528515be44c40603827bb153ff0e2bac7b0f041)
(cherry picked from commit 1aa10318d0c72ff07284d840e7d381d0f6aff727)

14 years agoFix bug #7234 - Symlink delete fails but incorrectly reports success to client.
Jeremy Allison [Wed, 10 Mar 2010 22:06:18 +0000 (14:06 -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)

14 years agos3:build: Fix automatic building of vfs_tsmsm if gpfs and dmapi are present.
Michael Adam [Mon, 8 Mar 2010 21:32:41 +0000 (22:32 +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)

14 years agos3: Fix a NULL pointer dereference
Volker Lendecke [Tue, 9 Mar 2010 10:14:14 +0000 (11:14 +0100)]
s3: Fix a NULL pointer dereference

Found by Laurent Gaffie <laurent.gaffie@gmail.com>.

Thanks!

Volker
(cherry picked from commit 25452a2268ac7013da28125f3df22085139af12d)

Fix bug #7229 (NULL pointer dereference).
(cherry picked from commit bf40d130a1761daa14ce6a2cf3d02dbd9095c2b5)

14 years agos3:winbindd: add DEBUG(10,...) for the end of each top level
Stefan Metzmacher [Fri, 5 Mar 2010 10:16:12 +0000 (11:16 +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)

14 years agovfs_netatalk: Segfault if hide files or veto files has no ".AppleDouble"
SATOH Fumiyasu [Wed, 10 Mar 2010 03:15:44 +0000 (12:15 +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)

14 years agos3: Fix the build of net_afs.c with --fake-kaserver=yes, bug 7216
Volker Lendecke [Sat, 6 Mar 2010 11:57:35 +0000 (12:57 +0100)]
s3: Fix the build of net_afs.c with --fake-kaserver=yes, bug 7216

Thanks to Geza Gemes <geza@kzsdabas.hu> for filing this bug
(cherry picked from commit 5a3633faf12cdec41dc18064d5364a3fd067a22d)
(cherry picked from commit cb627d3628da1da3c167de3b319cd92948e862eb)

14 years agomount.cifs: don't allow it to be run as setuid root program
Jeff Layton [Tue, 26 Jan 2010 13:36:11 +0000 (08:36 -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@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)

14 years agomount.cifs: check for invalid characters in device name and mountpoint
Jeff Layton [Tue, 26 Jan 2010 13:36:03 +0000 (08:36 -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@redhat.com>
(cherry picked from commit ae24005a5a2c165dfd9b859bf1c02b5f7e967be5)

14 years agomount.cifs: take extra care that mountpoint isn't changed during mount
Jeff Layton [Tue, 26 Jan 2010 13:35:35 +0000 (08:35 -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@redhat.com>
(cherry picked from commit a60afceaa71c0c9b53b2ec1014db5d09d777803d)

14 years agos3: net_share.c: fix argc handling
Holger Hetterich [Wed, 3 Mar 2010 11:58:15 +0000 (12:58 +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)

14 years agos3:ads fix dn parsing name was always null
Simo Sorce [Mon, 1 Mar 2010 19:50:50 +0000 (14:50 -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@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)

14 years agos3:vfs_aixacl2: add missing semicolon
Björn Jacke [Tue, 2 Mar 2010 12:00:19 +0000 (13:00 +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)

14 years agos3:winbindd: never mark external domains as internal!
Stefan Metzmacher [Tue, 23 Feb 2010 07:42:41 +0000 (08:42 +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)

14 years agoSecond part of fix for bug #7159 - client rpc_transport doesn't cope with bad server...
Jeremy Allison [Fri, 19 Feb 2010 22:24:17 +0000 (14:24 -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)

14 years agoFirst part of fix for bug #7159 - client rpc_transport doesn't cope with bad server...
Jeremy Allison [Fri, 19 Feb 2010 22:18:51 +0000 (14:18 -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)

14 years agoFix one of the valgrind warnings from bug #6814 - Fixes for problems reported by...
Roel van Meer [Fri, 26 Feb 2010 22:54:22 +0000 (14:54 -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)

14 years agos3: Fix bug 5198 -- parse chfn(1)-change gecos field
Volker Lendecke [Sat, 6 Feb 2010 12:26:06 +0000 (13:26 +0100)]
s3: Fix bug 5198 -- parse chfn(1)-change gecos field
(cherry picked from commit 2ea2d2a81e0666f478c5daf1469c8447a3096e8e)
(cherry picked from commit 52a3ebc3a4ec54a427e54fa331251fd495c3c6aa)

14 years agoWHATSNEW: Start release notes for Samba 3.5.2.
Karolin Seeger [Tue, 9 Mar 2010 09:36:06 +0000 (10:36 +0100)]
WHATSNEW: Start release notes for Samba 3.5.2.

Karolin
(cherry picked from commit afd8272605854f2686f2b66541f2158afe2137d4)

14 years agoVERSION: Raise version number up to 3.5.2.
Karolin Seeger [Tue, 9 Mar 2010 09:33:30 +0000 (10:33 +0100)]
VERSION: Raise version number up to 3.5.2.

Karolin
(cherry picked from commit 6889e16974301ef36c0a9c6e57b2bcbd984b0d5f)

14 years agoRevert "Fix bug #7067 - Linux asynchronous IO (aio) can cause smbd to fail to respond... samba-3.5.1
Karolin Seeger [Mon, 8 Mar 2010 19:34:39 +0000 (20:34 +0100)]
Revert "Fix bug #7067 - Linux asynchronous IO (aio) can cause smbd to fail to respond to a read or write."

This reverts commit a6ae7a552f851a399991262377cc0e062e40ac20.

This fixes bug #7222 (All users have full rigths on all shares) (CVE-2010-0728).

14 years agoWHATSNEW: Prepare release notes for Samba 3.5.1.
Karolin Seeger [Mon, 8 Mar 2010 19:32:49 +0000 (20:32 +0100)]
WHATSNEW: Prepare release notes for Samba 3.5.1.

Karolin

14 years agoVERSION: Raise version number up to 3.5.1.
Karolin Seeger [Mon, 1 Mar 2010 14:03:03 +0000 (15:03 +0100)]
VERSION: Raise version number up to 3.5.1.

Karolin
(cherry picked from commit 0410c8bca22c61318bf71c845fca523614bef73a)

14 years agoWHATSNEW: Update changes since 3.5.0rc3. samba-3.5.0
Karolin Seeger [Mon, 1 Mar 2010 11:09:45 +0000 (12:09 +0100)]
WHATSNEW: Update changes since 3.5.0rc3.

Karolin
(cherry picked from commit 5fcab1948e6e3347cbe91fa2f27e547db499776b)

14 years agos3-net: fix net ads dns usage calls.
Günther Deschner [Mon, 8 Feb 2010 10:53:59 +0000 (11:53 +0100)]
s3-net: fix net ads dns usage calls.

Bjoern, please check.

Guenther

Fix bug #7181 (buildwarnings in net_ads.c).
(cherry picked from commit 7d5575fefe29a00c757dab0013c9d45b84f0be47)

14 years agos3-rpcclient: fix uninitialized variable in wkssvc_enumerateusers.
Günther Deschner [Wed, 17 Feb 2010 14:15:47 +0000 (15:15 +0100)]
s3-rpcclient: fix uninitialized variable in wkssvc_enumerateusers.

Guenther

Fix bug #7182.
(cherry picked from commit bb4a76538bfae593c4a997b10bdb1f6c1666701c)

14 years agos3: Fix but 7145 -- duplicate sam and unix accounts
Volker Lendecke [Sun, 28 Feb 2010 13:38:14 +0000 (14:38 +0100)]
s3: Fix but 7145 -- duplicate sam and unix accounts

For me this survives the

TESTS=posix_s3 POSIX_SUBTESTS="RPC-SAMR-LARGE-DC LOCAL-NSS-WRAPPER" make test

reproducer. Günther, please check!

Volker
(cherry picked from commit 0e9882a65e91e4ab55dc103c7f6aec4ccd966db0)
(cherry picked from commit fd59fa500a30a69ed09265bc3871fa640e232422)

14 years agos3:cli_netlogon: keep the the correct negotiate_flags on the cli->dc structure
Stefan Metzmacher [Fri, 19 Feb 2010 22:22:40 +0000 (23:22 +0100)]
s3:cli_netlogon: keep the the correct negotiate_flags on the cli->dc structure

This should fix the rpccli_netlogon_set_trust_password() against DC's
without netr_ServerPasswordSet2 support.

This fixes bug #7160.

metze
(cherry picked from commit 1e9df26ef970df41de54142a78606a15374acbac)
(cherry picked from commit a3e3355b5ccf74a2ffe5da6cbb2747e74586b1e5)

14 years agos3: Avoid calling cli_alloc_mid twice in cli_smb_req_iov_send
Volker Lendecke [Sun, 21 Feb 2010 19:39:36 +0000 (20:39 +0100)]
s3: Avoid calling cli_alloc_mid twice in cli_smb_req_iov_send

I hate macros....
(cherry picked from commit 65914ed8194b141a44516d626e71a1851bccff5f)

Fix bug #7166.
(cherry picked from commit b7d5b469ef134d60e1f795f66f7e5c3ef23d7971)

14 years agoWHATSNEW: Prepare release notes for Samba 3.5.0.
Karolin Seeger [Mon, 22 Feb 2010 14:44:34 +0000 (15:44 +0100)]
WHATSNEW: Prepare release notes for Samba 3.5.0.

Karolin
(cherry picked from commit 262854d8a2a39df2d151268442772ad92b0ddbcd)

14 years agoVERSION: Raise version number up to 3.5.0.
Karolin Seeger [Mon, 22 Feb 2010 14:40:57 +0000 (15:40 +0100)]
VERSION: Raise version number up to 3.5.0.

Karolin
(cherry picked from commit e8979e7edd42ec229cc7d53f636c99a09b97fde4)

14 years agoWHATSNEW: Update changes since 3.5.0rc2. samba-3.5.0rc3
Karolin Seeger [Fri, 19 Feb 2010 12:45:32 +0000 (13:45 +0100)]
WHATSNEW: Update changes since 3.5.0rc2.

Karolin
(cherry picked from commit 8b05660b20058bad9fc9fb2336f7d2d3b513579c)

14 years agolibrpc/ndr: don't overwrite the content in ndr_push_relative_ptr2_end()
Stefan Metzmacher [Fri, 19 Feb 2010 07:11:24 +0000 (08:11 +0100)]
librpc/ndr: don't overwrite the content in ndr_push_relative_ptr2_end()

metze
(cherry picked from commit 76aa37f653fec2d511921768381db7da661750cb)

The last 24 patches address bug #6888 (REGRESSION: printing support for 64 bit
windows clients broken).
(cherry picked from commit b094f4954d0bef08794c5edcf102444908f1971c)

14 years agospoolss: use ndr_push_spoolss_PrinterInfo2 hand-marshalled version (moves devmode...
Günther Deschner [Sat, 13 Feb 2010 02:45:25 +0000 (03:45 +0100)]
spoolss: use ndr_push_spoolss_PrinterInfo2 hand-marshalled version (moves devmode relative pointer down to sd).

Guenther
(cherry picked from commit 0a8011aa98ccaa81dc6ba2d30672ef4856fc31d8)
(cherry picked from commit a2c03502df39c0ee8859895f4a80a3e48f798508)

14 years agospoolss: add spoolss_security_descriptor.
Günther Deschner [Tue, 16 Feb 2010 01:48:01 +0000 (02:48 +0100)]
spoolss: add spoolss_security_descriptor.

Guenther
(cherry picked from commit 28817424935e5b6eaf465fe993dedc2b0a0cf177)
(cherry picked from commit 412ff72854040d5f619e978ce65c60f50f980f2b)

14 years agos3: re-run make samba3-idl.
Günther Deschner [Tue, 9 Feb 2010 15:47:32 +0000 (16:47 +0100)]
s3: re-run make samba3-idl.

Guenther
(cherry picked from commit faf7ab156092a1deffec25db300f11cdedb558a1)

14 years agosecurity: make two bitmaps public.
Günther Deschner [Tue, 16 Feb 2010 09:46:07 +0000 (10:46 +0100)]
security: make two bitmaps public.

Guenther
(cherry picked from commit f10a2d773d141f67319e19b45c40101bb9cb6cf4)
(cherry picked from commit 1623a11fbde6f00fa3d05c8d088f48e206ad63ee)

14 years agospoolss: make two bitmaps public.
Günther Deschner [Sat, 13 Feb 2010 03:27:05 +0000 (04:27 +0100)]
spoolss: make two bitmaps public.

Guenther
(cherry picked from commit 8c4ff98ea11ff06e20bea73596e9643d8194a890)
(cherry picked from commit 63eae72f981b619dd2baf1973bc5744ccd2fca28)

14 years agospoolss: make all security descriptors and devicemodes 4 byte aligned and add missing...
Stefan Metzmacher [Thu, 18 Feb 2010 14:36:08 +0000 (15:36 +0100)]
spoolss: make all security descriptors and devicemodes 4 byte aligned and add missing subcontexts.

Guenther
(cherry picked from commit 8f52957369bf8ce7591d5d9a1436ccb7e384c612)
(cherry picked from commit ef3bd911cae625b524fa79dc28e67db1234f1eeb)

14 years agospoolss: set NDR_RELATIVE_REVERSE flag for various unions that have relative pointers.
Günther Deschner [Mon, 14 Dec 2009 16:22:39 +0000 (17:22 +0100)]
spoolss: set NDR_RELATIVE_REVERSE flag for various unions that have relative pointers.

Guenther
(cherry picked from commit 6d0a39741dacd81e33b25a91fa28cdf983d10d84)
(cherry picked from commit 7c7917ba9cdc17c6b5d1e1e51cde714c0be6e036)

14 years agondr_spoolss_buf: use LIBNDR_FLAG_NO_NDR_SIZE in NDR_SPOOLSS_SIZE_*
Stefan Metzmacher [Thu, 18 Feb 2010 14:17:42 +0000 (15:17 +0100)]
ndr_spoolss_buf: use LIBNDR_FLAG_NO_NDR_SIZE in NDR_SPOOLSS_SIZE_*

metze
(cherry picked from commit 2059a165ee6f4d231aa4075d8ddea70b8df8944f)
(cherry picked from commit 8343c3c28a17cf8c464c9167d453855b5a0482c1)

14 years agospoolss: use subcontext in NDR_SPOOLSS_PUSH_ENUM_OUT macro.
Stefan Metzmacher [Wed, 23 Dec 2009 14:52:39 +0000 (15:52 +0100)]
spoolss: use subcontext in NDR_SPOOLSS_PUSH_ENUM_OUT macro.

metze
(cherry picked from commit a4c3aeb79306190b09e284a6a28e3b40fbc5823b)
(cherry picked from commit db00f017f2ab67931bf04d53df592658fde69419)

14 years agolibndr: fix ndr_size_* calculation with relative reverse buffers
Stefan Metzmacher [Thu, 18 Feb 2010 14:13:20 +0000 (15:13 +0100)]
libndr: fix ndr_size_* calculation with relative reverse buffers

metze
(cherry picked from commit 8310f02414efd3b792857ed20c636c4c114e1ba2)
(cherry picked from commit 2d157eac5abcfe75968d80978c82d6b7b2b0359b)

14 years agolibndr: for now align reverse relative pointers to 2 bytes by default.
Stefan Metzmacher [Thu, 18 Feb 2010 12:40:44 +0000 (13:40 +0100)]
libndr: for now align reverse relative pointers to 2 bytes by default.

This is just a hack and we should let the callers use FLAG_ALIGN2
explicit in future.

metze
(cherry picked from commit 4a76d29374769ba4c075b8d5767498848d2e17d6)
(cherry picked from commit d8251b5ab5e2d1abb8c69cc6ee2fe56bd074e48d)

14 years agolibndr: implement LIBNDR_RELATIVE_REVERSE handling
Stefan Metzmacher [Wed, 17 Feb 2010 20:24:40 +0000 (21:24 +0100)]
libndr: implement LIBNDR_RELATIVE_REVERSE handling

This is based on Guenther's initial code.

metze
(cherry picked from commit 31c7780c16651b284009874cf3da04587dc36d19)
(cherry picked from commit 148460b4ed9dd1ecf83acace0641bab6d22f7296)

14 years agolibndr: store a subcontext buffer size in ndr_push_subcontext_start.
Günther Deschner [Mon, 14 Dec 2009 14:33:32 +0000 (15:33 +0100)]
libndr: store a subcontext buffer size in ndr_push_subcontext_start.

Guenther
(cherry picked from commit 05347754ee61f06466d6d9b7f390001992f793ce)
(cherry picked from commit b8f0d947baab823586cea518e091de55de7b5f56)

14 years agolibndr: give an error when ndr_push_relative_ptr2_start()/_end() is used with the...
Stefan Metzmacher [Wed, 17 Feb 2010 19:27:08 +0000 (20:27 +0100)]
libndr: give an error when ndr_push_relative_ptr2_start()/_end() is used with the RELATIVE_REVERSE flag

metze
(cherry picked from commit b5f9c44da55abb28222441a7e064a2a25891981f)
(cherry picked from commit 983ac75b5b1f6bb79df15340c9ea73ed9c69aee2)

14 years agolibndr: add LIBNDR_FLAG_NO_RELATIVE_REVERSE so that relative reverse processing can...
Günther Deschner [Tue, 9 Feb 2010 17:27:37 +0000 (18:27 +0100)]
libndr: add LIBNDR_FLAG_NO_RELATIVE_REVERSE so that relative reverse processing can be disabled for single structure elements.

Guenther
(cherry picked from commit a2c34296fa6ca2ffb69cb69698a9b5f81803e8a8)
(cherry picked from commit cc103797c60b7a2ee48d73fefd91d7f4ab6586e3)

14 years agolibndr: add LIBNDR_FLAG_RELATIVE_REVERSE flag.
Günther Deschner [Mon, 14 Dec 2009 14:09:00 +0000 (15:09 +0100)]
libndr: add LIBNDR_FLAG_RELATIVE_REVERSE flag.

Guenther
(cherry picked from commit ee13a51b0514ec3ac4ca9c532c2b101a08ec9784)
(cherry picked from commit f7634ed1d3ca13c18e2c2a0f5f8206c3212b32c7)

14 years agolibndr: change subcontext buffer allocation to allocate on subcontext_start.
Günther Deschner [Wed, 16 Dec 2009 21:54:02 +0000 (22:54 +0100)]
libndr: change subcontext buffer allocation to allocate on subcontext_start.

Guenther
(cherry picked from commit c9fa97b01774d767acfabaf1eec7a6aad1510440)
(cherry picked from commit 07a51577816e493c04f0fa7baaf798e9455d923f)

14 years agolibrpc/ndr: make ndr_push_relative_ptr2() static
Stefan Metzmacher [Wed, 17 Feb 2010 19:00:36 +0000 (20:00 +0100)]
librpc/ndr: make ndr_push_relative_ptr2() static

metze
(cherry picked from commit 66fe881cfc0a0919a1d01df896ff8458436e780e)

14 years agolibrpc/ndr_krb5pac: use ndr_push_relative_ptr2_start()/_end()
Stefan Metzmacher [Wed, 17 Feb 2010 19:00:04 +0000 (20:00 +0100)]
librpc/ndr_krb5pac: use ndr_push_relative_ptr2_start()/_end()

metze
(cherry picked from commit e03591111a1b9c2f05c29a7afac4641f23f455f4)
(cherry picked from commit bdf8ae4229e16feb4547893d44805c4d04d7a9ab)

14 years agolibrpc/ndr_drsblobs: use ndr_push_relative_ptr2_start()/_end()
Stefan Metzmacher [Wed, 17 Feb 2010 18:59:19 +0000 (19:59 +0100)]
librpc/ndr_drsblobs: use ndr_push_relative_ptr2_start()/_end()

metze
(cherry picked from commit b423bd2115e006f9af5d40cf5b651e03739d53a0)
(cherry picked from commit e57719ee8395fb288ad7d544c4a2b8fbf15bc72c)

14 years agospoolss: fix relative pointers in ndr_push_spoolss_DriverInfo101.
Günther Deschner [Thu, 11 Feb 2010 17:54:31 +0000 (18:54 +0100)]
spoolss: fix relative pointers in ndr_push_spoolss_DriverInfo101.

Guenther
(cherry picked from commit bfd6edb3e9339d602eb6514ff50c3bb6c671174e)
(cherry picked from commit 08fd161d53b1de4d8b55b2a24bc489658805332f)

14 years agos3: re-run make full_idl.
Günther Deschner [Mon, 14 Dec 2009 13:17:05 +0000 (14:17 +0100)]
s3: re-run make full_idl.

Guenther
(cherry picked from commit c869328b1642043480f9600c88bcce9da37959b1)
(cherry picked from commit 5edccc592e66c1ccea24b81c6a96c21fbabe746d)

14 years agopidl: use ndr_push_relative_ptr2_start and ndr_push_relative_ptr2_end.
Günther Deschner [Mon, 14 Dec 2009 13:09:22 +0000 (14:09 +0100)]
pidl: use ndr_push_relative_ptr2_start and ndr_push_relative_ptr2_end.

Guenther
(cherry picked from commit a049d75193b284fe9efb28d303ea46ba407e5a7a)
(cherry picked from commit b9db7b7e824a2dcbb9f501fa441392d151afc3a3)

14 years agolibndr: add ndr_push_relative_ptr2_start and ndr_push_relative_ptr2_end.
Günther Deschner [Mon, 14 Dec 2009 13:08:34 +0000 (14:08 +0100)]
libndr: add ndr_push_relative_ptr2_start and ndr_push_relative_ptr2_end.

Guenther
(cherry picked from commit 478bf4173af63345c27e09fd2dede56d506da0af)

14 years agoFix bug #7154 - mangling method = hash can crash storing a name not containing a '.'
Jeremy Allison [Thu, 18 Feb 2010 19:22:44 +0000 (11:22 -0800)]
Fix bug #7154 - mangling method = hash can crash storing a name not containing a '.'

Fix use of uninitialized variable. This can lead to crashes if
mangling = hash processes names with no '.'.

Jeremy.
(cherry picked from commit df13b1303a751962d8f7d5298b39e4a7500fef15)
(cherry picked from commit 7122d0e97ca9edeea28c9e898e77f576a886471e)

14 years agoFix bug #7155 - valgrind Conditional jump or move depends on uninitialised value...
Jeremy Allison [Thu, 18 Feb 2010 20:21:10 +0000 (12:21 -0800)]
Fix bug #7155 - valgrind Conditional jump or move depends on uninitialised value(s) error when "mangling method = hash"

The charset array allocated in init_chartest() is allocated
by MALLOC, but only some elements of it being set after allocation. Fix is to
memset to zero after allocation.

Jeremy.
(cherry picked from commit a4e8210ba7d6d471cb9f17754244393b9c1e5930)
(cherry picked from commit fd906e77a0959189db767392981a89b5130939e2)

14 years agos3-docs: Remove trailing whitespaces and fix a typo.
Karolin Seeger [Thu, 18 Feb 2010 12:10:21 +0000 (13:10 +0100)]
s3-docs: Remove trailing whitespaces and fix a typo.

Karolin
(cherry picked from commit 494819773d61daa32d4ee2a0a15088f3b4abe6e2)
(cherry picked from commit b3c5b9d7739143cc3cc7c004a73fce2969aaa6b8)

14 years agos3:docs: add some advice for usage of strict allocate
Björn Jacke [Wed, 17 Feb 2010 22:03:32 +0000 (23:03 +0100)]
s3:docs: add some advice for usage of strict allocate
(cherry picked from commit 37115f91aebec9c846e54790c6bcf433ae35888a)
(cherry picked from commit cbf728ce617323ca866799370491a402800772c1)

14 years agotsocket/bsd: fix comment in tdgram_bsd_recvfrom_handler()
Stefan Metzmacher [Wed, 17 Feb 2010 18:11:11 +0000 (19:11 +0100)]
tsocket/bsd: fix comment in tdgram_bsd_recvfrom_handler()

metze
(cherry picked from commit c42d9c4ec410e205091784cd97cbceb5572609d8)
(cherry picked from commit d68c7db67dc8f87be8a924d1b2b66379fc52b723)

14 years agoFix commit d07cd37b993d3c9beded20323174633b806196b5
Jeremy Allison [Wed, 17 Feb 2010 17:24:34 +0000 (09:24 -0800)]
Fix commit d07cd37b993d3c9beded20323174633b806196b5

Which was:

    tsocket/bsd: fix bug #7115 FreeBSD includes the UDP header in FIONREAD

Metze, this has to have been wrong - you are throwing away the talloc_realloc
pointer returned. Also no error checking. Please review.

Thank goodness for gcc warnings :-).

Jeremy.
(cherry picked from commit 936828de71023d90aaec6c1dba84052246bbad11)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit ba85facc2ce212d52140086f876eb4915b40bf22)

14 years agotsocket/bsd: fix bug #7115 FreeBSD includes the UDP header in FIONREAD
Stefan Metzmacher [Wed, 17 Feb 2010 12:53:02 +0000 (13:53 +0100)]
tsocket/bsd: fix bug #7115 FreeBSD includes the UDP header in FIONREAD

metze
(cherry picked from commit d07cd37b993d3c9beded20323174633b806196b5)
(cherry picked from commit b9e7200f933480bce20219f0294364288be3a5df)

14 years agotsocket/bsd: set IPV6_V6ONLY on AF_INET6 sockets
Stefan Metzmacher [Wed, 17 Feb 2010 08:33:18 +0000 (09:33 +0100)]
tsocket/bsd: set IPV6_V6ONLY on AF_INET6 sockets

Some system already have this as default. It's easier
to behave the same way on all systems and handle ipv6
and ipv4 sockets separate.

metze
(cherry picked from commit 1ffcb991a900b78c9175f6b093839fe96b1bd7d9)
(cherry picked from commit d1dfa2e92fea3dc54771c4b1a6e3c06ee478b54f)

14 years agotsocket/bsd: fix bug #7140 autodetect ipv4 and ipv6 based on the remote address if...
Stefan Metzmacher [Wed, 17 Feb 2010 07:49:28 +0000 (08:49 +0100)]
tsocket/bsd: fix bug #7140 autodetect ipv4 and ipv6 based on the remote address if the local address is any

metze
(cherry picked from commit 8a0949dfc8d2ecf577dfc5ef38496421101b734e)
(cherry picked from commit b4a5c3325a272c97658aaede1f1c659260524789)

14 years agotsocket/bsd: fix bug #7140 use calculated sa_socklen for bind() in tstream_bsd_connec...
Stefan Metzmacher [Wed, 17 Feb 2010 07:45:58 +0000 (08:45 +0100)]
tsocket/bsd: fix bug #7140 use calculated sa_socklen for bind() in tstream_bsd_connect_send()

This is needed because, we can't use sizeof(sockaddr_storage) for AF_UNIX
sockets. Also some platforms require exact values for AF_INET and AF_INET6.

metze
(cherry picked from commit 6637b2f4b06fcee1e8e1b1782dd96e3273f8caac)
(cherry picked from commit c84c467be347384ab1ceb7d74147fef364678235)

14 years agotsocket/bsd: fix do_bind logic for AF_INET
Stefan Metzmacher [Wed, 17 Feb 2010 07:42:22 +0000 (08:42 +0100)]
tsocket/bsd: fix do_bind logic for AF_INET

We want the explicit bind() when we don't use the any address.

metze
(cherry picked from commit 135543b4c300e2fc31ee4165ce630644e1aef455)
(cherry picked from commit fc63303b07b09f6d6855284f4e0080972fe424f7)

14 years agosocket_wrapper: also ignore AF_INET6 in swrap_setsockopt()
Stefan Metzmacher [Wed, 17 Feb 2010 08:43:00 +0000 (09:43 +0100)]
socket_wrapper: also ignore AF_INET6 in swrap_setsockopt()

metze
(cherry picked from commit 0b3e950731fe72a258a631e39ca1304d54663536)
(cherry picked from commit 6aa09416ad5f27e3db679765657b67e54dde5fd9)

14 years agos3-modules: fix get_acl_blob in the acl_tdb VFS module.
Günther Deschner [Thu, 18 Feb 2010 01:13:07 +0000 (02:13 +0100)]
s3-modules: fix get_acl_blob in the acl_tdb VFS module.

Shuttle-reviewed by jra :)

Guenther
(cherry picked from commit 6cf10cc1020dd7ef483887caebcbd76d28572432)

Fix bug #7148 (vfs_acl_tdb module uses uninitialized variable. Reading blob can
fail.)
(cherry picked from commit 61ea3d3f897f2b6c1b893e727f57ce079782572b)

14 years agoFix bug #6557 - Do not work VFS full_audit
Jeremy Allison [Wed, 17 Feb 2010 18:11:57 +0000 (10:11 -0800)]
Fix bug #6557 - Do not work VFS full_audit

Re-arrange the operations order so SMB_VFS_CONNECT is done
first as root (to allow modules to correctly initialize themselves).

Reviewed modules to check if they needed CONNECT invoked as
a user (which we previously did) and it turns out any of them
that cared needed root permissions anyway.

Jeremy.
(cherry picked from commit 1d71d4b6b5f5fdf5caf9fed861c2032bb307a32f)

14 years agos3: Fix bug 7139 owner of file not available with kerberos.
Volker Lendecke [Tue, 16 Feb 2010 22:29:48 +0000 (23:29 +0100)]
s3: Fix bug 7139 owner of file not available with kerberos.

To provide the user with the same SID when doing Kerberos logins, attempt to do
a make_server_info_sam instead of a make_server_info_pw.
(cherry picked from commit 45c634eafa2f398827f16345b56603b969964527)

14 years agoWHATSNEW: Update changes.
Karolin Seeger [Wed, 17 Feb 2010 13:51:03 +0000 (14:51 +0100)]
WHATSNEW: Update changes.

Karolin
(cherry picked from commit 3bb72e7f3e6be64011cabfd37866b29ffb0e18a4)

14 years agocifs.upcall: allocate a talloc context for smb_krb5_unparse_name
Jeff Layton [Tue, 16 Feb 2010 14:16:42 +0000 (09:16 -0500)]
cifs.upcall: allocate a talloc context for smb_krb5_unparse_name

cifs.upcall calls smb_krb5_unparse_name with a NULL talloc context.
Older versions of this function though will conditionally use
SMB_REALLOC instead of TALLOC_REALLOC when a NULL context is passed
in. To make it more consistent, just spawn a talloc context that
we can pass into this function.

Resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=565446
https://bugzilla.samba.org/show_bug.cgi?id=6868

Reported-by: Ludek Finstrle <luf@seznam.cz>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Günther Deschner <gd@samba.org>
(cherry picked from commit a8cc2fa09ed43a167f62711bef363a5ac335dc78)

Fix bug #6868 (make bin/cifs.upcall fails).
(cherry picked from commit 01750852c1e9983b9d59a73d412101b4e0eb81a1)

14 years agos3-docs: Document 'smbclient -C'.
Volker Lendecke [Tue, 16 Feb 2010 10:00:08 +0000 (11:00 +0100)]
s3-docs: Document 'smbclient -C'.
(cherry picked from commit f6c39cec27eea2522c62e6f1ff85efdafde351ac)
(cherry picked from commit f6a7e9eadf85b19ec0ccca513a261bcad0bcf048)

14 years agos3/smbd: change locking behavior when "lock spin time = 0".
Steven Danneman [Fri, 12 Feb 2010 23:42:50 +0000 (15:42 -0800)]
s3/smbd: change locking behavior when "lock spin time = 0".

The "lock spin time" parameter mimics the following Windows
setting which by default is 250ms in Windows and 200ms in Samba.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\LockViolationDelay

When a client sends repeated, non-blocking, contending BRL requests
to a Windows server, after the first Windows starts treating these
requests as timed blocking locks with the above timeout.

As an efficiency, I've changed the behavior when this setting is 0,
to skip this logic and treat all requests as non-blocking locks.

This gives the smbd server behavior similar to the 3.0 release with
the do_spin_lock() implementation.

I've also changed the blocking lock parameter in the call from
push_blocking_lock_request() to true as all requests made in this
path are blocking by definition.
(cherry picked from commit cb0ea273696fc9024e6da18eb3e319024f8643f5)

Fix bug #7138 (Backport 'lock spin time" enhancement to 3.5.1).
(cherry picked from commit 3e72ded677389816dd4f502792139cd8b2945f98)

14 years agoFix error in docs. Should be milliseconds, not microseconds.
Jeremy Allison [Sat, 13 Feb 2010 05:29:58 +0000 (21:29 -0800)]
Fix error in docs. Should be milliseconds, not microseconds.
(cherry picked from commit c7f16abc47a2d291d3da95b4c8e654010e36bc0f)
(cherry picked from commit 53531cb983739391fc70b1490f29d294785fee68)

14 years agos3: by default don't use pthread pool support
Björn Jacke [Fri, 29 Jan 2010 11:42:25 +0000 (12:42 +0100)]
s3: by default don't use pthread pool support
(cherry picked from commit 118725c892e445fcc1dc5947cb919cf99c49373f)

The last seven patches address bug #6983 (Build with aio support fails on Debian
Sarge).
(cherry picked from commit 3e43399fdbeb5a145c9e2d22390a8758f515fe36)

14 years agos3:nsswitch: also use pthread CFLAGS for the nsswitch modules that might require it
Björn Jacke [Thu, 4 Feb 2010 10:03:55 +0000 (11:03 +0100)]
s3:nsswitch: also use pthread CFLAGS for the nsswitch modules that might require it
(cherry picked from commit 55d65ba7213e5b30711b5b5939d53e3d3990d86a)
(cherry picked from commit 6be22ad4248c1cfd3fad22818ca9fc3c3894b4c0)

14 years agos3: fix build on Tru64 after it broke with deactivating pthread pool support
Björn Jacke [Thu, 4 Feb 2010 09:35:45 +0000 (10:35 +0100)]
s3: fix build on Tru64 after it broke with deactivating pthread pool support
(cherry picked from commit acedd1c8320afa672ca70c6594bc90ccb7e75a6a)
(cherry picked from commit ff2a7386e625a041448ff9f64862d83533a191b8)