Karolin Seeger [Fri, 17 May 2013 07:27:51 +0000 (09:27 +0200)]
VERSION: Disable git snapshots for the 4.0.6 release.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Stefan Metzmacher [Tue, 30 Apr 2013 06:39:00 +0000 (08:39 +0200)]
doc-xml/smbdotconf: fix server [min|max] protocol documentation (bug 9883)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
0ffd074690529a1833e29829b552b3cf6ebcd914)
Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Thu May 16 16:29:11 CEST 2013 on sn-devel-104
Björn Baumbach [Wed, 8 May 2013 08:27:26 +0000 (10:27 +0200)]
docs: smb.conf: fix max read/write/trans default values (bug #9871)
Commit
6d128aac119d948f0ecb0dcf6b400b4eb4027fe6 has increased the limit:
"s3:smb2_server increase defaults for read/write/trans sizes to 1MB"
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri May 10 23:14:50 CEST 2013 on sn-devel-104
(cherry picked from commit
3b3b5b02555572e48a751ea19ef9dd771a3862da)
Karolin Seeger [Wed, 15 May 2013 16:05:40 +0000 (18:05 +0200)]
WHATSNEW: Add release notes for Samba 4.0.6.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Wed May 15 19:53:19 CEST 2013 on sn-devel-104
Volker Lendecke [Tue, 7 May 2013 13:07:34 +0000 (15:07 +0200)]
Makefile: Fix bug 9868 -- Don't know how to make LIBNDR_PREG_OBJ.
Thanks to Lucs for finding the issue
Signed-off-by: Volker Lendecke <vl@samba.org>
Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Tue May 14 12:05:01 CEST 2013 on sn-devel-104
Richard Sharpe [Thu, 2 May 2013 21:36:05 +0000 (14:36 -0700)]
Tests processing an oplock break within a compound SMB2 request.
Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Richard Sharpe <sharpe@samba.org>
Autobuild-Date(master): Tue May 7 19:45:36 CEST 2013 on sn-devel-104
(cherry picked from commit
76bffc27a3f9ad6ac6b8ff8e21f801012835b73d)
The last 6 patches address bug #9722 - Samba does not properly handle Oplock
breaks in compound requests.
Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Wed May 8 23:11:55 CEST 2013 on sn-devel-104
Jeremy Allison [Thu, 2 May 2013 21:16:22 +0000 (14:16 -0700)]
Remove the compound_related_in_progress state from the smb2 global state.
And also remove the restriction that we can't read a new
request whilst we're in this state.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@samba.org>
(cherry picked from commit
cbff4885508e050bcb91c0faccb26941de5c1e1d)
Jeremy Allison [Thu, 2 May 2013 20:55:53 +0000 (13:55 -0700)]
The core of the fix to allow opens to go async inside a compound request.
This is only allowed for opens that cause an oplock break, otherwise it
is not allowed. See [MS-SMB2].pdf note <194> on Section 3.3.5.2.7.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
(cherry picked from commit
10cbcfd167a4d7b1a22f9b42b684a66e424cbede)
Jeremy Allison [Thu, 2 May 2013 20:08:16 +0000 (13:08 -0700)]
Move a variable into the area of code where it's used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
(cherry picked from commit
1102e73832f78ca5decc928d6c3649d4fe68eab7)
Jeremy Allison [Thu, 2 May 2013 19:34:54 +0000 (12:34 -0700)]
Ensure we don't try and cancel anything that is in a compound-related request.
Too hard to deal with splitting off the replies.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
(cherry picked from commit
a026fc6b699719309a27d4646d06fe1a45b0d158)
Jeremy Allison [Tue, 7 May 2013 19:07:16 +0000 (12:07 -0700)]
Only do the 1 second delay for sharing violations for SMB1, not SMB2.
Match Windows behavior.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Volker Lendecke [Tue, 7 May 2013 10:39:16 +0000 (12:39 +0200)]
winbind: Fix bug 9854 -- NULL pointer dereference
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue May 7 14:49:07 CEST 2013 on sn-devel-104
(cherry picked from commit
8c1283a89f746a108e8014b6fbc9a58a371950cf)
Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Wed May 8 11:53:49 CEST 2013 on sn-devel-104
Anand Avati [Mon, 29 Apr 2013 22:21:00 +0000 (15:21 -0700)]
check_parent_exists() can change errno. Ensure we preserve it across calls.
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Apr 30 11:00:11 CEST 2013 on sn-devel-104
(cherry picked from commit
7e807934e6550308efed814a20ce6d6dabbad557)
Fix bug #9833 - Function called in unix_convert() path can overwrite errno.
Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Tue May 7 10:32:43 CEST 2013 on sn-devel-104
Jeremy Allison [Fri, 26 Apr 2013 17:47:41 +0000 (10:47 -0700)]
Fix bug #9822 - Samba crashing during Win8 sync.
When refactoring the dptr desctructor in the
fix for bug:
9778 (Samba directory code uses dirfd() without vectoring through a VFS call)
I removed the code to NULL out the struct smb_Dir *
pointer inside the fsp struct by mistake.
Re-add the NULLing out of that pointer when
closing a directory pointer associated with
an open file.
Reporter confirms it fixes the crash.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Sat Apr 27 20:44:55 CEST 2013 on sn-devel-104
(cherry picked from commit
251767cde9a146d8122d76e257ab232c05ad452a)
Jeremy Allison [Wed, 10 Apr 2013 23:30:10 +0000 (16:30 -0700)]
Remove dependency on detection of HAVE_DIRFD for use of fdopendir().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Apr 12 16:21:10 CEST 2013 on sn-devel-104
(cherry picked from commit
7a4dd845958f1411daa8031ca242987001ab2f26)
Jeremy Allison [Wed, 10 Apr 2013 23:29:03 +0000 (16:29 -0700)]
Remove the "Ugly hack" that was the second use of dirfd().
The destructor does all the resource deallocation needed.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit
0fe894fb89f4867e266bb04670a58101311e0234)
Jeremy Allison [Wed, 10 Apr 2013 23:24:15 +0000 (16:24 -0700)]
In the struct smb_Dir destructor, use the fsp back pointer to release resources.
Removes one use of dirfd().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit
ea14c9443178da9ae6ccbe71e573156396f6f699)
Jeremy Allison [Wed, 10 Apr 2013 23:21:39 +0000 (16:21 -0700)]
Maintain a back-pointer to the fsp in struct smb_Dir when opening with FDOPENDIR.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit
e89ec641fc98ffd7f7193deb3728b0a284a093eb)
Volker Lendecke [Mon, 29 Apr 2013 16:40:08 +0000 (18:40 +0200)]
winbind4: Fix bug 9832 -- talloc use after free
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit
c672ef11b1ed663b6366f321d3628acf05b3d0fe)
Andrew Bartlett [Fri, 15 Mar 2013 02:00:55 +0000 (13:00 +1100)]
auth/ntlmssp: Avoid use-after-free of user_info after logon failure at log level 5
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
1dcd75df4941d7032a66d3fbb86ac76964444a3f)
Fix bug #9834 - segfault when loging in with wrong password from w2k8r2.
Andreas Schneider [Wed, 24 Apr 2013 13:27:21 +0000 (15:27 +0200)]
BUG 9817: Fix 'map untrusted to domain' with NTLMv2.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Apr 24 17:14:48 CEST 2013 on sn-devel-104
Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Tue Apr 30 11:16:19 CEST 2013 on sn-devel-104
David Disseldorp [Thu, 25 Apr 2013 14:41:17 +0000 (16:41 +0200)]
bug 9830: fix panic in nt_printer_publish_ads
Check for ads_find_machine_acct() errors, to ensure a NULL LDAPMessage
pointer doesn't get passed to ldap_get_dn().
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-By: Günther Deschner <gd@samba.org>
Stefan Metzmacher [Mon, 12 Nov 2012 09:16:50 +0000 (10:16 +0100)]
s3:librpc: add support for PFC_FLAG_OBJECT_UUID when parsing packets (bug #9382)
Now the logic matches the one in dcerpc_read_ncacn_packet_done().
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: David Disseldorp <ddiss@suse.de>
Jeremy Allison [Mon, 8 Apr 2013 17:49:03 +0000 (10:49 -0700)]
Ensure the RECVFILE path in vfs_pwrite_data() operates on a blocking socket.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Apr 20 01:04:05 CEST 2013 on sn-devel-104
(cherry picked from commit
95f7fc83b251efefcc2a603b936b55e2f0308a72)
The last 13 patches address bug #9412 - SMB2 server doesn't support recvfile.
Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Thu Apr 25 14:39:27 CEST 2013 on sn-devel-104
Jeremy Allison [Mon, 8 Apr 2013 17:32:10 +0000 (10:32 -0700)]
Ensure the RECVFILE path in vfs_write_data() operates on a blocking socket.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
(cherry picked from commit
1ed710c2ffc91d8b33b87e572a6075e0126b5826)
Jeremy Allison [Mon, 8 Apr 2013 17:16:48 +0000 (10:16 -0700)]
Ensure drain_socket() operates on a blocking socket.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
(cherry picked from commit
1b46db7b24a4f064706c2c7e712452135a3fed34)
Jeremy Allison [Mon, 1 Apr 2013 18:16:01 +0000 (11:16 -0700)]
Add the internals of is_smb2_recvfile_write.
This turns on the real receivefile detection, and completes
the receivefile code path changes.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
(cherry picked from commit
1a7cec37e725c9f29fd71788e15623d904b41c8a)
Jeremy Allison [Mon, 1 Apr 2013 20:24:07 +0000 (13:24 -0700)]
The guts of the receivefile code changes.
If an incoming PDU might qualify, only read
SMBD_SMB2_SHORT_RECEIVEFILE_WRITE_LEN = (SMB2_HEADER + SMB2_WRITE_BODY_LEN)
bytes rather than the whole PDU.
Next time we're called, use is_smb2_recvfile_write() to decide if
this is an SMB2_WRITE that fit the receivefile criteria, otherwise
just read the rest of the PDU.
If we did do a short receivefile read, set up the smb2_req->smb1req->unread_bytes
value to show what bytes remain in the TCP buffers.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
(cherry picked from commit
53b87f2fbabe3a2dcb5df6f6c494ef332bea81e7)
Jeremy Allison [Mon, 1 Apr 2013 20:19:01 +0000 (13:19 -0700)]
Add stub static function that will turn on/off receivefile code path.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
(cherry picked from commit
fdcaf0fa360b9590114605d24af545b1d42b9fd5)
Jeremy Allison [Mon, 1 Apr 2013 20:17:09 +0000 (13:17 -0700)]
Add extra fields into struct smbd_smb2_request_read_state to support receivefile.
Initialize min_recv_size with the size that will trigger the
receivefile write path.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
(cherry picked from commit
4b91097002d73ae5dd2d4ac225f8e9eecca11e49)
Jeremy Allison [Mon, 1 Apr 2013 20:14:13 +0000 (13:14 -0700)]
Add macro SMBD_SMB2_SHORT_RECEIVEFILE_WRITE_LEN.
This is the 'short' length we'll read in the SMB2_WRITE receivefile
code path.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
(cherry picked from commit
36d4b9d208c0025f054ad8ae4062ca3c81e345d5)
Jeremy Allison [Mon, 1 Apr 2013 20:12:55 +0000 (13:12 -0700)]
Add utility function get_min_receive_file_size().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
(cherry picked from commit
61da7f00b3f3daebb82e6a5d987883e0897dc4e9)
Jeremy Allison [Tue, 19 Mar 2013 19:36:52 +0000 (12:36 -0700)]
Allow smbd_smb2_request_error_ex() to cope with unread bytes on error.
Drain the socket if a RECVFILE write failed.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
(cherry picked from commit
63739440f128229a6a99d0653562d3735ae909fb)
Jeremy Allison [Tue, 19 Mar 2013 19:24:17 +0000 (12:24 -0700)]
Add function smbd_smb2_unread_bytes().
Returns number of bytes left to read for recvfile. Will be
used in SMB_2_WRITE_FILE code path.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
(cherry picked from commit
a36d7633bd3608b71f610fc9df2ad9c66bfdd9c6)
Jeremy Allison [Tue, 19 Mar 2013 19:16:32 +0000 (12:16 -0700)]
If we already have an smb1req attached to the struct smbd_smb2_request, don't recreate it.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
(cherry picked from commit
ec9fc986da8279f15338b7682c629bfdfc36d016)
Jeremy Allison [Mon, 18 Mar 2013 19:00:25 +0000 (12:00 -0700)]
Ensure we don't do an SMB2 aio write if RECVFILE is active.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
(cherry picked from commit
9791c1a24822d8b46bf7dd231b615d281b58540b)
Volker Lendecke [Fri, 19 Apr 2013 10:36:08 +0000 (12:36 +0200)]
smbd: Fix signing when the async echo handler kicks in
This was introduced as a copy&paste error in
5e0258fc932c
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
(cherry picked from commit
5aa9e552ec70ffbd48495e0d7c28517e726487bf)
Fix bug #9824 - SMB signing and the async echo responder don't work together.
Andrew Bartlett [Mon, 8 Apr 2013 05:57:45 +0000 (15:57 +1000)]
build: Replace #!/usr/bin/env python with passed in PYTHON=
This means that if we were forced to use a specific python for the build, we
will put that binary into the top of samba-tool, so it continues to work
after the install.
Andrew Bartlett
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
58e3c5323e343dcab1c528c6b6a44925b76cb297)
The last 2 patches address bug #9785 - Fixes to use specified python for runtime
installation of Samba.
Andrew Bartlett [Sun, 7 Apr 2013 22:33:55 +0000 (08:33 +1000)]
build: Remove extra space in shebang
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
45a596fbe9ed2b198956d58784999df780f6dd65)
Volker Lendecke [Fri, 19 Apr 2013 14:17:13 +0000 (16:17 +0200)]
docs: Fix bug 9809 -- missing entry in specfile
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Karolin Seeger <kseeger@samba.org>
Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Mon Apr 22 11:35:52 CEST 2013 on sn-devel-104
(cherry picked from commit
5512a43a93833d3d6f1721d69c894db0e2c77ef8)
Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Mon Apr 22 13:39:14 CEST 2013 on sn-devel-104
Jeremy Allison [Wed, 17 Apr 2013 21:42:20 +0000 (14:42 -0700)]
Fix bug in old create temp SMB request. Only use VFS functions.
Signed-off-by: Jeremy Allison <jra@samba.org>
Fix bug #9811 - Old DOS SMB CTEMP request uses a non-VFS function to access the
filesystem.
Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Mon Apr 22 11:28:04 CEST 2013 on sn-devel-104
David Disseldorp [Wed, 17 Apr 2013 17:39:12 +0000 (10:39 -0700)]
Bug 9807 - wbinfo: fix segfault in wbinfo_pam_logon
wbinfo_pam_logon() incorrectly assumes that wbcLogonUser() always
returns an allocated wbcAuthErrorInfo struct on failure.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Apr 17 21:29:29 CEST 2013 on sn-devel-104
Stefan Metzmacher [Fri, 22 Mar 2013 08:37:09 +0000 (09:37 +0100)]
wafsamba: display the default value in help for SAMBA3_ADD_OPTION
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit
81cc940c994424d351ac282383df4d1a57d6b614)
Fix bug #9804 - wafsamba: display the default value in help for
SAMBA3_ADD_OPTION.
Stefan Metzmacher [Fri, 22 Mar 2013 08:39:42 +0000 (09:39 +0100)]
s3:wscript: change --with-dmapi to default=auto to match the autoconf build
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Apr 3 11:45:12 CEST 2013 on sn-devel-104
(cherry picked from commit
79038397aa8786c92401312973185c7b14e8fa66)
Fix bug #9803 - change --with-dmapi to default=auto to match the autoconf build.
Jeremy Allison [Tue, 9 Apr 2013 23:56:24 +0000 (16:56 -0700)]
Ensure we test the dirsort module in make test.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Apr 11 21:17:21 CEST 2013 on sn-devel-104
The last 10 patches address bug #9777 - vfs_dirsort uses non-stackable calls,
dirfd(), malloc instead of talloc and doesn't cope with directories being
modified whilst reading.
Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Wed Apr 17 10:43:37 CEST 2013 on sn-devel-104
Jeremy Allison [Tue, 9 Apr 2013 18:02:58 +0000 (11:02 -0700)]
Remove unneeded initializations (we already talloc_zero).
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Jeremy Allison [Tue, 9 Apr 2013 17:50:55 +0000 (10:50 -0700)]
Remove the use of dirfd inside the vfs_dirsort.c.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Jeremy Allison [Tue, 9 Apr 2013 17:43:53 +0000 (10:43 -0700)]
Convert mtime from a time_t to a struct timespec.
In preparation for removing the dirfd and using fsp_stat()
and VFS_STAT functions.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Jeremy Allison [Tue, 9 Apr 2013 17:38:24 +0000 (10:38 -0700)]
Check SMB_VFS_NEXT_OPENDIR return in dirsort_opendir().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Jeremy Allison [Tue, 9 Apr 2013 17:29:47 +0000 (10:29 -0700)]
Clean error paths in opendir and fd_opendir by only setting handle data on success.
Pass extra struct dirsort_privates * to open_and_sort_dir() function
to avoid it having to re-read the handle data.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Jeremy Allison [Mon, 8 Apr 2013 23:40:35 +0000 (16:40 -0700)]
Protect open_and_sort_dir() from the directory changing size.
Otherwise there could be an error between initial count, allocation
and re-read.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Jeremy Allison [Mon, 8 Apr 2013 23:38:03 +0000 (16:38 -0700)]
Use an index i rather than re-using a state variable.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Jeremy Allison [Mon, 8 Apr 2013 23:31:53 +0000 (16:31 -0700)]
Protect against early error in SMB_VFS_NEXT_READDIR.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Jeremy Allison [Mon, 8 Apr 2013 22:11:28 +0000 (15:11 -0700)]
Change source3/modules/vfs_dirsort.c from MALLOC -> TALLOC.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Ralph Wuerthner [Thu, 4 Apr 2013 11:29:01 +0000 (13:29 +0200)]
s3:smbd: do not access data behind req->buf+req->buflen in srvstr_pull_req_talloc()
The last 3 patches address bug #9782 - Panic when running 'smbtorture smb.base'.
Ralph Wuerthner [Thu, 4 Apr 2013 11:24:36 +0000 (13:24 +0200)]
s3:smbd: convert srvstr_pull_req_talloc() into a function
Ralph Wuerthner [Thu, 4 Apr 2013 10:59:36 +0000 (12:59 +0200)]
s3:smbd: do not access data behind req->buf+req->buflen in srvstr_get_path_req_wcard()
Andreas Schneider [Thu, 4 Apr 2013 10:18:25 +0000 (12:18 +0200)]
BUG 9766: Cache name_to_sid/sid_to_name correctly.
If there is no domain_name specified we still need to set to for
caching else we will not find the entry later if we lookup the entry
with the domain_name.
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Tue Apr 9 16:32:44 CEST 2013 on sn-devel-104
Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Fri Apr 12 11:44:46 CEST 2013 on sn-devel-104
Andreas Schneider [Fri, 5 Apr 2013 12:07:37 +0000 (14:07 +0200)]
BUG 9139: Fix the username map optimization.
If we successfully map a user. We call
set_last_from_to(user_in, unixname);
in the while loop reading the map file. After a successfull map we don't
stop and continue the loop to check all other mappings in the username
mapfile. But when we hit the end of the file and leave the loop we call:
set_last_from_to(user_in, user_in);
This overwrites the successful mapping, and the next time we call
map_username() we skip the username and no mapping is done.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Alexander Bokovoy [Thu, 11 Apr 2013 07:45:12 +0000 (09:45 +0200)]
[PATCH] getpass: Don't fail if stdin is not a tty
We don't need to manipulate the tty state (such as turning off
echo) when prompting for passwords if we're not reading from a tty.
Backport based on a patch provided by Stef Walter <stefw@gnome.org>.
Fix bug #9767 - "net ads join" fails when called via stdin.
Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Thu Apr 11 11:35:07 CEST 2013 on sn-devel-104
Andreas Schneider [Wed, 3 Apr 2013 13:46:00 +0000 (15:46 +0200)]
BUG 9699: Fix adding case sensitive spn.
We should be able to define the case of the spn cause it is important
for some services like nfs. 'net ads keytab add "nfs"' should not
result in an uppercase spn.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Apr 3 23:57:32 CEST 2013 on sn-devel-104
Volker Lendecke [Tue, 9 Apr 2013 19:18:34 +0000 (21:18 +0200)]
vfs_fake_perms: Fix bug 9775, segfault for "artificial" conn_structs
Signed-off-by: Volker Lendecke <vl@samba.org>
The last 3 patches address bug #9775, segfault for "artificial" conn_structs.
Volker Lendecke [Tue, 9 Apr 2013 19:07:23 +0000 (21:07 +0200)]
vfs_fake_perms: Slightly streamline code
Don't initialize a variable directly set
Signed-off-by: Volker Lendecke <vl@samba.org>
Volker Lendecke [Tue, 9 Apr 2013 19:07:23 +0000 (21:07 +0200)]
vfs_fake_perms: Slightly streamline code
Do an early error return
Signed-off-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Fri, 22 Mar 2013 08:30:05 +0000 (09:30 +0100)]
s3:modules: fix the build of vfs_notify_fam (bug #9545)
This adds the --with-fam option and configure checks.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit
0d75c902254c6e27964c631459ef8e9b379b77fc)
Karolin Seeger [Tue, 9 Apr 2013 08:12:56 +0000 (10:12 +0200)]
VERSION: Bump version number up to 4.0.6
and re-enable git snapshots.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Karolin Seeger [Tue, 9 Apr 2013 08:11:23 +0000 (10:11 +0200)]
VERSION: Disable git snapshots for the 4.0.5 release.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Karolin Seeger [Tue, 9 Apr 2013 08:08:57 +0000 (10:08 +0200)]
WHATSNEW: Add major enhancements.
And update some of the changes since 4.0.4.
Karolin
Karolin Seeger [Mon, 8 Apr 2013 10:58:53 +0000 (12:58 +0200)]
WHATSNEW: Add changes since 4.0.4.
Karolin
Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Mon Apr 8 14:47:58 CEST 2013 on sn-devel-104
Jeremy Allison [Thu, 28 Mar 2013 15:55:11 +0000 (08:55 -0700)]
Ensure EA value is allocated on the right context.
Ensure we free on error condition (tidyup, not a leak).
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@suse.de>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Tue Apr 2 21:54:33 CEST 2013 on sn-devel-104
The last 9 patches address bug #9130 - Certain xattrs cause Windows error
0x800700FF.
Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Mon Apr 8 10:34:37 CEST 2013 on sn-devel-104
Jeremy Allison [Wed, 27 Mar 2013 18:54:34 +0000 (11:54 -0700)]
Final fix for bug #9130 - Certain xattrs cause Windows error 0x800700FF
The spec lies when it says that NextEntryOffset is the only value
considered when finding the next EA. We were adding 4 more extra
pad bytes than needed (i.e. if the next entry already was on a 4
byte boundary, then we were adding 4 additional pad bytes).
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@suse.de>
Jeremy Allison [Tue, 26 Mar 2013 23:46:51 +0000 (16:46 -0700)]
Ensure we don't return uninitialized memory in the pad bytes.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@suse.de>
Jeremy Allison [Tue, 26 Mar 2013 20:26:49 +0000 (13:26 -0700)]
Add a test to show that zero-length EA's are never returned over SMB2.
Zero length EA's only delete an EA, never store. Proves we should
never return zero-length EA's even if they have been set on the
POSIX side.
ntvfs server doesn't implement the FULL_EA_INFORMATION setinfo
call, so add to selftest/knownfail.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@suse.de>
Jeremy Allison [Tue, 26 Mar 2013 23:38:00 +0000 (16:38 -0700)]
Fix bug #9130 - Certain xattrs cause Windows error 0x800700FF
Ensure ntvfs server never returns zero length EA's.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@suse.de>
Jeremy Allison [Tue, 26 Mar 2013 23:37:22 +0000 (16:37 -0700)]
Fix bug #9130 - Certain xattrs cause Windows error 0x800700FF
Ensure we never return any zero-length EA's.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@suse.de>
Jeremy Allison [Tue, 26 Mar 2013 22:54:31 +0000 (15:54 -0700)]
Change estimate_ea_size() to correctly estimate the EA size over SMB2.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@suse.de>
Jeremy Allison [Tue, 26 Mar 2013 22:46:06 +0000 (15:46 -0700)]
Modify fill_ea_chained_buffer() to be able to do size calculation only, no marshalling.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@suse.de>
Jeremy Allison [Fri, 29 Mar 2013 17:07:20 +0000 (10:07 -0700)]
Ensure we can never return an uninitialized EA list.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@suse.de>
Andreas Schneider [Tue, 2 Apr 2013 11:08:19 +0000 (13:08 +0200)]
BUG 9758: Don't leak the epm_Map policy handle.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Alexander Bokovoy <ab@samba.org>
Autobuild-Date(master): Tue Apr 2 17:16:56 CEST 2013 on sn-devel-104
Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Sun Apr 7 23:39:23 CEST 2013 on sn-devel-104
Andreas Schneider [Tue, 2 Apr 2013 11:09:13 +0000 (13:09 +0200)]
epm: Increase debug level for already registered endpoints.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Jeremy Allison [Mon, 25 Mar 2013 16:54:50 +0000 (09:54 -0700)]
Optimization suggested by Volker. Don't do a stat system call on normal read path.
Only do it if we need it in the sendfile() path.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Mar 28 17:51:22 CET 2013 on sn-devel-104
Fix bug #9748 - Remove unneeded fstat system call from hot read path.
Volker Lendecke [Thu, 21 Mar 2013 21:00:06 +0000 (22:00 +0100)]
smbd: Tune "dir" a bit.
for i in $(seq 1 20000) ; do echo dir ; done | smbclient //127.0.0.1/tmp -U%
without and with this patch:
$ time bin/smbd -d0 -i
smbd version 4.1.0pre1-GIT-
1f139ae started.
Copyright Andrew Tridgell and the Samba Team 1992-2013
Beendet
real 0m28.342s
user 0m10.249s
sys 0m10.513s
$ time bin/smbd -d0 -i
smbd version 4.1.0pre1-GIT-
1f139ae started.
Copyright Andrew Tridgell and the Samba Team 1992-2013
Beendet
real 0m27.348s
user 0m9.089s
sys 0m10.853s
The "real" timestamp is irrelevant, this also contains the time between
starting smbd and the smbclient job. It's the "user" time. The result that this
patch improves the time spent in user space by 10% is consistent.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Fix bug #9736 - Change to smbd/dir.c code gives significant performance
increases on large directory listings.
Andreas Schneider [Fri, 22 Mar 2013 13:15:57 +0000 (14:15 +0100)]
BUG 9735: Fix winbind seperator in upn to username conversion.
Reviewed-by: Günther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Jeremy Allison [Thu, 21 Mar 2013 20:47:07 +0000 (13:47 -0700)]
Fix bug #9733 - smbcontrol close-share is not working.
As part of forcibly disconnecting a client from a share,
smbd must atomically call reload_services() to ensure that
the entry in the ServicePtrs[] array corresponding to
that share is removed if the share was removed from
the smb.conf or registry entries.
Otherwise the ServicePtrs[] array entry for the share
remains active and the client races to auto-reconnect to
the share before a second message to reload the smb.conf
file can be sent.
This has to be done as part of the close-share message
processing, as removing the share from the smb.conf file
first, then telling the smbd to reload followed by the
forcible disconnect message doesn't work as in this
sequence of events when the reload message is received
the client is still connected to the share, so the
ServicePtrs[] entry is still left active.
The forcible-disconnect + service reload has to be done
together as an atomic operation in order for this to work.
Signed-off-by: Jeremy Allison <jra@samba.org>
Jeremy Allison [Tue, 2 Apr 2013 03:11:26 +0000 (20:11 -0700)]
Fix bad SMB2 opcode reading in server.
SMB2 opcodes are 16-bit values. We should *never*
be reading them with IVAL(inhdr, SMB2_HDR_OPCODE),
it should always be SVAL(inhdr, SMB2_HDR_OPCODE).
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Autobuild-User(master): Richard Sharpe <sharpe@samba.org>
Autobuild-Date(master): Tue Apr 2 07:28:48 CEST 2013 on sn-devel-104
Fix bug #9760 - Incorrect parsing of SMB2 command codes.
Andrew Bartlett [Fri, 22 Mar 2013 10:58:25 +0000 (21:58 +1100)]
scripting: Fill the ProvisionNames hash with strings, not ldb.MessageElement or Dn
This avoids the need to fix it up again in samba_upgradedns.
Andrew Bartlett
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Mar 25 13:25:30 CET 2013 on sn-devel-104
(cherry picked from commit
30adf0cdbae6d9aaf2e72513d9c33267248f20c0)
The last 12 patches address bug #9740 - Add samba-tool dbcheck
--reset-well-known-acls.
Andrew Bartlett [Fri, 22 Mar 2013 10:36:49 +0000 (21:36 +1100)]
samba-tool ldapcmp: Remove the GUID -> name mappings
These mappings are very convenient, however because they are not
one-to-one, they lead to differences being reported when none exist,
dependent only on the order the schema searches return results in.
Sadly the time saved by the names is offset by the time wasted chasing
the 'differences' that don't exist.
This in turn fixes some tests that were previously knownfail
Andrew Bartlett
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit
5d42260eecfd4f26cc82637ce1bc989083c9eb9d)
Andrew Bartlett [Fri, 22 Mar 2013 06:12:43 +0000 (17:12 +1100)]
selftest: Add tests for samba-tool dbcheck --reset-well-known-acls
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit
1589e46d11f29551f3598876b62e29fcbad06580)
Andrew Bartlett [Fri, 22 Mar 2013 11:16:03 +0000 (22:16 +1100)]
scripting: Modify samba.descriptor.get_diff_sds() to cope with a missing reference owner
This allows the reference SD not to have an owner specified, and still
have the comparison with a database SD that does have an owner pass.
(And the same for owning group).
Andrew Bartlett
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit
874a93bc1c437543474a6c574b0065b7b953ad38)
Andrew Bartlett [Mon, 11 Feb 2013 03:49:01 +0000 (14:49 +1100)]
samba-tool dbcheck: Allow dbcheck to correct an nTSecurityDescriptor without an owner or group
This is done by making a modification to the SD, which triggers it to be
filled in if we have the correct session_info established on the DB.
However, we normally want dbcheck running as system, so we wrap
the session_info set around this operation only.
Andrew Bartlett
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit
4789a3072a4241841c096115dbdb0c3259968e68)
Andrew Bartlett [Mon, 11 Feb 2013 03:49:01 +0000 (14:49 +1100)]
samba-tool dbcheck: Add --reset-well-known-acls
This will allow an upgrade from Samba 4.0.0 without needing to run
samba_upgradeprovision, which for now is not the preferred upgrade
tool.
Andrew Bartlett
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit
810f8b48d925ea15f3439c4b228741d8fddaccd8)
Andrew Bartlett [Fri, 22 Mar 2013 05:19:27 +0000 (16:19 +1100)]
scripting: Move get_diff_sds from samba.upgradehelpers to samba.descriptor
This helps avoid a dependency loop when we use get_diff_sds in dbcheck.
Andrew Bartlett
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit
9040e2684161ce75738e9da0fee191aa34858607)
Andrew Bartlett [Fri, 22 Mar 2013 00:15:38 +0000 (11:15 +1100)]
scripting: Modify samba.descriptor.get_wellknown_sds() use samdb calls only
We need this routine not to use the names context as this is tied to
provision, and we end up in a circular dependency if we use that in
dbcheck.
Andrew Bartlett
(cherry picked from commit
a113ddbf881c5905bbf7072638c7ba8843eeb85e)
Andrew Bartlett [Thu, 21 Mar 2013 02:34:26 +0000 (13:34 +1100)]
scripting: Move samba.provision.descriptor to samba.descriptor
This will allow dbcheck to import it, without a cirucular dependency via
samba.provision importing dbcheck.
Andrew Bartlett
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit
352aff8ed7e06c14b7a00a56b31c79ffddf71dd4)
Andrew Bartlett [Thu, 21 Mar 2013 01:49:46 +0000 (12:49 +1100)]
scripting: Make samba.provision.descriptor.get_wellknown_sds() return ldb.Dn objects
As we look to use this function in more places, it does not make sense to constantly create
Dn objects from the strings.
Andrew Bartlett
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit
e81a97dd6fc2da701f2cbf42513311a7a44adad3)
Andrew Bartlett [Wed, 20 Mar 2013 03:50:55 +0000 (14:50 +1100)]
scripting: Fix documentation comment on upgradehelpers.py:get_clean_sd
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit
6df17fe799968ca7e2f92ce9e294e3962ac8cbaf)
Andrew Bartlett [Wed, 20 Mar 2013 03:12:26 +0000 (14:12 +1100)]
scripting: Move the list of well known SDs to samba.provision.descriptor
This will allow us to call this from dbcheck.
Andrew Bartlett
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit
3da89b01faebba669434b07db344c203a4521ca2)
Andrew Bartlett [Sun, 17 Feb 2013 11:45:59 +0000 (22:45 +1100)]
selftest: Remove output directories to save disk space
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit
b9b637569960ae7eef5ee12436624af34a718a9a)
The last 32 patches address bug #9725 - upgradeprovision and samba-tool dbcheck
patches for 4.0.NEXT.
Andrew Bartlett [Mon, 18 Feb 2013 04:56:18 +0000 (15:56 +1100)]
samba_upgradeprovision: Do not reset every DN when changing an SD
SD propogation is handled by an LDB module, we do not need to touch each
and every DN to make it happen.
Now that we do not need to put this via a hash, the dnToRecalculate
list is changed to be a list of Dn objects, not strings so that:
if dn in listWellknown
is handled using a schema comparison (avoiding different case forms
tripping it up).
Andrew Bartlett
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit
d5d88bd82b1cb51da09cf3b3dec40f180f5ed29f)
Andrew Bartlett [Mon, 18 Feb 2013 04:15:52 +0000 (15:15 +1100)]
samba_upgradeprovision: do not maintain dnNotToRecalculate as a list
We only need a boolean indication, not the actual values.
Andrew Bartlett
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit
0f247dce00fd26230cdb0566ce4f51a2ea8cfc2b)