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

177 Commits

Author SHA1 Message Date
Matt Kraai
d8071e7ed7 Change uint_t to unsigned int in source4
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-02 07:18:18 +01:00
Stefan Metzmacher
577857d351 s4:gensec: change gensec_update_send/recv to tevent_req
metze
2009-12-24 17:38:34 +01:00
Andrew Tridgell
33cbe9c631 s4-server: use GUID_to_ndr_blob() in cldap and smb servers 2009-12-10 17:51:28 +11:00
Andrew Tridgell
f01ea8bf58 s4-smb2: use new GUID function in smb2 negprot 2009-12-10 17:51:27 +11:00
Stefan Metzmacher
b62964d6fe s4:smb_server/smb2: don't reset highest_smb2_seqnum on SMB2 Cancel
metze
2009-11-27 08:19:46 +01:00
Andrew Tridgell
7c158bdb1d s4-smb2: sequence numbers are not checked in SMB2_OP_CANCEL 2009-11-27 16:05:06 +11:00
Steven Danneman
7f14388721 s4/libcli: rename previously reserved field in SMB2 LOCK struct
The lock.in.reserved field has been renamed lock_sequence in the
SMB 2.1 dialect.  See MS-SMB 2.2.26.
2009-11-25 12:55:48 -08:00
Andrew Tridgell
7c807de6b8 s4-smbd: minimise includes in smbd/ and smb_server 2009-09-19 14:11:54 -07:00
Stefan Metzmacher
8d95883908 s4:smb2srv: don't allow the related flag on the first request in a compounded chain
metze
2009-06-09 19:33:46 +02:00
Stefan Metzmacher
959503ed1a s4:smb2srv: correctly fail remaining compounded requests after a failure
metze
2009-06-09 16:49:32 +02:00
Stefan Metzmacher
f55091586d s4:smb2srv: remove old TODO comment, we already check the seqnum
metze
2009-06-09 16:49:31 +02:00
Stefan Metzmacher
7633995fa0 s4:smb2srv: fix handling of multiple compounded requests
metze
2009-06-09 16:49:31 +02:00
Stefan Metzmacher
7b27b5f674 s4:smb2srv: remove the chained file handle on close
metze
2009-06-09 16:49:31 +02:00
Stefan Metzmacher
fadffbae88 s4:smb2srv: We only support SMB 2.002.
We need to loop over all given dialects and check
if we can find SMB2_DIALECT_REVISION_202.

metze
2009-05-26 09:50:45 +02:00
Sam Liddicott
4b21ad9db7 Have ntvfs_connect() accept union smb_tcon *tcon instead of char* sharename
This change brings ntvfs_connect into compliance with other ntvfs functions
which take an ntvfs module, an ntvfs request and an smb io union.

It now becomes the responsibility of ntvfs modules to examine
tcon->generic.level themselves and derive the share name and any other
options
directly; e.g.

	const char *sharename;

	switch (tcon->generic.level) {
	case RAW_TCON_TCON:
		sharename = tcon->tcon.in.service;
		break;
	case RAW_TCON_TCONX:
		sharename = tcon->tconx.in.path;
		break;
	case RAW_TCON_SMB2:
	default:
		return NT_STATUS_INVALID_LEVEL;
	}

	if (strncmp(sharename, "\\\\", 2) == 0) {
		char *p = strchr(sharename+2, '\\');
		if (p) {
			sharename = p + 1;
		}
	}

service.c smbsrv_tcon_backend() is called before ntvfs_connect and fills in
some of the tcon->..out values.
For the case of RAW_TCON_TCONX, it filles out tcon->tconx.out.tid and
tcon->tconx.out.options

For the case of RAW_TCON_TCON it fills out tcon->tcon.out.tid and
tcon->tcon.out.max_xmit

Thus the ntvfs_connect function for vfs modules may override these values
if desired, but are not required to.

ntvfs_connect functions are required to fill in the tcon->tconx.out.*_type
fields, for RAW_TCON_TCONX, perhaps something like:

	if (tcon->generic.level == RAW_TCON_TCONX) {
		tcon->tconx.out.fs_type = ntvfs->ctx->fs_type;
		tcon->tconx.out.dev_type = ntvfs->ctx->dev_type;
	}

Signed-off-by: Sam Liddicott <sam@liddicott.com>

(I fixed the ntvfs_connect() in the smb_server/smb2/
 and the RAW_TCON_SMB2 switch case in the modules)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-05-20 13:32:27 +02:00
Stefan Metzmacher
d51bb8e4e6 s4:smb_server: return after we have processed an invalid smb2 request
metze
2009-05-11 15:59:46 +02:00
Andrew Bartlett
71632a1697 Remove auth/ntlm as a dependency of GENSEC by means of function pointers.
When starting GENSEC on the server, the auth subsystem context must be
passed in, which now includes function pointers to the key elements.

This should (when the other dependencies are fixed up) allow GENSEC to
exist as a client or server library without bundling in too much of
our server code.

