ddiss/samba.git
12 years agos3:smb2_server: FLAG_CHAINED means we always use the last session_id and tid
Stefan Metzmacher [Tue, 1 Nov 2011 17:55:17 +0000 (10:55 -0700)]
s3:smb2_server: FLAG_CHAINED means we always use the last session_id and tid

Based on master commit 91648aeb6409787c7766943225f5c7a9c695aa0b.

metze

The last 4 patches address bug #8560 (SMB2 doesn't handle compound request
headers in the same way as Windows).

12 years agosmb2_constants: add SMB2_HDR_CREDIT_CHARGE
Stefan Metzmacher [Tue, 30 Aug 2011 09:48:16 +0000 (11:48 +0200)]
smb2_constants: add SMB2_HDR_CREDIT_CHARGE

SMB2_HDR_EPOCH was never used and SMB 2.10 uses it as
SMB2_HDR_CREDIT_CHARGE.

We keep SMB2_HDR_EPOCH as alias for now, until all callers
are fixed.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Aug 30 23:49:56 CEST 2011 on sn-devel-104
(cherry picked from commit 480a031c5b9a2ffe1e03e3fcb197e526e6d69e72)

12 years agos3:smb2_server: don't reset the tid and session id in the out hdr of compound requests
Stefan Metzmacher [Mon, 31 Oct 2011 22:15:09 +0000 (15:15 -0700)]
s3:smb2_server: don't reset the tid and session id in the out hdr of compound requests

Windows also leaves tid (0xFFFFFFFF) and session id (0xFFFFFFFFFFFFFFFF)
as the client requested them.

Based on commit 8d07d7148bf47ea14e62d39ed8a8cc4f1366810e from master.

metze

12 years agos3:smb2_server: echo the SMB2_HDR_CREDIT_CHARGE and SMB2_HDR_SIGNATURE fields
Stefan Metzmacher [Thu, 27 Oct 2011 14:42:44 +0000 (16:42 +0200)]
s3:smb2_server: echo the SMB2_HDR_CREDIT_CHARGE and SMB2_HDR_SIGNATURE fields

Windows just echos back the given values by default.

metze
(cherry picked from commit c7d3b6b2c38711943910aebff72b0188b0c346db)

12 years agos3:smbd increase a debug level
Christian Ambach [Fri, 4 Nov 2011 16:34:48 +0000 (17:34 +0100)]
s3:smbd increase a debug level

logging disconnected clients with level 1 swamps the logs

(This fixes Bug #8585 Disconnecting clients swamp the logs)

12 years agoProperly fix bug #8384 - Windows XP clients seem to crash smbd process every once...
Henry Wong [Fri, 4 Nov 2011 18:20:10 +0000 (11:20 -0700)]
Properly fix bug #8384 - Windows XP clients seem to crash smbd process every once in a while.

Ensure we correctly null out the referenced pointer when we decrease the ref. count.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Nov  4 21:12:13 CET 2011 on sn-devel-104
(cherry picked from commit 51c86c8e67c3b026f49136f5b6743c279cc206d2)

12 years agoexamples: Fix perl path.
Günther Deschner [Thu, 3 Nov 2011 19:55:08 +0000 (20:55 +0100)]
examples: Fix perl path.

Fix bug #8176 (wall.perl example uses /usr/loca/bin for pat to perl binary).
(cherry picked from commit 2bec3bd80fc16699dfe8cc6aa3afd97881b8bfe9)

12 years agos3-netlogon: Fix setting the machinge account password.
Andreas Schneider [Thu, 27 Oct 2011 09:21:08 +0000 (11:21 +0200)]
s3-netlogon: Fix setting the machinge account password.

This bug has been found with uid wrapper.
(cherry picked from commit bda9752b1036c4d4db76a526a79a091419bf757c)

Fix bug #8550 (Calls inside netr_set_machine_account_password() to set the
machine account password must be done as root).

12 years agoFix bug #8548 - winbind_samlogon_retry_loop ignores logon_parameters flags.
Jeremy Allison [Fri, 28 Oct 2011 19:29:54 +0000 (12:29 -0700)]
Fix bug #8548 - winbind_samlogon_retry_loop ignores logon_parameters flags.

Fix confirmed by reporter.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Oct 28 23:04:47 CEST 2011 on sn-devel-104
(cherry picked from commit f30f71c14a0b89dea296910ac9b92d3ae4016613)

12 years agoFix bug #8542 - smbclient posix_open command fails to return correct info on open...
Jeremy Allison [Sat, 22 Oct 2011 01:08:46 +0000 (18:08 -0700)]
Fix bug #8542 - smbclient posix_open command fails to return correct info on open file.

12 years agoThird part of fix for bug #8541 - readlink() on Linux clients fails if the symlink...
Jeremy Allison [Sat, 22 Oct 2011 01:35:15 +0000 (18:35 -0700)]
Third part of fix for bug #8541 - readlink() on Linux clients fails if the symlink target is outside of the share.

Missed passing ucf_flags instead of hard coded flags in findfirst call.
(cherry picked from commit 49d2a796bed0273327d8919755023c4dbd6d8232)

12 years agoSecond part of fix for bug #8541 - readlink() on Linux clients fails if the symlink...
Jeremy Allison [Sat, 22 Oct 2011 00:46:12 +0000 (17:46 -0700)]
Second part of fix for bug #8541 - readlink() on Linux clients fails if the symlink target is outside of the share.

