1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

34 Commits

Author SHA1 Message Date
Michael Adam
d6acf950e4 smbXsrv: rename smb2srv_session_lookup -> smb2srv_session_lookup_conn
This is in preparation of adding a variant that operates
on the client and does in particular not verify that the
connection belongs to a session as a channel.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2015-07-29 18:26:07 +02:00
Jeremy Allison
5ebb190385 s3:locking: Change the data model for leases_db to cope with dynamic path renames.
interface leases_db
{
        typedef [public] struct {
                GUID client_guid;
                smb2_lease_key lease_key;
        } leases_db_key;

        typedef [public] struct {
                file_id id;
                [string,charset(UTF8)] char *servicepath;
                [string,charset(UTF8)] char *base_name;
                [string,charset(UTF8)] char *stream_name;
        } leases_db_file;

        typedef [public] struct {
                uint32 num_files;
                [size_is(num_files)] leases_db_file files[];
        } leases_db_value;
}

As designed by metze.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Dec  9 03:44:04 CET 2014 on sn-devel-104
2014-12-09 03:44:04 +01:00
Volker Lendecke
02f2684dd8 s3:smbd: Implementation of SMB2.1 and SMB3.0 leases.
Pair-Programmed-With: Jeremy Allison <jra@samba.org>
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2014-12-04 05:45:10 +01:00
Volker Lendecke
2d44498740 s3:smb2_break: First test for NT_STATUS_INVALID_OPLOCK_PROTOCOL, then for in_oplock_level being reasonable
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Nov 12 00:03:34 CET 2014 on sn-devel-104
2014-11-12 00:03:34 +01:00
Michael Adam
31d3224550 smbd: fix a comment typo.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Sun Sep 21 22:43:55 CEST 2014 on sn-devel-104
2014-09-21 22:43:55 +02:00
Stefan Metzmacher
6e28bf174b s3:smb2_break: use fsp->conn->sconn->client->connections to send SMB2 oplock breaks
This means we use the first connection for now.

TODO: we may need to use the connection on which the SMB2 create was done
and fallback to other connections.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-09-19 09:15:12 +02:00
Stefan Metzmacher
33bffc3258 s3:smb2_break: pass smbXsrv_connection to smbd_smb2_send_oplock_break()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-09-19 09:15:12 +02:00
Stefan Metzmacher
4a07b14cea s3:smb2_server: pass smbXsrv_connection to smbd_server_connection_terminate*()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-08-06 09:51:13 +02:00
Stefan Metzmacher
c09292e20d s3:smb2_break: make use of smbd_smb2_generate_outbody()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-05 13:59:20 -08:00
Volker Lendecke
3e7923d7af smbd: Remove unused reply_to_oplock_break_requests
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-26 15:17:22 -07:00
Stefan Metzmacher
069db9b630 s3:smb2_break: encrypt OPLOCK BREAK notifications
metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Aug 23 10:01:14 CEST 2012 on sn-devel-104
2012-08-23 10:01:14 +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
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
Michael Adam
b27f88898a s3:vfs: change files_struct.fnum from int to uint64_t
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Jun 15 05:22:41 CEST 2012 on sn-devel-104
2012-06-15 05:22:41 +02:00
Michael Adam
78b9e1afef s3:smbd: change smb2_break.c to use fsp_fnum_dbg() for fsp->fnum logging.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-15 03:28:15 +02:00
Stefan Metzmacher
3f110e50bf s3:smbd: use fsp_persistent_id() as persistent_file_id part for SMB2 (bug #8995)
It seems to be important to have unique persistent file ids,
because windows clients seem to index files by server_guid + persistent_file_id.
Which may break, if we just have a 16-bit range per connection
and the client connects multiple times.

Based on code from Ira Cooper. Use fsp->fh->gen_id as the persistent
fileid in SMB2.

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jun 14 22:04:13 CEST 2012 on sn-devel-104
2012-06-14 22:04:10 +02:00
Stefan Metzmacher
3909ad4690 s3:smb2_break: make use of file_fsp_smb2()
metze
2012-06-09 21:23:44 +02:00
Stefan Metzmacher
763fe4216b s3:smb2_server: use sconn->ev_ctx instead of sconn->smb2.event_ctx
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Dec 12 16:08:59 CET 2011 on sn-devel-104
2011-12-12 16:08:59 +01:00
Stefan Metzmacher
88dd90d928 s3:smb2_server: pass explicit defer_times to smbd_smb2_request_pending_queue()
metze
2011-11-15 17:14:13 +01:00
Stefan Metzmacher
9da2f72d47 s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_break.c
metze
2011-09-07 10:38:04 +02:00
Günther Deschner
50883cfeb4 s3-tevent: only include ../lib/util/tevent wrappers where needed.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Apr 29 14:00:30 CEST 2011 on sn-devel-104
2011-04-29 14:00:30 +02:00
Günther Deschner
8c24ebf371 s3: include smbd/smbd.h where needed.
Guenther
2011-03-30 01:13:08 +02:00
Jeremy Allison
af44593555 (Finally) fix bug #7158 - SMB2 connection resets during IOZone tests from 64-bit Vista client
It turns out that the persistent handles are used by the Microsoft
redirector to index files on oplock break requests. So even if we
don't do durable handles (yet) we must set the persistent handle
on create. For now just use the same handle value as we use for
volatile.

Jeremy.
2010-05-19 19:28:26 -07:00
Jeremy Allison
1101c62144 Pass more SMB2 oplock tests. Only oplock stream tests left to fix.
Jeremy.
2010-05-12 15:19:45 -07:00
Jeremy Allison
ae9fe3cc8e SMB2 always have level2 oplock capability. Correct mapping from break messages to SMB2 oplock levels.
Jeremy.
2010-05-10 14:23:44 -07:00
Jeremy Allison
4e7195be36 Update (C) for 2010.
Jeremy.
2010-04-28 14:56:12 -07:00
Jeremy Allison
a796542a93 Implement oplocks within SMB2. Plumb into the existing SMB1 oplock system.
Seems to work but needs more tests (to be added).

Jeremy.
2010-04-24 00:29:41 -07:00
Jeremy Allison
e15939b456 Plumb SMB2 stubs into all the places we defer SMB1 operations.
Rename functions to be internally consistent. Next step is
to cope queueing single (non-compounded) SMB2 requests to
put some code inside the stubs.

Jeremy.
2010-04-09 19:26:34 -07:00
Jeremy Allison
3413cf7a6b Start to plumb smb2 into the oplock system. Calls dummy functions for now.
Jeremy.
2010-04-07 19:00:44 -07:00
Stefan Metzmacher
d60f049eaf s3:smbd: implement SMB2 Cancel correctly.
metze
2009-08-17 09:25:45 +02:00
Stefan Metzmacher
1df883aa39 libcli: move some common SMB and SMB2 stuff into libcli/smb/
This will hold code that's shared between source3 and source4.

metze
2009-08-12 18:28:32 +02:00
Stefan Metzmacher
9aa1d25907 s3:smbd: rename conn => sconn for smbd_server_connection structs
This should avoid confusion between smbd_server_connection
and connection_struct variables.

metze
2009-08-08 10:48:39 +02:00
Volker Lendecke
79fd60dd38 Fix a few uninitialized variable warnings
I know those warnings are bogus, but both Coverity and gcc don't get it.
2009-07-24 10:23:04 -04:00
Stefan Metzmacher
74860465ac s3:smbd: add marshalling layer for SMB2 Break support (SMB 2.002 only)
metze
2009-07-02 22:25:49 +02:00