1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

1074 Commits

Author SHA1 Message Date
Volker Lendecke
73955a2d92 s3: Explicitly pass sconn to reply_readbraw_error 2010-06-12 15:42:52 +02:00
Volker Lendecke
d5f20aea73 s3: Pass sconn explicitly to reply_special 2010-06-12 15:42:52 +02:00
Volker Lendecke
7223799b6e s3: Remove smbd_server_conn from smbd_do_locking 2010-06-12 15:42:52 +02:00
Volker Lendecke
5005ad2e78 s3: Remove smbd_server_conn from reply_rmdir 2010-06-12 15:42:52 +02:00
Volker Lendecke
0d6f3d64fa s3: Remove smbd_server_conn from reply_writebraw 2010-06-12 15:42:52 +02:00
Volker Lendecke
8f8aac9c2f s3: Remove smbd_server_conn from reply_read_and_X 2010-06-12 15:42:52 +02:00
Volker Lendecke
e16476ac48 s3: Remove smbd_server_conn from send_file_readX 2010-06-12 15:42:52 +02:00
Volker Lendecke
993738d368 s3: Remove smbd_server_conn from reply_read 2010-06-12 15:42:52 +02:00
Volker Lendecke
96acccf261 s3: Remove smbd_server_conn from reply_lockread 2010-06-12 15:42:51 +02:00
Volker Lendecke
fd1891829a s3: Remove smbd_server_conn from reply_readbraw 2010-06-12 15:42:51 +02:00
Volker Lendecke
2826471123 s3: Remove smbd_server_conn from reply_send_file_readbraw 2010-06-12 15:42:51 +02:00
Volker Lendecke
f26b738412 s3: Remove smbd_server_conn from reply_ulogoffX 2010-06-12 15:42:51 +02:00
Volker Lendecke
557aebc327 s3: Remove smbd_server_conn from reply_fclose 2010-06-12 15:42:51 +02:00
Volker Lendecke
96854ec994 s3: Remove smbd_server_conn from reply_search 2010-06-12 15:42:51 +02:00
Volker Lendecke
bf2f2f468c s3: Remove smbd_server_conn from reply_tcon_and_X 2010-06-12 15:42:51 +02:00
Volker Lendecke
0275502b9c s3: Remove smbd_server_conn from reply_tcon 2010-06-12 15:42:51 +02:00
Jeremy Allison
d28fa8faab Rename "allow_smb2" -> "using_smb2" and make the usage clearer. 2010-06-09 19:12:02 -07:00
Günther Deschner
b6a2cea74d s3-security: use shared "Standard access rights.".
Guenther
2010-06-03 11:00:26 +02:00
Volker Lendecke
3e0b2c8c9a s3: Fix some debug messages 2010-05-31 12:04:28 +02:00
Jeremy Allison
7e96db4f50 After talking with Microsoft engineers, the "lock spin time" is
no longer used in SMB2.

Jeremy.
2010-05-19 20:09:08 -07:00
Jeremy Allison
adf4833792 This patch looks bigger than it is. It does 2 things. 1). Renames smbpid -> smblctx in our locking code. 2). Widens smblctx to 64-bits internally. Preparing to use the SMB2 handle as the locking context.
Jeremy.
2010-05-07 06:20:50 -07:00
Simo Sorce
dffeb12f3d smbd: move printfile_offset() within write_file() 2010-04-30 11:52:39 -07:00
Jeremy Allison
e90444319c Carefully label SMB1-specific locking calls.
Jeremy.
2010-04-29 17:08:12 -07:00
Simo Sorce
168b86c384 s3-smbd: group print relate data in own structure 2010-04-23 14:26:33 -07:00
Jeremy Allison
c75184b8a1 Fix issue with aio where r/w lock wasn't kept across aio read operations.
Change schedule_aio_read_and_X/schedule_aio_write_and_X to
return NTSTATUS. Move the grant and release of the lock into
the aio code.

Jeremy
2010-04-05 14:16:21 -07:00
Jeremy Allison
6800fdbb81 Make smbd_lock_socket/smbd_unlock_socket recursive with a ref_count.
As these always call exit_server, make that part of the function.
Use _internal functions for the echo client.

Metze please check !

Jeremy.
2010-03-31 17:40:30 -07:00
Jeremy Allison
eb60833a45 Fix bug 7310 - DOS attribute inconsistency with MS Office
On rename we need to set the archive bit on the renamed file.

Jeremy
2010-03-31 10:10:52 -07:00
Jeremy Allison
32c8feab5d Fix for bug #7233 - print fails with jobs >4GB from Win7 clients.
Contains for by Sebastian Kloska <oncaphillis@snafu.de>. Submitter
confirms this fixes the problem.

Jeremy.
2010-03-30 15:27:26 -07:00
Jeremy Allison
1fc5e7a3d6 Revert the part of bug fix #7233 - print fails with jobs >4GB from Win7 clients.
Submitter reports print file corruption after 2GB when SMBwrite etc.
always write at EOF. Still working on the fix.

Jeremy.
2010-03-26 09:32:40 -07:00
Jeremy Allison
66b7fcc8ef Fix bug #7233 - print fails with jobs >4GB from Win7 clients.
Ensure we always write at end-of-file for older write calls.