The statcache has to do lstat instead of stat when returning cached
posix pathnames.
(cherry picked from commit 305d7d7f7d76e37d82ce6ac257f178ce654b26db)

12 years agoFix bug #8541 - readlink() on Linux clients fails if the symlink target is outside...
Jeremy Allison [Fri, 21 Oct 2011 21:12:41 +0000 (14:12 -0700)]
Fix bug #8541 - readlink() on Linux clients fails if the symlink target is outside of the share.

The key is to only allow the lookup to succeed if it's a UNIX level lookup or readlink,
but disallow all other operations.
(cherry picked from commit d2ec9d20858b8e5256bf8339395c6f47793e0975)

12 years agoUse existing ISDOT and ISDOTDOT macros.
Jeremy Allison [Mon, 25 Jul 2011 23:12:45 +0000 (16:12 -0700)]
Use existing ISDOT and ISDOTDOT macros.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Jul 28 02:09:20 CEST 2011 on sn-devel-104
(cherry picked from commit d82256ca119eb8315cc69ba725ba71c386caa901)

12 years agos3-netapi: remove pointless use_memory_krb5_ccache.
Günther Deschner [Wed, 26 Oct 2011 13:03:23 +0000 (15:03 +0200)]
s3-netapi: remove pointless use_memory_krb5_ccache.

This breaks the ABI.

Guenther

See bug #7465 for more details.

12 years agos3:Makefile: make DSO_EXPORTS_CMD more portable (#8531)
Björn Jacke [Thu, 20 Oct 2011 19:39:38 +0000 (21:39 +0200)]
s3:Makefile: make DSO_EXPORTS_CMD more portable (#8531)

It sems like every not completely trivial sed expression should be tested with
Solaris' sed.  Its regexp engine is way more limited than the one of GNU
sed. Thanks to Michael Pelletier for finding this! This fixes bug #8531

Autobuild-User: Björn Jacke <bj@sernet.de>
Autobuild-Date: Thu Oct 20 23:15:05 CEST 2011 on sn-devel-104
(cherry picked from commit 37be1df3d7534c2cc8e1e25614164c2178372b94)

12 years agoAdd new contributing FAQ announcing acceptance of corporate (C).
Jeremy Allison [Wed, 12 Oct 2011 00:00:08 +0000 (17:00 -0700)]
Add new contributing FAQ announcing acceptance of corporate (C).

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Oct 12 03:46:41 CEST 2011 on sn-devel-104
(cherry picked from commit bd01ae227bc567fd7953e446236364fc4d110a48)

12 years agoFix sys_fseek wrapper
Brad Smith [Wed, 12 Oct 2011 08:23:58 +0000 (04:23 -0400)]
Fix sys_fseek wrapper

Signed-off-by: Günther Deschner <gd@samba.org>
Fix bug #8525 (Bug with sys_fseek() wrapper on *BSD / OS X).

12 years agos3:registry: fix the test for a REG_SZ blob possibly being a zero terminated ucs2...
Michael Adam [Thu, 29 Sep 2011 16:06:56 +0000 (18:06 +0200)]
s3:registry: fix the test for a REG_SZ blob possibly being a zero terminated ucs2 string

1. catch data blobs with odd number of bytes (not an ucs2 string at all)
2. test the right ucs2 character to be 0
   (prevent out-of bounds access/potential segfault)

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Sun Oct  2 01:26:05 CEST 2011 on sn-devel-104
(cherry picked from commit 95bb2c23e6e9c52a1e34916dff05b1d306278bc6)

The last 2 patches address bug #8528 (SEGFAULT from net registry export on not
zero terminated REG_SZ values).

12 years agos3:registry: reg_format: handle unterminated REG_SZ blobs
Gregor Beck [Tue, 6 Sep 2011 07:24:10 +0000 (09:24 +0200)]
s3:registry: reg_format: handle unterminated REG_SZ blobs

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit b9da4235566ffdd649d7b4a6ca05cecd02cfbd20)

12 years agoFirst part of fix for bug #8419 - Make VFS op "streaminfo" stackable.
Frank Lahm [Mon, 17 Oct 2011 18:10:29 +0000 (11:10 -0700)]
First part of fix for bug #8419 - Make VFS op "streaminfo" stackable.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Oct 17 21:39:32 CEST 2011 on sn-devel-104
(cherry picked from commit c3bdcab5161107be8155a7913d9cb325383a781d)

12 years agoAdd support for VFS op streaminfo chaining in all relevant VFS modules.
Frank Lahm [Thu, 13 Oct 2011 22:41:53 +0000 (15:41 -0700)]
Add support for VFS op streaminfo chaining in all relevant VFS modules.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Oct 14 03:26:06 CEST 2011 on sn-devel-104
(cherry picked from commit 7a0b5d6fc51d5d212529e82e5ed8e21516bfbe27)

12 years agoWHATSNEW: Start release notes for Samba 3.6.2.
Karolin Seeger [Thu, 20 Oct 2011 17:47:33 +0000 (19:47 +0200)]
WHATSNEW: Start release notes for Samba 3.6.2.

Karolin