Andrew Bartlett
2009-02-13 10:24:16 +11:00
Stefan Metzmacher
5bf95a71dd s4:smb_server: s/private/private_data
metze
2009-02-02 13:08:36 +01:00
Sam Liddicott
7d8f3cdbfc Let ntvfs request transport close via ntvfs_request state
[I can't swear that this covers all the smb2 cases, there are some reply
functions that I can't trace properly]

Add NTVFS_ASYNC_STATE_CLOSE bit to ntvfs_request->async_states->state
so that the ntvfs layer can signify that the client transport should
be closed, most useful for proxy servies, and most likely due to a
forwarding transport having been closed.

Signed-off-by: Sam Liddicott <sam@liddicott.com>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-05 12:52:13 +01:00
Jelmer Vernooij
b034c519f5 Add gensec_settings structure. This wraps loadparm_context for now, but
should in the future only contain some settings required for gensec.
2008-11-02 02:05:48 +01:00
Jelmer Vernooij
23302413b3 Remove unused include param/param.h. 2008-10-24 16:37:56 +02:00
Jelmer Vernooij
922a29992e Remove iconv_convenience parameter from simple string push/pull
functions.
2008-10-24 03:40:09 +02:00
Andrew Tridgell
0cf7175126 we need different error handling for truncated packets in NETPROT and
other SMB2 operations.
2008-09-24 18:58:38 -07:00
Andrew Tridgell
eb5b3f50d1 we should terminate the connection on a bad negprot packet size 2008-09-24 18:10:23 -07:00
Andrew Tridgell
49c80cea0b cope with body_size zero in SMB2 receive 2008-09-24 18:10:23 -07:00
Andrew Tridgell
a3536c4c06 check for a 0 byte in the buffer in SMB2 read 2008-09-24 18:10:23 -07:00
Andrew Tridgell
7e57626d1d the offset is 16 bits in SMB2 fileinfo 2008-09-24 18:10:23 -07:00
Andrew Tridgell
71ae732669 fixed error code for bad keepalive 2008-09-24 18:10:22 -07:00
Andrew Tridgell
ff542275c3 stricter checking of SMB2 echo body (per the spec)
thanks to the bluearc test suite
2008-09-24 18:10:22 -07:00
Stefan Metzmacher
2a36568129 smb2srv: async replies with STATUS_PENDING are not signed
..., but the they may have the sign flag set.

metze
(This used to be commit 43e43dead0)
2008-08-14 13:13:50 +02:00
Stefan Metzmacher
0294c678c0 smb2srv: sign replies when the request was also signed
metze
(This used to be commit dd2f4f7a49)
2008-08-14 13:13:50 +02:00
Stefan Metzmacher
4a214dba30 smb2srv: use defines instead of hex values
metze
(This used to be commit 7c4abf6614)
2008-08-14 13:13:50 +02:00
Stefan Metzmacher
0251096a89 smb2srv: sign SMB2 Logoff replies
metze
(This used to be commit 2844e36173)
2008-07-28 14:09:46 +02:00
Stefan Metzmacher
8623e2cc4c smb2srv: correctly hold the signing state per session
metze
(This used to be commit 5b3ba3f355)
2008-07-28 14:09:45 +02:00
Andrew Tridgell
e4ad580b99 fixed mandatory signing
Metze pointed out that if signing is mandatory in the server then we
need to reject packets without the signed flag if the packet contains
a session id.
(This used to be commit 056f16e664)
2008-06-07 08:14:25 -07:00
Andrew Tridgell
e97cf207fa added server side SMB2 signing
(This used to be commit 8e919dcb08)
2008-06-06 22:10:30 -07:00
Andrew Tridgell
405e64c437 more updates for new info levels
(This used to be commit 85d1873ee9)
2008-06-02 11:05:06 +10:00
Andrew Tridgell
eb8634b2f0 check for requested buffer size in getinfo call
(This used to be commit ed8f16379d)
2008-05-31 13:39:51 +10:00
Andrew Tridgell
6ef9674caa the docs shows that this is a o16s32 blob
(This used to be commit a6d28e2b33)
2008-05-30 07:28:53 +10:00
Andrew Tridgell
de4c962638 fix from WSPP SMB2 test 11
(This used to be commit 81612b7854)
2008-05-29 19:32:04 +10:00
Andrew Tridgell
c86dc11be6 added support for returning the maximal access MXAC tag in SMB2 create
(This used to be commit 4eb49335d5)
2008-05-29 19:16:26 +10:00
Andrew Tridgell
6b70726305 implement the documented SMB2 create blobs in the server
Not all of them are honoured yet, but they are all parsed and the ones
that have SMB equivalents are honoured
(This used to be commit 9fc70e2ed6)
2008-05-28 16:28:37 +10:00
Andrew Tridgell
72739ac0d0 badly formed SMB2 packets get NT_STATUS_INVALID_PARAMETER
(This used to be commit 1c5dd2d1b6)
2008-05-22 13:14:55 +10:00
Andrew Tridgell
aed93a238e fixed SMB2 flush call, and added flush to gentest_smb2
(This used to be commit c52fe1fe1c)
2008-05-21 22:51:21 +10:00
Andrew Tridgell
4d39976ddd fixed SMB2 locking
- SMB2 locking is different in several ways from SMB locking. To fix
  it properly we will need a new generic mapping structure for
  locking, but for now do a best effort mapping

- added locking to gentest_smb2
(This used to be commit ea6d9cf602)
2008-05-21 22:12:20 +10:00
Andrew Tridgell
03eb236f20 Merge commit 'origin/v4-0-test' into vfs_smb2
(This used to be commit 733937e87a)
2008-05-19 11:40:25 +10:00
Jelmer Vernooij
4c70cda986 Fix a couple (well, little more than that..) of typos.
(This used to be commit a6b5211994)
2008-05-18 23:02:47 +02:00
Jelmer Vernooij
4c8756f147 Create prototype headers from Makefile directory, without smb_build in the middle.
(This used to be commit f4a77b96f9)
2008-05-18 22:30:08 +02:00
Jelmer Vernooij
03643aec88 Use variables for source directory in a couple more places.
(This used to be commit c41bd3005f)
2008-05-18 19:54:27 +02:00
Andrew Tridgell
2994b483c8 fixed file_index reference
(This used to be commit edb4b38ed3)
2008-05-16 12:46:16 +10:00