Jeremy.
2010-03-24 12:47:01 -07:00
Stefan Metzmacher
d663b4c6c0 s3:smbd: disallow readbraw and writebraw if the echo handler is active
metze
2010-03-22 17:15:13 +01:00
Stefan Metzmacher
fbf112bd16 s3:smbd: disable sendfile if the echo handler is active
metze
2010-03-22 17:15:13 +01:00
Stefan Metzmacher
1e7086e5ce s3:smbd: let reply_readbraw_error use the locked socket
metze
2010-03-22 17:15:11 +01:00
Jeremy Allison
367ddc3d1b 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.
2010-03-10 14:08:30 -08:00
Jeremy Allison
c61c9c3a4c Fix for bug #7189 - Open txt files with notepad on samba shares creates problem.
Ensure we don't use any of the create_options for Samba private
use. Add a new parameter to the VFS_CREATE call (private_flags)
which is only used internally. Renumber NTCREATEX_OPTIONS_PRIVATE_DENY_DOS
and NTCREATEX_OPTIONS_PRIVATE_DENY_FCB to match the S4 code).
Rev. the VFS interface to version 28.

Jeremy.
2010-03-05 15:13:37 -08:00
Steven Danneman
cb0ea27369 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.
2010-02-12 21:29:00 -08:00
Jeremy Allison
ce8dcbe91b Fix bug #7033 - SMBrmdir call always returns true, even on failure to delete a directory.
There is a codepath missing to propagate back error returns from the rmdir
POSIX call inside close_directory when delete on close is set. This means doing
an rmdir on a Windows command line will always report success, even when the
directory was not deleted. This fix adds that codepath back into Samba.

Jeremy.
2010-01-12 16:50:40 -08:00
Jeremy Allison
74deee3cc9 Rename reply_doserror() -> reply_force_doserror().
Rewrite all calls to reply_nterror(NT_STATUS_DOS()) to
reply_force_doserror() and update the comment in smbd/error.c

Jeremy.
2009-12-21 11:16:38 -08:00
Jeremy Allison
642101ac23 Remove all calls to reply_doserror - turn them into
correct reply_nterror calls. Next rename reply_doserror ->
reply_force_doserror and plumb in when NT_STATUS_DOS is
used.
Jeremy.
2009-12-21 11:05:25 -08:00
Jeremy Allison
0dd8c8a6ff reply_doserror() doesn't force DOS errors on the wire.
Start migrating uses of reply_doserror() to reply_nterror() with the
correct mapping. Eventually we'll get to the point where we can
change reply_doserror() to force a DOS error code on the wire,
and can change calls to reply_nterror(req, NT_STATUS_DOS()) - which *does*
force DOS errors on the wire - to reply_doserror(). Which might
actually make the server code look like it's making sense.

Jeremy.
2009-12-18 14:25:39 -08:00
Jeremy Allison
32915ceefc Make Samba3 pass the RAW-LOCK test as Windows.
Implement the win7 NT_STATUS_INVALID_LOCK_RANGE.
Make smbd behave as Windows does in canceling locks.

Jeremy.
2009-12-04 14:04:08 -08:00
Jeremy Allison
91e0bdd86c Refactor reply_rmdir to use handle based code. All
calls are now handle based. Put rmdir into close.c
and make it private.
Jeremy.
2009-12-03 13:01:10 -08:00
Jeremy Allison
dfcc4115dd Remove unneeded argument from can_set_delete_on_close(). Ensure
can_set_delete_on_close() is correctly called before any setting
of the disposition bit (clean up the do_unlink() call).
Jeremy.
2009-12-02 18:06:40 -08:00
Volker Lendecke
a1a81ef785 Revert "s3: Make the implicit reference to Protocol in mask_match() explicit"
This reverts commit e23d8a3d1f558a7e98ef2afd71e1d15c5b3a71bc.
2009-11-23 16:35:00 +01:00
Volker Lendecke
5c4885a26b Revert "s3: Make the implicit reference to Protocol in is_in_path() explicit"
This reverts commit f7b4151a64d8c6851e62255a7139fd00a5fc63a3.
2009-11-23 16:35:00 +01:00
Volker Lendecke
7930206f5c Revert "s3: Make the implicit reference to get_Protocol in lp_use_sendfile() explicit"
This reverts commit 6a149022976fe6a5579ec9afc7a4d2dcb44dc8af.
2009-11-23 16:34:59 +01:00
Volker Lendecke
0f8e2a6ebb Revert "s3: Move the global variable Protocol to struct smbd_server_connection"
This reverts commit c85a4c9ba4a7de65a7850f6f9708df66bd24deea.
2009-11-23 16:34:59 +01:00
Volker Lendecke
c85a4c9ba4 s3: Move the global variable Protocol to struct smbd_server_connection 2009-11-21 20:49:17 +01:00
Volker Lendecke
6a14902297 s3: Make the implicit reference to get_Protocol in lp_use_sendfile() explicit 2009-11-21 20:49:17 +01:00
Volker Lendecke
f7b4151a64 s3: Make the implicit reference to Protocol in is_in_path() explicit 2009-11-21 20:49:17 +01:00