12 years agoVERSION: Bump version up to 3.6.2.
Karolin Seeger [Thu, 20 Oct 2011 17:44:15 +0000 (19:44 +0200)]
VERSION: Bump version up to 3.6.2.

Karolin

12 years agoWHATSNEW: Update changes since 3.6.0.
Karolin Seeger [Tue, 18 Oct 2011 18:45:34 +0000 (20:45 +0200)]
WHATSNEW: Update changes since 3.6.0.

Karolin

12 years agos3/doc: add man page for aio_fork vfs module
Björn Jacke [Tue, 18 Oct 2011 08:54:56 +0000 (10:54 +0200)]
s3/doc: add man page for aio_fork vfs module

thanks to Volker for the content

Autobuild-User: Björn Jacke <bj@sernet.de>
Autobuild-Date: Tue Oct 18 12:24:35 CEST 2011 on sn-devel-104
(cherry picked from commit 56328a4d61c8d0a52f6841097bf8fc4ffd46bfb6)

12 years agoFix uninitialized memory problem in group_sids_to_info3 (fixes bug #8455).
Wilco Baan Hofman [Mon, 17 Oct 2011 19:24:41 +0000 (21:24 +0200)]
Fix uninitialized memory problem in group_sids_to_info3 (fixes bug #8455).

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Oct 17 23:32:58 CEST 2011 on sn-devel-104
(cherry picked from commit c52b571506874987ba626c25e9692fbe2251b7e2)

12 years agoWHATSNEW: Update changes since 3.6.0.
Karolin Seeger [Sat, 15 Oct 2011 18:46:34 +0000 (20:46 +0200)]
WHATSNEW: Update changes since 3.6.0.

Karolin

12 years agoFix bug #8521 - winbindd cache timeout expiry test was reversed
Jeremy Allison [Wed, 12 Oct 2011 16:43:18 +0000 (09:43 -0700)]
Fix bug #8521 - winbindd cache timeout expiry test was reversed

Found and fix reported by Micha Lenk <micha@lenk.info>. Thanks !
(cherry picked from commit 1e4761d05978b7a495d121acc1deaa7049f3911c)

12 years agos3: Fix bug 8455 -- Samba PDC is looking up only primary user group
Volker Lendecke [Fri, 16 Sep 2011 13:45:47 +0000 (15:45 +0200)]
s3: Fix bug 8455 -- Samba PDC is looking up only primary user group

group_sids_to_info3 does a sid_peek_check_rid on the domain sid before adding
the rids to the array. If the domain sid is 0x0, then the check will always
fail.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat Sep 17 00:51:27 CEST 2011 on sn-devel-104
(cherry picked from commit 3dcec44f3edbc9c4f1946ead3480f6d01cd53e7a)

12 years agoAnother part of the fix for Bug 8473 - smb2_find uses a hard coded max reply size...
Jeremy Allison [Wed, 12 Oct 2011 21:00:32 +0000 (14:00 -0700)]
Another part of the fix for Bug 8473 - smb2_find uses a hard coded max reply size of 0x10000 instead of smb2_max_trans.

Change the defaults and the documentation to reflect the 64k limit.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Oct 13 12:22:23 CEST 2011 on sn-devel-104
(cherry picked from commit d2a9e8df35be1516f22f0ef78356de6d4b02d4d3)

12 years agos3:smb2_server: get/set info are limited by max_trans size (bug #8473)
Stefan Metzmacher [Wed, 12 Oct 2011 15:46:50 +0000 (17:46 +0200)]
s3:smb2_server: get/set info are limited by max_trans size (bug #8473)

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Oct 13 03:32:02 CEST 2011 on sn-devel-104
(cherry picked from commit 5e04231e961f10656384a6f16104d0d55b6f3e0e)

12 years agos3:smb2_server: reject writes larger then the negotiated max_write size (bug #8473)
Stefan Metzmacher [Wed, 12 Oct 2011 14:58:46 +0000 (16:58 +0200)]
s3:smb2_server: reject writes larger then the negotiated max_write size (bug #8473)

metze
(cherry picked from commit 6981f1114792cc251bf1e05183dd88f5d351ab09)

12 years agos3:smb2_server: remember the max_{trans,read,write} sizes we negotiated (bug #8473)
Stefan Metzmacher [Fri, 23 Sep 2011 15:18:14 +0000 (17:18 +0200)]
s3:smb2_server: remember the max_{trans,read,write} sizes we negotiated (bug #8473)

We should enforce the negotiated max sizes instead of the
lp_smb2_max_*() sizes.

metze
(cherry picked from commit 40ea66c5dda91ba3f74bed7db1ce02f6c8b4ffeb)

12 years agos4:torture/smb2: we only support 64KB reads/writes for now
Stefan Metzmacher [Wed, 12 Oct 2011 16:34:26 +0000 (18:34 +0200)]
s4:torture/smb2: we only support 64KB reads/writes for now

We don't have multi-credit support yet.

metze
(cherry picked from commit 77f739f03a32965b676d97a6f082bb3e023014ef)

12 years agos3:smbd: disconnect the socket if we got an unexpected request
Stefan Metzmacher [Fri, 23 Sep 2011 04:37:35 +0000 (06:37 +0200)]
s3:smbd: disconnect the socket if we got an unexpected request

If we got a SMB2_OP_NEGPROT after the protocol is already negotiated
or if we got a non SMB2_OP_NEGPROT before the protocol was negotiated
we should close the connection (as windows does).

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Sep 23 12:30:50 CEST 2011 on sn-devel-104
(cherry picked from commit 5494856294384df4360d85e68abc03c43dc16e06)

12 years agos3:smb2_server: max_trans, max_read and max_write are limited to 64 kilobytes
Stefan Metzmacher [Mon, 5 Sep 2011 10:14:06 +0000 (12:14 +0200)]
s3:smb2_server: max_trans, max_read and max_write are limited to 64 kilobytes

Only if SMB2_CAP_LARGE_MTU is supported we should announce larger limits.

metze
(cherry picked from commit e603929b9801ad6cc47dead19d27b42fe46489c7)

12 years agoWHATSNEW: Update changes since 3.6.0.
Karolin Seeger [Wed, 12 Oct 2011 19:56:27 +0000 (21:56 +0200)]
WHATSNEW: Update changes since 3.6.0.

Karolin

12 years agoFix bug #8515 - Empty CIFS share can be blocked for other clients by deleting it...
Volodymyr Khomenko [Wed, 12 Oct 2011 16:57:57 +0000 (09:57 -0700)]
Fix bug #8515 - Empty CIFS share can be blocked for other clients by deleting it via empty path (DELETE_PENDING until the last client)

Disallow "." in can_set_delete_on_close().

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Oct 12 21:07:27 CEST 2011 on sn-devel-104
(cherry picked from commit bd260f03ab492d03c2890db47dc6fb4f1b824a1a)

12 years agoWHATSNEW: Update changes since 3.6.0.
Karolin Seeger [Wed, 12 Oct 2011 19:44:52 +0000 (21:44 +0200)]
WHATSNEW: Update changes since 3.6.0.

Karolin

12 years agos3-smb2_server: fix ioctl InputOffset checking
David Disseldorp [Wed, 28 Sep 2011 12:45:42 +0000 (14:45 +0200)]
s3-smb2_server: fix ioctl InputOffset checking

Currently the InputOffset is always check to point to the input data
buffer, regardless of whether input data is present.

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

The last 22 patches addres bug #8520 (Fix SMB2 SMB2_OP_GETINFO and
SMB2_OP_IOCTL parsing requirements).

12 years agos3-smb2_server: SMB2_OP_IOCTL doesn't require at least 1 dyn byte
David Disseldorp [Sun, 25 Sep 2011 21:39:07 +0000 (23:39 +0200)]
s3-smb2_server: SMB2_OP_IOCTL doesn't require at least 1 dyn byte

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

12 years agos3:smb2_server: SMB2_OP_GETINFO doesn't require at least 1 dyn byte
Stefan Metzmacher [Wed, 14 Sep 2011 11:04:28 +0000 (13:04 +0200)]
s3:smb2_server: SMB2_OP_GETINFO doesn't require at least 1 dyn byte

metze
(cherry picked from commit 563fa741f6a34a1300c81a8474ca87346a9f5cca)

12 years agos3:smb2_server: return OBJECT_NAME_INVALID if the path is terminated in SMB2_FIND...
Stefan Metzmacher [Tue, 6 Sep 2011 12:14:52 +0000 (14:14 +0200)]
s3:smb2_server: return OBJECT_NAME_INVALID if the path is terminated in SMB2_FIND/QUERY_DIRECTORY

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Sep  7 12:15:51 CEST 2011 on sn-devel-104
(cherry picked from commit 9bc4decc1cba701926fc8081c3903aac754a6f51)

12 years agos3:smb2_server: return OBJECT_NAME_INVALID if the path is terminated in SMB2_CREATE
Stefan Metzmacher [Tue, 6 Sep 2011 12:14:52 +0000 (14:14 +0200)]
s3:smb2_server: return OBJECT_NAME_INVALID if the path is terminated in SMB2_CREATE

metze
(cherry picked from commit 1bc93c2605e14104237bb100db1d8acb1e7fe389)

12 years agos3:smb2_server: return BAD_NETWORK_NAME if the path is terminated in SMB2_TCON
Stefan Metzmacher [Tue, 6 Sep 2011 12:14:52 +0000 (14:14 +0200)]
s3:smb2_server: return BAD_NETWORK_NAME if the path is terminated in SMB2_TCON

metze
(cherry picked from commit 68b33aa61ac393c2737969f8449adce3e3096d73)

12 years agos3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_write.c
Stefan Metzmacher [Tue, 6 Sep 2011 12:01:43 +0000 (14:01 +0200)]
s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_write.c

metze
(cherry picked from commit 1a726b88ec74962d0317740bbdf576ddcffb52bc)

12 years agos3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_setinfo.c
Stefan Metzmacher [Tue, 6 Sep 2011 12:01:43 +0000 (14:01 +0200)]
s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_setinfo.c

metze
(cherry picked from commit 3643a05ba63ac5d8466dc8391b5d05efeedb5ac4)

12 years agos3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_read.c
Stefan Metzmacher [Tue, 6 Sep 2011 12:01:43 +0000 (14:01 +0200)]
s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_read.c

metze
(cherry picked from commit f3a8d65bdfe496f080a74eb7104500bd8e2b0179)

12 years agos3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_notify.c
Stefan Metzmacher [Tue, 6 Sep 2011 12:01:43 +0000 (14:01 +0200)]
s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_notify.c

metze
(cherry picked from commit c6480366e551d1dc683c2648bd897bdc7c1b90df)

12 years agos3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_lock.c
Stefan Metzmacher [Tue, 6 Sep 2011 12:01:43 +0000 (14:01 +0200)]
s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_lock.c

metze
(cherry picked from commit a358eee2d8670d4a1675e82562fa704fa45a71e6)

12 years agos3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_keepalive.c
Stefan Metzmacher [Tue, 6 Sep 2011 12:01:43 +0000 (14:01 +0200)]
s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_keepalive.c

metze
(cherry picked from commit 22d479f75794b7c5fcac2fd47fbfd767700507d6)

12 years agos3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_ioctl.c
Stefan Metzmacher [Tue, 6 Sep 2011 12:01:43 +0000 (14:01 +0200)]
s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_ioctl.c

metze
(cherry picked from commit 29b3601c028b8861102b1d988285c78fc17f3b8e)

12 years agos3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_getinfo.c
Stefan Metzmacher [Tue, 6 Sep 2011 12:01:43 +0000 (14:01 +0200)]
s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_getinfo.c

metze
(cherry picked from commit 880eafd7e83ba326be7036605179e8de746f4312)

12 years agos3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_flush.c
Stefan Metzmacher [Tue, 6 Sep 2011 12:01:43 +0000 (14:01 +0200)]
s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_flush.c

metze
(cherry picked from commit 440f702aa9a020f8cfe13037b7af1ba0dadf86f2)

12 years agos3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_find.c
Stefan Metzmacher [Tue, 6 Sep 2011 12:01:43 +0000 (14:01 +0200)]
s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_find.c

metze
(cherry picked from commit bc95ab99dc84fa6d567a7d4e803552363bbc07a9)

12 years agos3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_create.c
Stefan Metzmacher [Tue, 6 Sep 2011 12:01:43 +0000 (14:01 +0200)]
s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_create.c

metze
(cherry picked from commit 251815bfd395398857cb60c0b89710ddce7ab19f)

12 years agos3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_close.c
Stefan Metzmacher [Tue, 6 Sep 2011 12:01:43 +0000 (14:01 +0200)]
s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_close.c

metze
(cherry picked from commit e09b3940a769806dcc17d24079375f5d53eca26a)

12 years agos3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_break.c
Stefan Metzmacher [Tue, 6 Sep 2011 12:01:43 +0000 (14:01 +0200)]
s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_break.c

metze
(cherry picked from commit 9da2f72d471460d9c953e9cee84c9cfa3611e89e)

12 years agos3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_tcon.c
Stefan Metzmacher [Tue, 6 Sep 2011 12:01:43 +0000 (14:01 +0200)]
s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_tcon.c

metze
(cherry picked from commit 02f7c37e671c7950619c000b73c5a09ce31c68ac)

12 years agos3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_sesssetup.c
Stefan Metzmacher [Tue, 6 Sep 2011 12:01:43 +0000 (14:01 +0200)]
s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_sesssetup.c

metze
(cherry picked from commit d280d9f945be2d658694c6d4503822e99dc953b5)

12 years agos3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_negprot.c
Stefan Metzmacher [Tue, 6 Sep 2011 12:01:43 +0000 (14:01 +0200)]
s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_negprot.c

metze
(cherry picked from commit 7ec3a35d2a67ca93a49094f07a12b0e37cec1661)

12 years agos3:smb2_server: add smbd_smb2_request_verify_sizes()
Stefan Metzmacher [Mon, 3 Oct 2011 21:50:48 +0000 (14:50 -0700)]
s3:smb2_server: add smbd_smb2_request_verify_sizes()

metze.

12 years agos3:smb2_create: fix allocation size return value when opening existing files
Christian Ambach [Mon, 10 Oct 2011 15:48:18 +0000 (17:48 +0200)]
s3:smb2_create: fix allocation size return value when opening existing files

at least on GPFS, using the stat information gave wrong results
example: FileInfo gave 12582912000, Create Response gave 25769803776000

This makes the create part use the same method as fileinfo,
matching up the replies of both calls

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Oct 10 21:49:53 CEST 2011 on sn-devel-104
(cherry picked from commit ec0c1f2c34ea520b4a7d636ba284a9c7d3ecd96f)

Fix bug #8518 (SMB2 create call returns incorrect file allocation size).

12 years agoRemove extraneous debug code.
Jeremy Allison [Wed, 21 Sep 2011 20:47:22 +0000 (13:47 -0700)]
Remove extraneous debug code.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Sep 22 00:22:12 CEST 2011 on sn-devel-104

12 years agoFix bug #8474 - SMB2 create doesn't cope with an Apple client using NULL blob in...
Jeremy Allison [Wed, 21 Sep 2011 18:40:01 +0000 (11:40 -0700)]
Fix bug #8474 - SMB2 create doesn't cope with an Apple client using NULL blob in create

Cope with zero length data_offset and data_length values.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Sep 21 22:12:40 CEST 2011 on sn-devel-104

12 years agoTidy up previous patch for bug #8442 - NFSv4 DENY ACLs always include SYNCHRONIZE...
Jeremy Allison [Wed, 7 Sep 2011 21:57:11 +0000 (14:57 -0700)]
Tidy up previous patch for bug #8442 - NFSv4 DENY ACLs always include SYNCHRONIZE flag - blocking renames.

aceType is an enum field, not a bitmask.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Sep  8 03:34:39 CEST 2011 on sn-devel-104
(cherry picked from commit 0aa6751e919d842cdae044be26f6da725063eac2)

12 years agoFix bug #8442 - NFSv4 DENY ACLs always include SYNCHRONIZE flag - blocking renames.
Ira Cooper [Wed, 7 Sep 2011 19:24:22 +0000 (12:24 -0700)]
Fix bug #8442 - NFSv4 DENY ACLs always include SYNCHRONIZE flag - blocking renames.

Thanks to Youzhong Yang for discovering this issue.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Sep  7 22:56:06 CEST 2011 on sn-devel-104
(cherry picked from commit 600451da33728cbd377b122c85cf146f5b319998)

12 years agos3-docs: Fix typo.
Karolin Seeger [Sat, 8 Oct 2011 18:54:37 +0000 (20:54 +0200)]
s3-docs: Fix typo.

Karolin

Autobuild-User: Karolin Seeger <kseeger@samba.org>
Autobuild-Date: Sat Oct  8 22:27:07 CEST 2011 on sn-devel-104
(cherry picked from commit 851d6625d5e08ac9659a6d23d105f9e0c47f9692)

12 years agos3-docs: Fix bug #7908.
Karolin Seeger [Sat, 8 Oct 2011 18:53:18 +0000 (20:53 +0200)]
s3-docs: Fix bug #7908.

Fix typo.

Thanks to John Bradshaw for reporting!

Karolin
(cherry picked from commit 8aaa27754663a55f45facc18783eea458205d8a5)

12 years agoBug 7551: Return error of cli_push when 'put - /some/file' is used
Bram [Thu, 29 Sep 2011 09:28:03 +0000 (11:28 +0200)]
Bug 7551: Return error of cli_push when 'put - /some/file' is used

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Sep 29 23:47:02 CEST 2011 on sn-devel-104
(cherry picked from commit d883cc664cac81633a60e5b04f99f23a3577ae65)

12 years agoFix bug #8509 - Read-only handles on SAMR allow SAMR_DOMAIN_ACCESS_CREATE_USER.
Jeremy Allison [Fri, 7 Oct 2011 18:09:44 +0000 (11:09 -0700)]
Fix bug #8509 - Read-only handles on SAMR allow SAMR_DOMAIN_ACCESS_CREATE_USER.

Not a security issue as we also check inside _samr_CreateUser2.
Thanks to Andreas Schneider <asn@samba.org> for finding and testing this.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Oct  7 21:51:27 CEST 2011 on sn-devel-104
(cherry picked from commit c80ba57169cee2ec66e8afe3616956c17958a3ae)

12 years agoFix bug #8507 - smbd doesn't correctly honor the "force create mode" bits from a...
Jeremy Allison [Tue, 4 Oct 2011 21:46:00 +0000 (14:46 -0700)]
Fix bug #8507 - smbd doesn't correctly honor the "force create mode" bits from a cifsfs create.

Don't manipulate the new_dos_attributes bits until we know it's not a POSIX open.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Oct  5 01:19:17 CEST 2011 on sn-devel-104
(cherry picked from commit f93fd128eb623e324459806a34052bd40afe82e5)

12 years agoSecond part of fix for bug #8443 - Default user entry is set to minimal permissions...
Jeremy Allison [Thu, 8 Sep 2011 20:48:27 +0000 (13:48 -0700)]
Second part of fix for bug #8443 - Default user entry is set to minimal permissions on incoming ACL change with no user specified.

Be smarter about setting default permissions when a ACL_USER_OBJ isn't given. Use the principle of least surprises for the user.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Sep  9 00:26:08 CEST 2011 on sn-devel-104
(cherry picked from commit e30b8c72def13e2abc14858ea64eb849ea665b80)

12 years agoFirst part of fix for bug #8443 - Default user entry is set to minimal permissions...
Jeremy Allison [Thu, 8 Sep 2011 19:51:18 +0000 (12:51 -0700)]
First part of fix for bug #8443 - Default user entry is set to minimal permissions on incoming ACL change with no user specified.

create_default_mode() is not needed - it's taken care of by code
inside ensure_canon_entry_valid().
(cherry picked from commit 793bd527fdd0b188aba8f3b4bffd8fa8f69a9cd1)

12 years agoPart 3 of bugfix for bug #7509 - smb_acl_to_posix: ACL is invalid for set (Invalid...
Jeremy Allison [Fri, 2 Sep 2011 19:22:34 +0000 (12:22 -0700)]
Part 3 of bugfix for bug #7509 - smb_acl_to_posix: ACL is invalid for set (Invalid argument)

Don't call check_owning_objs() to convert ACL_USER->ACL_USER_OBJ and
AC_GROUP->ACL_GROUP_OBJ for default (directory) ACLs, we do this separately
inside ensure_canon_entry_valid().
(cherry picked from commit c528fc5cacaae7e0e83041eb98150052b436071e)

12 years agoPart 2 of bugfix for bug #7509 - smb_acl_to_posix: ACL is invalid for set (Invalid...
Jeremy Allison [Fri, 2 Sep 2011 18:58:56 +0000 (11:58 -0700)]
Part 2 of bugfix for bug #7509 - smb_acl_to_posix: ACL is invalid for set (Invalid argument)

Only map CREATOR_OWNER/CREATOR_GROUP to ACL_USER_OBJ/ACL_GROUP_OBJ in
a default(directory) ACL set.
(cherry picked from commit a5038ace24559bb02eec8262d3af5b5e78634d16)

12 years agoPart 1 of bugfix for bug #7509 - smb_acl_to_posix: ACL is invalid for set (Invalid...
Jeremy Allison [Fri, 2 Sep 2011 18:21:08 +0000 (11:21 -0700)]
Part 1 of bugfix for bug #7509 - smb_acl_to_posix: ACL is invalid for set (Invalid argument)

Remove the code I added for bug "6878 - Cannot change ACL's inherit flag". It is incorrect
and causes the POSIX ACL ACL_USER_OBJ duplication.
(cherry picked from commit 2b935b49f3d975759eb1cbcf2b11bf7c9d982804)

12 years agoFix bug #8458] - IE9 on Windows 7 cannot download files to samba 3.5.11 share
Jeremy Allison [Wed, 21 Sep 2011 20:33:38 +0000 (13:33 -0700)]
Fix bug #8458] - IE9 on Windows 7 cannot download files to samba 3.5.11 share

Handle the SECINFO_LABEL flag in the same was as Win2k3.
(cherry picked from commit 893497ee169ba5455cd70458a339e60544e171d7)

12 years agoFix bug #8493 - DFS breaks zip file extracting unless "follow symlinks = no" set
Jeremy Allison [Fri, 30 Sep 2011 20:35:59 +0000 (13:35 -0700)]
Fix bug #8493 - DFS breaks zip file extracting unless "follow symlinks = no" set

If a client sends a mangled name as part of a DFS path, use the
post-mangled name for the pathname walk, not the mangled name.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Oct  1 00:45:59 CEST 2011 on sn-devel-104

12 years agos3-docs: Fix typos.
Karolin Seeger [Mon, 6 Jun 2011 17:58:22 +0000 (19:58 +0200)]
s3-docs: Fix typos.

Thanks to Samba-JP oota <ribbon@samba.gr.jp> for reporting!

Karolin

Autobuild-User: Karolin Seeger <kseeger@samba.org>
Autobuild-Date: Fri Sep 30 23:12:35 CEST 2011 on sn-devel-104
(cherry picked from commit 5c569a97ab477a324a96aae7f58770ccbe2572de)

12 years agos3:smb2_server: SMB2_OP_CANCEL requests don't have to be signed
Stefan Metzmacher [Wed, 28 Sep 2011 06:28:08 +0000 (08:28 +0200)]
s3:smb2_server: SMB2_OP_CANCEL requests don't have to be signed

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Sep 29 02:58:41 CEST 2011 on sn-devel-104
(cherry picked from commit ea00f0e452f64868fdc78cf0dc8e9ce3af19fe32)

Fix bug #8503 (The SMB2 server should ignore signing on CANCEL requests).

12 years agos3-docs: Remove "experimental" label on VFS ACL modules
Karolin Seeger [Wed, 28 Sep 2011 18:17:42 +0000 (20:17 +0200)]
s3-docs: Remove "experimental" label on VFS ACL modules

in the documentation also (bug #8494).

Karolin

12 years agoThese modules are no longer experimental but production-ready (especially the acl_xat...
Jeremy Allison [Tue, 27 Sep 2011 17:23:08 +0000 (10:23 -0700)]
These modules are no longer experimental but production-ready (especially the acl_xattr code). Remove the "experimental" tag.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Sep 27 21:00:12 CEST 2011 on sn-devel-104
(cherry picked from commit fa2236c066890b687483408ed0d82a4bb1f95157)

Fix bug #8494 (Remove "experimental" label on VFS ACL modules).

12 years agoFix bug 8480 - acl_xattr can free an invalid pointer if no blob is loaded.
David Disseldorp [Fri, 23 Sep 2011 18:46:06 +0000 (11:46 -0700)]
Fix bug 8480 - acl_xattr can free an invalid pointer if no blob is loaded.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Sep 23 22:20:55 CEST 2011 on sn-devel-104
(cherry picked from commit ca8c25abebb8715176f68be9916217db9a8400dd)

12 years agos3:smbd: don't call smbd_terminate_connection in smb2_validate_message_id() (bug...
Stefan Metzmacher [Fri, 23 Sep 2011 04:08:51 +0000 (06:08 +0200)]
s3:smbd: don't call smbd_terminate_connection in smb2_validate_message_id() (bug #8476)

Only return false and the caller will terminate the connection.

metze
(cherry picked from commit 02d83d8fd4d21825110fd7da1ccb570a26e66ca6)

Part of a fix for bug #8476 (Samba asserts when SMB2 client breaks the crediting
rules.)

12 years agoFix bug #8476 - Samba asserts when SMB2 client breaks the crediting rules.
Jeremy Allison [Thu, 22 Sep 2011 16:06:48 +0000 (09:06 -0700)]
Fix bug #8476 - Samba asserts when SMB2 client breaks the crediting rules.

Just drop the connection, not SMB_ASSERT.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Sep 22 19:41:31 CEST 2011 on sn-devel-104
(cherry picked from commit d50fa9c21e1c3b6f7126c33e24966099c7567225)

12 years agos3-libnet: allow to use default krb5 ccache in libnet_Join/libnet_Unjoin.
Günther Deschner [Wed, 21 Sep 2011 15:28:58 +0000 (17:28 +0200)]
s3-libnet: allow to use default krb5 ccache in libnet_Join/libnet_Unjoin.

We force using a MEMORY ccache though in the wkssvc server.

Guenther

Part of a fix for bug #7465 (net ads join -k didn't work if KRB5CCNAME is not
set).

12 years agoRevert "s3-libnet: allow to use default krb5 ccache in libnet_Join/libnet_Unjoin."
Karolin Seeger [Mon, 26 Sep 2011 19:10:46 +0000 (21:10 +0200)]
Revert "s3-libnet: allow to use default krb5 ccache in libnet_Join/libnet_Unjoin."

This reverts commit 050123d9b6ae8fd69ed58380d8bdf210c38556fc.

This commit seems to break the build.

12 years agoFix bug #8473 - smb2_find uses a hard coded max reply size of 0x10000 instead of...
Jeremy Allison [Wed, 21 Sep 2011 18:30:06 +0000 (11:30 -0700)]
Fix bug #8473 - smb2_find uses a hard coded max reply size of 0x10000 instead of smb2_max_trans.

Use lp_smb2_max_trans() instead of 0x10000.
(cherry picked from commit e68ebe600d9349e16e83aeb8e6ae8647c117d098)

12 years agos3-netapi: allow to use default krb5 credential cache for libnetapi users.
Günther Deschner [Mon, 26 Sep 2011 14:25:12 +0000 (16:25 +0200)]
s3-netapi: allow to use default krb5 credential cache for libnetapi users.

Guenther

12 years agos3-libnet: allow to use default krb5 ccache in libnet_Join/libnet_Unjoin.
Günther Deschner [Wed, 21 Sep 2011 15:28:58 +0000 (17:28 +0200)]
s3-libnet: allow to use default krb5 ccache in libnet_Join/libnet_Unjoin.

We force using a MEMORY ccache though in the wkssvc server.

Guenther

12 years agos3-docs: document -k switch in net manpage.
Günther Deschner [Tue, 20 Sep 2011 12:13:36 +0000 (14:13 +0200)]
s3-docs: document -k switch in net manpage.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Tue Sep 20 15:47:00 CEST 2011 on sn-devel-104
(cherry picked from commit 8dda773bd7eea1d163282b1f3c5e90cbff8a1003)

12 years agoFix bug #8477 - Map to guest can return uninitialized blob of data.
Jeremy Allison [Thu, 22 Sep 2011 20:42:56 +0000 (13:42 -0700)]
Fix bug #8477 - Map to guest can return uninitialized blob of data.

Found by Codenomicon at SNIA SDC.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Sep 23 03:19:46 CEST 2011 on sn-devel-104
(cherry picked from commit f0f91d0117b2ccf778382e61a411b5e4f0ea2b14)

12 years agos3-registry: fix bug #8401 - registry/reg_format.c must include includes.h.
Günther Deschner [Thu, 25 Aug 2011 11:39:25 +0000 (13:39 +0200)]
s3-registry: fix bug #8401 - registry/reg_format.c must include includes.h.

Guenther
(cherry picked from commit e00a6c40bf13d9c1225022129e4cb1d617aa49bf)

12 years agoFix bug #8453 - smbclient segfaults when dialect option -m is used for legacy dialects
Jeremy Allison [Wed, 14 Sep 2011 18:55:16 +0000 (11:55 -0700)]
Fix bug #8453 - smbclient segfaults when dialect option -m is used for legacy dialects

Ensure we have valid pointers.

12 years agoWHATSNEW: Add changes since 3.6.0.
Karolin Seeger [Fri, 16 Sep 2011 19:37:10 +0000 (21:37 +0200)]
WHATSNEW: Add changes since 3.6.0.

To be completed.

Karolin

12 years agoFix bug #8229 - git patch attached against 3.6.0-rc2 to fix 'widelinks' regression...
Jeremy Allison [Wed, 14 Sep 2011 00:03:46 +0000 (17:03 -0700)]
Fix bug #8229 - git patch attached against 3.6.0-rc2 to fix 'widelinks' regression intro'd in 3.2

Add "allow insecure widelinks" to re-enable the ability (requested
by some sites) to have "widelinks = yes" and "unix extensions = yes".

Based on an original patch by Linda Walsh <samba@tlinx.org>

12 years agoFix bug 8429 - Compound SMB2 requests on an IPC connection can corrupt the reply...
Jeremy Allison [Wed, 31 Aug 2011 00:37:19 +0000 (17:37 -0700)]
Fix bug 8429 - Compound SMB2 requests on an IPC connection can corrupt the reply stream.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Aug 31 21:18:11 CEST 2011 on sn-devel-104
(cherry picked from commit 786fe9fab223723e4d2340f285592b2a44945d73)

12 years agos3-spoolss: Fix bug #8351 forms migration.
Andreas Schneider [Tue, 6 Sep 2011 12:09:47 +0000 (14:09 +0200)]
s3-spoolss: Fix bug #8351 forms migration.

Don't fail if the form already exists (or is builtin now).

Signed-off-by: Andreas Schneider <asn@samba.org>