Stefan Metzmacher
d73b7938bb
s3:smbd: use print_sockaddr() instead of client_socket_addr()
...
We already have a server address in sockaddr_storage format.
Also the name "client_socket" was very miss leading,
as it returns the local address of the socket.
metze
2012-07-31 09:34:21 +02:00
Stefan Metzmacher
13de233fc6
s3:smbd: move smbd_register_ips() next to release_ip()
...
metze
2012-07-31 09:34:21 +02:00
Andrew Bartlett
b181a0b96b
lib/param: Remove use of lp{cfg,}_socket_address outside the NBT client and server
...
In these other cases, control of the sockets to bind to can be obtained using
"bind interfaces only = yes" and "interfaces = ".
Andrew Bartlett
2012-07-27 17:59:51 +10:00
Stefan Metzmacher
a67daa3aa6
s3:smb2_negprot: return the current system time in the SMB2 NEGPROT response
...
metze
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jul 26 11:56:02 CEST 2012 on sn-devel-104
2012-07-26 11:56:02 +02:00
Stefan Metzmacher
f6592c427d
s3:smbd: fix compiler warnings in notify_internal.c
...
metze
2012-07-26 10:02:07 +02:00
Stefan Metzmacher
df08929d28
s3:smb2_sesssetup: reject SMB2_SESSION_FLAG_BINDING requests
...
metze
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jul 26 02:08:56 CEST 2012 on sn-devel-104
2012-07-26 02:08:56 +02:00
Stefan Metzmacher
859e5be070
s3:smb2_ioctl: fix GUID_compare() check in FSCTL_VALIDATE_NEGOTIATE_INFO
...
metze
2012-07-25 23:32:18 +02:00
Stefan Metzmacher
3a85737191
s3:smb2_ioctl: allow clients to send padding at the end of FSCTL_VALIDATE_NEGOTIATE_INFO
...
metze
2012-07-25 23:31:02 +02:00
Stefan Metzmacher
3cce5214f9
s3:smb2_ioctl: remove FSCTL_VALIDATE_NEGOTIATE_INFO_224 implementation
...
Only Windows8 Beta uses this and it's broken, the client send wrong
capabilities. Just returning an error seems to be fine for the Windows8 Beta
client.
metze
2012-07-25 23:29:28 +02:00
Stefan Metzmacher
c66a45d3f2
s3:smb2_server: simplify the talloc_pool handling for smbd_smb2_request
...
metze
2012-07-25 12:15:01 +02:00
Andrew Bartlett
f3562424b6
lib/param: Move all enum declarations to lib/param
...
This is in preperation for the parameter table being made common.
Andrew Bartlett
Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>
2012-07-24 11:01:17 +02:00
Andrew Bartlett
9521cd0409
param: Make the 'unicode' parameter common
...
This parameter is most useful for interop testing, rather than production use.
Andrew Bartlett
2012-07-24 10:46:12 +10:00
Jeremy Allison
61cec270c2
Fix unused variable.
2012-07-24 00:09:46 +02:00
Jeremy Allison
e5a3218b0e
Fix compiler warning.
2012-07-24 00:09:46 +02:00
Jeremy Allison
111c2159de
Fix problem found by Andrew Bartlett - correctly check encrypted flag.
2012-07-23 20:15:33 +02:00
Stefan Metzmacher
88f326a2c0
s3:smb2_tcon: reject access to shares mark as "smb encrypt = required"
...
We do not support SMB2 transport encryption yet.
metze
2012-07-23 18:19:36 +02:00
Stefan Metzmacher
0b903e1cf5
s3:smbd: if a fsp has fsp->deferred_close, clients shouldn't be able to use it
...
metze
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Jul 23 16:22:03 CEST 2012 on sn-devel-104
2012-07-23 16:22:03 +02:00
Jeremy Allison
e8dbf2889f
Move everything to use the common pidfile functions.
...
The extra code in source3/lib/pidfile.c is no longer needed.
2012-07-19 16:36:18 -07:00
Jeremy Allison
0d24370c76
Make the s3 pidfile use the common code inside lib/util/pidfile.c
2012-07-19 16:08:49 -07:00
Jeremy Allison
2922fdaaf0
Move source4/smbd/pidfile into lib/util in preparation for making it in common.
2012-07-19 15:41:52 -07:00
Andrew Bartlett
0f57da57e3
lib/param: bring lp_smb_ports() into common by making it a list everywhere
2012-07-19 08:02:32 +02:00
Volker Lendecke
8ef968a23d
s3-aio: Panic if we try to close a fsp with outstanding aio requests
...
The core smbd must have taken care of this. If we don't do this properly,
we have a race of the close(2) against a pwrite(2). We might end up
writing to the wrong file.
Signed-off-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jul 19 03:40:17 CEST 2012 on sn-devel-104
2012-07-19 03:40:17 +02:00
Volker Lendecke
a6b5836741
s3-smb2: Postpone close_file until all aio is handled
...
Thanks to Jeremy for this simple idea
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:58:43 -07:00
Volker Lendecke
3e9f58be7e
s3-smb1: Postpone close_file until all aio is handled
...
Thanks to Jeremy for this simple idea
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:57:53 -07:00
Volker Lendecke
f79fb4429c
s3: Slightly simplify reply_close()
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:54:04 -07:00
Volker Lendecke
ed31e20115
s3-aio: Make the strict sync after write async
...
This restores cb405947caa9f4bdb962483860a9093a364ecbf2, which was
lost during the refactoring of aio.c and vfs_aio_pthread.c.
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:51:11 -07:00
Volker Lendecke
56aae9f754
s3: Add a _nosync version of smb2_write_complete
...
This will be used in aio.c to avoid a second fsync after write
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:48:27 -07:00
Volker Lendecke
5d09cec6fe
s3-vfs: async fsync
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:48:04 -07:00
Volker Lendecke
3882113e6f
s3: Fix the build
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:47:27 -07:00
Volker Lendecke
fd351b6ebb
s3: Make us survive base-delaywrite with aio enabled
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:46:54 -07:00
Volker Lendecke
c4efaabbd9
s3: Move the aio_pthread read/write functionality to vfs_default
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:46:29 -07:00
Volker Lendecke
9dc78c90f3
s3-aio: Remove unused VFS functions and more
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:45:58 -07:00
Volker Lendecke
ff701ceae2
s3: Add vfs_aio_posix
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:41:36 -07:00
Volker Lendecke
f9df073a31
s3: Make smbd/aio.c not depend on aio.h anymore
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:40:35 -07:00
Volker Lendecke
66eb7bc6ec
s3: Remove the unused completion handling from aio.c
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:38:15 -07:00
Volker Lendecke
f5dc8837d9
s3: Properly handle shutdown with the _send/_recv based aio
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:37:28 -07:00
Volker Lendecke
aff6956d35
s3: Use SMB_VFS_PWRITE_SEND in schedule_smb2_aio_write
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:35:32 -07:00
Volker Lendecke
6df7ba3af9
s3: Use SMB_VFS_PREAD_SEND in schedule_smb2_aio_read
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:34:27 -07:00
Volker Lendecke
2bad405a4e
s3: Use SMB_VFS_PWRITE_SEND in schedule_aio_write_and_X
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:33:22 -07:00
Volker Lendecke
7c32017064
s3: Use SMB_VFS_PREAD_SEND in schedule_aio_read_and_X
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:13:04 -07:00
Volker Lendecke
e24aed15fa
s3-vfs: async pread
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:11:56 -07:00
Volker Lendecke
c6e456d9c0
s3-vfs: async pwrite
...
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 13:49:21 -07:00
Rusty Russell
fe72740e82
loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.
...
They use talloc_tos() internally: hoist that up to the callers, some
of whom don't want to us talloc_tos().
A simple patch, but hits a lot of files.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-18 15:07:23 +09:30
Volker Lendecke
27e20d5d60
s3: Make us survive smb2.lock.rw-shared with aio enabled
...
schedule_aio_smb2_write can return NT_STATUS_FILE_LOCK_CONFLICT.
This is a valid error code that smb2.lock.rw-shared expects and
checks for. The code before this patch maps this to NT_STATUS_FILE_CLOSED,
masking the real, correct error message.
Signed-off-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jul 13 21:53:51 CEST 2012 on sn-devel-104
2012-07-13 21:53:51 +02:00
Andrew Bartlett
15fedb3c68
s3-auth Remove unused global_machine_account_needs_changing
...
This boolean was only set if the old machine account store (with an
MD4 hash in it) was returned. We have not set that password type for
years. If this call ever worked, it would store a plaintext password,
so we could only ever be here if we had set a password using a version
of Samba so old as not to store plaintext, and then never honered the
flag anyway.
Andrew Bartlett
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Jul 13 07:52:40 CEST 2012 on sn-devel-104
2012-07-13 07:52:40 +02:00
Jeremy Allison
a7c63ac1b7
Set fsp->initial_allocation_size before calling open_file_ntcreate().
...
Allows an SMB_VFS_OPEN() vfs module to do something interesting with
the request.
2012-07-12 22:46:07 +02:00
Jeremy Allison
775014bd9c
Make sure we reset fsp->initial_allocation_size to zero if we didn't create the file.
...
This will become important as we set fsp->initial_allocation_size before
create.
2012-07-12 22:46:07 +02:00
Jeremy Allison
cb405947ca
Add an optimization to pthread aio writes to also do fsync if requested.
...
Should help by ensuring complete writes done in sub-thread, not in
the main thread.
2012-07-12 22:46:07 +02:00
Volker Lendecke
622eb59eb4
s3: Make us survive base-delaywrite with aio enabled
...
Signed-off-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jul 12 21:28:19 CEST 2012 on sn-devel-104
2012-07-12 21:28:19 +02:00
Volker Lendecke
67e7e14e62
s3: Factor out "mark_file_modified"
...
This is in preparation of making us survive base-delaywrite with async I/O activated
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-12 10:13:12 -07:00