Stefan Metzmacher
fbd663c143
s3:smb2_server: make use of smbd_smb2_inbuf_parse_compound() in smbd_smb2_request_create()
...
metze
2012-08-06 20:02:32 +02:00
Stefan Metzmacher
9e9d784def
s3:smb2_server: remove const from smbd_smb2_first_negprot()
...
metze
2012-08-06 20:02:32 +02:00
Stefan Metzmacher
c1b3454259
s3:smb2_server: add smbd_smb2_inbuf_parse_compound()
...
metze
2012-08-06 20:02:32 +02:00
Stefan Metzmacher
1c7bd2b71c
s3:smbd: remove unused variable in sesssetup.c
...
metze
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sun Aug 5 23:09:06 CEST 2012 on sn-devel-104
2012-08-05 23:09:06 +02:00
Stefan Metzmacher
4384b1e73b
s3:smb2_server: make use of SMBD_SMB2_* macros
...
metze
2012-08-05 20:55:41 +02:00
Stefan Metzmacher
47c67f2eac
s3:smb2_ioctl: make use of SMBD_SMB2_* macros
...
metze
2012-08-05 20:55:40 +02:00
Stefan Metzmacher
e281b9f798
s3:smb2_lock: make use of SMBD_SMB2_* macros
...
metze
2012-08-05 20:55:40 +02:00
Stefan Metzmacher
e67d07f639
s3:smb2_setinfo: make use of SMBD_SMB2_* macros
...
metze
2012-08-05 20:55:40 +02:00
Stefan Metzmacher
9c58a0a870
s3:smb2_getinfo: make use of SMBD_SMB2_* macros
...
metze
2012-08-05 20:55:40 +02:00
Stefan Metzmacher
e9a21e5c8b
s3:smb2_negprot: make use of SMBD_SMB2_* macros
...
metze
2012-08-05 20:55:39 +02:00
Stefan Metzmacher
f28b2ac65a
s3:smb2_write: make use of SMBD_SMB2_* macros
...
metze
2012-08-05 20:55:38 +02:00
Stefan Metzmacher
f08e478d2f
s3:smb2_tcon: make use of SMBD_SMB2_* macros
...
metze
2012-08-05 20:55:37 +02:00
Stefan Metzmacher
6e9a65ded3
s3:smb2_create: make use of SMBD_SMB2_* macros
...
metze
2012-08-05 20:55:37 +02:00
Stefan Metzmacher
926379ae79
s3:smb2_find: make use of SMBD_SMB2_* macros
...
metze
2012-08-05 20:55:36 +02:00
Stefan Metzmacher
559742f45f
s3:smb2_sesssetup: make use of SMBD_SMB2_* macros
...
metze
2012-08-05 20:55:36 +02:00
Stefan Metzmacher
048c8d3db4
s3:smb2_glue: make use of SMBD_SMB2_IN_HDR_PTR()
...
metze
2012-08-05 20:55:36 +02:00
Stefan Metzmacher
8cf817d7fd
s3:smb2_read: make use of SMBD_SMB2_IN_BODY_PTR()
...
metze
2012-08-05 20:55:35 +02:00
Stefan Metzmacher
121dbd6210
s3:smb2_notify: make use of SMBD_SMB2_IN_*_PTR()
...
metze
2012-08-05 20:55:35 +02:00
Stefan Metzmacher
88a34026f5
s3:smb2_flush: make use of SMBD_SMB2_IN_BODY_PTR()
...
metze
2012-08-05 20:55:35 +02:00
Stefan Metzmacher
52805c4169
s3:smb2_close: make use of SMBD_SMB2_IN_BODY_PTR()
...
metze
2012-08-05 20:55:34 +02:00
Stefan Metzmacher
21742c3693
s3:smb2_break: make use of SMBD_SMB2_IN_BODY_PTR()
...
metze
2012-08-05 20:55:34 +02:00
Stefan Metzmacher
7ee54cd9c4
s3:smbd: add helper macros to access smb2req->{in,out}.vector[]
...
For SMB3 encryption we need to change the vector layout
and we better hide this behind some central macros.
metze
2012-08-05 20:55:34 +02:00
Stefan Metzmacher
7327310754
s3:smb2_server: use 'i' instead of '1' as vector index in smbd_smb2_request_pending_timer()
...
If we reach this code i is currently always 1, but it's easier to unstand this
way.
metze
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sun Aug 5 20:00:26 CEST 2012 on sn-devel-104
2012-08-05 20:00:26 +02:00
Stefan Metzmacher
1a0c40f537
s3:smb2_lock: remove unused in_smbpid
...
metze
2012-08-05 16:39:31 +02:00
Stefan Metzmacher
96fa47f56e
s3:smb2_write: remove unused in_smbpid
...
metze
2012-08-05 16:39:31 +02:00
Stefan Metzmacher
056070f395
s3:smb2_read: remove unused in_smbpid
...
metze
2012-08-05 16:39:30 +02:00
Stefan Metzmacher
401860cab6
s3:smbd: add support for SMB_EXTENDED_SIGNATURES in SMBtconX
...
metze
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Aug 4 14:28:04 CEST 2012 on sn-devel-104
2012-08-04 14:28:04 +02:00
Stefan Metzmacher
ff75fd9eda
s3:smbd: setup the application session key with the first tcon on a session
...
Look for Server.Session.SessionKeyState in [MS-SMB].
The first SMBtconX sets the state to available, which makes it possible
to protect the session key at that stage, if client and server
support TREE_CONNECT_ANDX_EXTENDED_SIGNATURE.
metze
2012-08-04 12:33:06 +02:00
Stefan Metzmacher
49d0432efd
s3:smbd: setup session->global->signing_/application_key during SPNEGO SMB1 session setups
...
metze
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Aug 4 11:09:42 CEST 2012 on sn-devel-104
2012-08-04 11:09:42 +02:00
Stefan Metzmacher
2265e4633a
s3:smbd: setup session->global->signing_/application_key during old SMB1 session setups
...
metze
2012-08-04 09:10:23 +02:00
Stefan Metzmacher
3d63e4da17
s3:smbd: keep the "application session key" during SMB1 reauth
...
metze
2012-08-04 09:10:22 +02:00
Stefan Metzmacher
b1a0fda73d
libcli/smb: pass hdr/len to smb_signing_check/sign_pdu() and skip the nbt header
...
metze
2012-08-04 09:10:21 +02:00
Stefan Metzmacher
b1c5efbfea
s3:smbd: skip nbt header in srv_check_sign_mac()
...
metze
2012-08-04 09:10:20 +02:00
Andrew Bartlett
1e5098d5e1
s3-pysmbd: Add hook for get_nt_acl()
...
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Aug 2 13:27:55 CEST 2012 on sn-devel-104
2012-08-02 13:27:54 +02:00
Andrew Bartlett
64f494de5e
s3-pysmbd: fix DEBUG
2012-08-02 11:35:19 +02:00
Andrew Bartlett
e5686a4cf0
s3-pysmbd: Add my copyright
2012-08-02 11:35:19 +02:00
Andrew Bartlett
55a0d6606c
s3-pysmbd: Add set_nt_acl() function based on parts of vfstest
...
This will allow us to set the full NT ACL on a file, using the VFS
layer, during provision of the AD DC.
Andrew Bartlett
2012-08-02 11:35:19 +02:00
Stefan Metzmacher
b93e6ef5e7
s3:smbd: add a optional_support helper variable to reply_tcon_and_X()
...
metze
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Aug 1 18:25:26 CEST 2012 on sn-devel-104
2012-08-01 18:25:26 +02:00
Stefan Metzmacher
3fb6549db0
s3:smbd: make use of TCONX_FLAG_DISCONNECT_TID define
...
metze
2012-08-01 14:17:16 +02:00
Volker Lendecke
d1dccfbda6
s3: Fix Coverity ID 710818 Resource leak
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-07-31 11:40:23 +02:00
Volker Lendecke
2ddc3a280e
s3: Fix Coverity ID 710827 Resource leak
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-07-31 11:40:22 +02:00
Volker Lendecke
d2eb26cfbd
s3: Make request_timed_out() static
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-07-31 11:40:22 +02:00
Stefan Metzmacher
35c0f164bc
s3:smbd: do a clean shutdown during release_ip() after CTDB_SRVID_RELEASE_IP
...
metze
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jul 31 11:33:27 CEST 2012 on sn-devel-104
2012-07-31 11:33:27 +02:00
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 cb405947ca
, 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
Jeremy Allison
6d903bf189
Cope with a (non-security) open race we've had for ever as NTCreateX isn't atomic on POSIX.
...
On open without create, the file did exist, but some
other (local or NFS) process either renamed/unlinked
and re-created the file with different dev/ino after
we walked the path, but before we did the open. We
could retry the open but it's a rare enough case it's
easier to just fail the open to prevent creating any
problems in the open file db having the wrong dev/ino
key.
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jul 10 21:57:33 CEST 2012 on sn-devel-104
2012-07-10 21:57:33 +02:00
Jeremy Allison
69a3e947b6
Now we have a guaranteed indication of a file being created, use it to set the create disposition correctly.
2012-07-10 09:39:36 -07:00
Jeremy Allison
02d42be258
Add function fd_open_atomic() which uses O_CREAT|O_EXCL to return a guaranteed indication of creation of a new file.
2012-07-10 09:39:29 -07:00
Jeremy Allison
3aa186f1d4
Simplify the logic in open_file() some more.
...
Move the inheritance work into the if block
where we created the file. We can never have
created the file (and thus need no inheritance)
for a stat-open.
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jul 10 03:30:22 CEST 2012 on sn-devel-104
2012-07-10 03:30:22 +02:00
Jeremy Allison
3a705e5f3d
Simplify the logic in open_file().
...
Move the fstat call into the block which opens a file descriptor.
Remove the stat() call in the stat-open case. We already failed
the open if !file_existed.
2012-07-09 16:20:45 -07:00
Jeremy Allison
9d5e026bde
Make check_same_stat() and check_same_dev_ino() common functions.
2012-07-09 12:26:56 -07:00
Jeremy Allison
1f37ed7a52
Factor out check_same_dev_ino() from check_same_stat() so it can be called separately.
2012-07-09 11:35:20 -07:00
Björn Jacke
f9fb1ef85c
s3: evaluate MNT_QUOTA and MNT_RDONLY in statvfs also on darwin
2012-07-05 22:00:52 +02:00
Björn Jacke
b40fb6eec5
s3: if we know a file is immutable, report it to be readonly
...
on *BSD we get the immutable flag via st_flags, we should use that if possible.
2012-07-04 12:01:20 +02:00
Andreas Schneider
d0878b3b81
s3-smbd: Remove deprecated 'share modes' option.
2012-07-03 21:56:49 +02:00
Volker Lendecke
abda9d3347
s3: Fix Coverity ID 709217 Dereference after null check
...
A few lines before we did check for x != NULL. I think this might
fix a potential remote crash.
Signed-off-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Jul 3 15:30:17 CEST 2012 on sn-devel-104
2012-07-03 15:30:16 +02:00
Volker Lendecke
6710e4edc5
s3: Fix Coverity ID 709218 Uninitialized pointer read
...
Signed-off-by: Michael Adam <obnox@samba.org>
2012-07-03 13:39:42 +02:00
Michael Adam
e332bfaff5
s3:smbd: Include smbXsrv.h before vfs.h (in smbd.h) so that the smbXsrv structures are available
...
This is currently needed for files_struct and connection_struct
that contain backlinks to smbXsrv_open and smbXsrv_tcon, respectively.
Finally, these backlinks to the smb level structures should be removed.
2012-07-03 13:39:41 +02:00
Michael Adam
8a32d62abc
s3:smbd:smb2: fix prototype of make_connection_smb2() to use smbXsrv_tcon
...
instead of internal smbXsrv_tcon0.
2012-07-03 13:39:40 +02:00
Michael Adam
98ccca8dca
s3:smbd: include smbXsrv.h before smbd/proto.h to have the smbXsrv_ structs available
2012-07-03 13:39:40 +02:00
Michael Adam
bfc38d74cc
s3:smbd:smb2: change smbXsrv_tcon0 to smbXsrv_tcon in smbd_smb2_request_check_tcon()
...
smbXsrv_tcon0 is the internal name for the (current) version0 of the
structure. Externally, only smbXsrv_tcon should be used.
2012-07-03 13:39:40 +02:00
Michael Adam
cca51e2f55
s3:smbd:smb2: change smbXsrv_session0 to smbXsrv_session in struct user_struct.
...
smbXsrv_session0 is the internal name of (current) version 0 of
the structure. Externally, only smbXsrv_session should be used.
2012-07-03 13:39:39 +02:00
Jeremy Allison
5679ba1018
Don't allow asynchronous creates to be canceled in SMB2.
...
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Jun 30 04:10:02 CEST 2012 on sn-devel-104
2012-06-30 04:10:02 +02:00
Jeremy Allison
6617c2c1f5
Make schedule_deferred_open_message_smb() return an indication of success.
2012-06-30 02:23:39 +02:00
Jeremy Allison
0d2f6cae41
Make schedule_deferred_open_message_smb2() return an indication of success.
2012-06-30 02:23:39 +02:00
Jeremy Allison
b004121d9b
Allow for async opens.
...
If the SMB_VFS_OPEN() function returns -1, EINTR -> NT_STATUS_RETRY,
then queue the open up to be completed when the async open completes.
2012-06-30 02:23:39 +02:00
Jeremy Allison
d1e1aa552d
Add new bool field async_open to struct deferred_open_record. Not used yet.
2012-06-30 02:23:39 +02:00
Jeremy Allison
0362dcbd09
Fix defer_open() fuction in the open code path to cope with a NULL lck parameter.
2012-06-30 02:23:39 +02:00
Jeremy Allison
34bb743ce3
Add uint64_t mid field to the files_struct.
...
Ensure it is initialized so we know what mid created this file.
2012-06-30 02:23:39 +02:00
Stefan Metzmacher
7d1395536b
s3:smbd: make use of smbXsrv_open for smb1/2/3
...
This makes sure we generate unique persistent file ids,
which are stored in smbXsrv_open_global.tdb.
Pair-Programmed-With: Michael Adam <obnox@samba.org>
metze
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Jun 29 21:01:11 CEST 2012 on sn-devel-104
2012-06-29 21:01:11 +02:00
Stefan Metzmacher
f7762e2730
s3:smbd: add smbXsrv_open* infrastructure
...
Pair-Programmed-With: Michael Adam <obnox@samba.org>
metze
2012-06-29 19:11:04 +02:00
Björn Jacke
143b711c23
s3: fix the logic in bsd_statvfs
2012-06-29 17:19:21 +02:00
Stefan Metzmacher
1a622fe641
s3:smb2_server: remove max_charge check in smbd_smb2_request_verify_creditcharge()
...
The client can send any credit charge value, it's ok to send more than needed.
metze
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-29 15:21:08 +02:00
Björn Jacke
b526a0d673
s3: merge bsd_statvfs and darwin_statvfs
2012-06-29 12:47:23 +02:00
Jeremy Allison
821bd95156
Replace all uses of setXX[ug]id() and setgroups with samba_setXX[ug]id() calls.
...
Will allow thread-specific credentials to be added by modifying
the central definitions. Deliberately left the setXX[ug]id()
call in popt as this is not used in Samba.
2012-06-28 17:15:16 -07:00
Stefan Metzmacher
34a9892ec1
s3:smb2_server: make the logic in smbd_smb2_request_verify_creditcharge() simpler
...
We just need a max_charge variable to make the algorithm independent
of multi_credit support.
metze
2012-06-29 00:14:56 +02:00
Stefan Metzmacher
967f2c44b3
s3:smb2_server: simplify smbd_smb2_request_verify_creditcharge() a bit.
...
A credit charge of 0 is really not a special case, it just means the same
as 1.
metze
2012-06-29 00:14:56 +02:00
Stefan Metzmacher
5b7f5d02b5
s3:smb2_negprot: support SMB2_CAP_LARGE_MTU on everything but port 139
...
In future we'll have other transports like RDMA.
This makes NBT (tcp port 139) special instead of port 445.
metze
2012-06-29 00:14:56 +02:00
Stefan Metzmacher
1db83d2b37
s3:smb2_server: grant extra credits for multi-credit requests
...
metze
2012-06-29 00:14:55 +02:00
Stefan Metzmacher
648b959b13
s3:smb2_server: implement credit granting similar to windows
...
This makes it much easier to compare traces.
metze
2012-06-29 00:14:55 +02:00
Stefan Metzmacher
82dc0b33b9
s3:smb2_server: make sure sequence numbers don't wrap at UINT64_MAX
...
metze
2012-06-29 00:14:54 +02:00
Stefan Metzmacher
ee8ae459ae
s3:smb2_server: make sure we don't grant more credits than we allow
...
If the client hasn't consumed the lowest seqnum, but the distance
between lowest and highest seqnum has reached max credits.
In that case we should stop granting credits.
metze
2012-06-29 00:14:54 +02:00
Stefan Metzmacher
4fe41c0bb1
s3:smb2_server: check the credit_charge against the already granted credits
...
metze
2012-06-29 00:14:54 +02:00
Stefan Metzmacher
984fdaf914
s3:smb2_server: split out a smb2_validate_sequence_number() function
...
metze
2012-06-29 00:14:53 +02:00
Stefan Metzmacher
d6e7a76461
s3:smb2_server: clear sequence window if we got the lowest sequence id
...
Otherwise we'll never consume sequence id '0'.
metze
2012-06-29 00:14:53 +02:00
Stefan Metzmacher
bd6d415cae
s3:smb2_server: fix calculation of the next bitmap_offset
...
metze
2012-06-29 00:14:52 +02:00
Stefan Metzmacher
d1ee774ed0
s3:smb2_server: remove unused and confusing DEFAULT_SMB2_MAX_CREDIT_BITMAP_FACTOR
...
metze
2012-06-29 00:14:52 +02:00
Stefan Metzmacher
925994e42e
s3:smb2_server: call smbd_smb2_request_validate() also in smbd_smb2_first_negprot()
...
We need to consume message_id 0, for SMB1 negprot starts.
metze
2012-06-29 00:14:51 +02:00
Stefan Metzmacher
0b8eac9b79
s3:smb2_server: start the connection with one credit granted to the client
...
metze
2012-06-29 00:14:51 +02:00
Björn Jacke
7560b1cea6
s3: fine tune and clean up statvfs tests
...
This should also fix the build on Tru64. Tru64 has a POSIX compliant statvfs()
function while most *BSD systems ignore POSIX.
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Thu Jun 28 23:07:23 CEST 2012 on sn-devel-104
2012-06-28 23:07:23 +02:00
Stefan Metzmacher
d6939c39c0
s3:smbd: change nt_open_pipe() to uint16_t pnum/fnum
...
This is SMB1 code...
metze
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jun 28 14:47:45 CEST 2012 on sn-devel-104
2012-06-28 14:47:45 +02:00
Stefan Metzmacher
d7d1bb9444
s3:smb2_create: add usefull DEBUG() message
...
All calls which take an file handle have the same,
so we should also log it, when we create a handle.
metze
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jun 28 12:41:49 CEST 2012 on sn-devel-104
2012-06-28 12:41:48 +02:00
Stefan Metzmacher
66fa891d2d
s3:smbd/files: fsp->fnum is uint64_t not int!
...
metze
2012-06-28 10:08:03 +02:00
Andrew Bartlett
666dba3353
s3-param: Rename loadparm_s3_context -> loadparm_s3_helpers
...
This helps clarify the role of this structure and wrapper function.
The purpose here is to provide helper functions to the lib/param
loadparm_context that point back at the s3 lp_ functions. This allows
a struct loadparm_context to be passed to any point in the code, and
always refer to the correct loadparm system. If this has not been
set, the variables loaded in the lib/param code will be returned.
As requested by Michael Adam.
Andrew Bartlett
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Jun 27 17:11:16 CEST 2012 on sn-devel-104
2012-06-27 17:11:16 +02:00
Volker Lendecke
5df1fda0f5
s3: Restore async i/o with the "native" AIO interface
...
eff3609
moved the async signal handler initialization to later in the process
to enable aio_fork and aio_pthread on platforms without realtime signals. This
commit broke the use of the native aio interface. aio_pending_size is
initialized to 0, so aio.c will not allow async i/0 at all if modules do not
set that variable correctly. Initialize to 100 right from the start.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jun 26 14:08:22 CEST 2012 on sn-devel-104
2012-06-26 14:08:22 +02:00
Stefan Metzmacher
93399c1ec3
s3:smbXsrv_tcon: pass max_tcons explicitly for smbXsrv_tcon_table_init()
...
metze
2012-06-26 12:18:03 +02:00
Stefan Metzmacher
9c36781580
s3:smbXsrv_session: pass max_sessions explicitly for smbXsrv_session_table_init()
...
metze
2012-06-26 12:17:33 +02:00
Stefan Metzmacher
45cd2bc2b3
s3:smb2_sesssetup: make use of smb2srv_session_close_previous_send/recv
...
metze
2012-06-25 20:55:07 +02:00
Stefan Metzmacher
299b63f875
s3:smbXsrv_session: react on MSG_SMBXSRV_SESSION_CLOSE
...
metze
2012-06-25 20:55:07 +02:00
Stefan Metzmacher
8acf6c90bd
s3:smbXsrv_session: add smb2srv_session_close_previous_send/recv
...
metze
2012-06-25 20:55:07 +02:00
Stefan Metzmacher
ed75069460
s3:smb2_sesssetup: inline gensec_session_info() call
...
metze
2012-06-25 20:55:07 +02:00
Stefan Metzmacher
1b8bcaeda3
s3:smb2_sesssetup: make use of gensec_update_send/recv
...
metze
2012-06-25 20:55:07 +02:00