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

25 Commits

Author SHA1 Message Date
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
50ad5239fd s4:ntvfs: s/private/private_data
metze
2009-02-02 13:08:30 +01:00
Jelmer Vernooij
afe3e8172d Install public header files again and include required prototypes.
(This used to be commit 47ffbbf674)
2008-04-02 04:53:27 +02:00
Jelmer Vernooij
2151cde580 r25554: Convert last instances of BOOL, True and False to the standard types.
(This used to be commit 566aa14139)
2007-10-10 15:07:55 -05:00
Andrew Tridgell
0479a2f1cb r23792: convert Samba4 to GPLv3
There are still a few tidyups of old FSF addresses to come (in both s3
and s4). More commits soon.
(This used to be commit fcf38a38ac)
2007-10-10 14:59:12 -05:00
Stefan Metzmacher
42c1ef4025 r23067: use 'const union smb_search_data *file' also in the server code to get rid
of compiler warnings in the cifs backend

metze
(This used to be commit 34ef07b1f5)
2007-10-10 14:52:47 -05:00
Stefan Metzmacher
a8958391e8 r16980: - make struct smb_notify a union and add levels RAW_NOTIFY_NTTRANS,RAW_NOTIFY_SMB2
- parse SMB2 Notify reponse

metze
(This used to be commit de50e0ccdd)
2007-10-10 14:10:06 -05:00
Stefan Metzmacher
9ef33f5f5c r15734: This is a major change to the NTVFS subsystem:
- to use a struct ntvfs_handle instead of a uint16_t fnum.
  (to make it independend from the frontend protocol)
- the allocation of handles now is provided by the frontend
  (smbsrv_*) via callbacks and not by each backend module
- this also makes sure that file handles are only passed
  to the ntvfs subsystem when the tcon and session matches,
  so modules can rely on this and need to check this.
- this allows multiple modules in the ntvfs module chain
  to allocate file handles. This can be used for virtual
  files like "\\$Extend\\$Quota:$Q:$INDEX_ALLOCATION"...
- also this will make SMB2 with 128 bit file handles possible

metze
(This used to be commit 287fc1c22d)
2007-10-10 14:08:10 -05:00
Stefan Metzmacher
ad06a8bd65 r14736: - the ntvfs subsystem should not know about smb_server.h
- the process module subsystem should not know about smb_server.h
- the smb_server module should not know about process models

metze
(This used to be commit bac95bb8f4)
2007-10-10 13:59:17 -05:00
Andrew Tridgell
582c039ab1 r14613: fixed ntvfs_notify_next()
(This used to be commit 9bf7d322d0)
2007-10-10 13:59:01 -05:00
Andrew Tridgell
9225c02aee r14539: get rid of a pointless union layer in struct smb_notify
(This used to be commit 1e1c559381)
2007-10-10 13:58:41 -05:00
Stefan Metzmacher
d3087451c4 r14487: split smbsrv_request into two parts, one will be moved to ntvfs_request
but I don't to get the commit to large, to I'll do this tomorrow...

metze
(This used to be commit 10e627032d)
2007-10-10 13:57:32 -05:00
Stefan Metzmacher
2e7df84576 r14456: don't access the smbsrv_tcon inside the ntvfs modules
metze
(This used to be commit 5709c1c4e1)
2007-10-10 13:57:26 -05:00
Stefan Metzmacher
307e43bb56 r14173: change smb interface structures to always use
a union smb_file, to abtract
- const char *path fot qpathinfo and setpathinfo
- uint16_t fnum for SMB
- smb2_handle handle for SMB2

the idea is to later add a struct ntvfs_handle *ntvfs
so that the ntvfs subsystem don't need to know the difference between SMB and SMB2

metze
(This used to be commit 2ef3f59709)
2007-10-10 13:56:57 -05:00
Stefan Metzmacher
86497db611 r14157: - pass a struct ntvfs_request to the ntvfs layer
(for now we just do #define ntvfs_request smbsrv_request,
   but it's the first step...)
- rename ntvfs_openfile() -> ntvfs_open()
- fix the talloc hierachie in some places in the ntvfs_map_*() code

metze
(This used to be commit ed9ed1f48f)
2007-10-10 13:56:55 -05:00
Stefan Metzmacher
30b4212a1a r14037: add ntvfs_next_notify()
metze
(This used to be commit d4c0f8900e)
2007-10-10 13:52:37 -05:00
Andrew Tridgell
418befec18 r14011: - added a ntvfs_notify op to allow backends to support change notify
- converted the nttrans server side code to be async (needed for change notify)

This is the start of some work on supporting change notify via a new
approach. More soon.
(This used to be commit 0ad70bfd83)
2007-10-10 13:52:36 -05:00
Stefan Metzmacher
69f7c004fe r12838: make the ntvfs function public
metze
(This used to be commit 41a564fdba)
2007-10-10 13:50:04 -05:00
Jelmer Vernooij
0a3c167f6b r12528: Add seperate proto headers for ntvfs, tdr, smb_server and nbt_server.
(This used to be commit 87f665a1d5)
2007-10-10 13:47:51 -05:00
Andrew Tridgell
94efb6f70e r9074: cope with a null ntvfs context in disconnect, so the destructor that
runs on a failed ntvfs init works
(This used to be commit dac0be64c7)
2007-10-10 13:31:14 -05:00
Andrew Tridgell
c870ae8b89 r3528: added support for the SMBntcancel() operation, which cancels any
outstanding async operation (triggering an immediate timeout).

pvfs now passes the RAW-MUX test
(This used to be commit 3423e2f414)
2007-10-10 13:05:28 -05:00
Andrew Tridgell
aa34fcebf8 r3466: split out request.h, signing.h, and smb_server.h
(This used to be commit 7c4e6ebf05)
2007-10-10 13:05:17 -05:00
Andrew Tridgell
2df2d1b67f r3461: another place where "open" was used as a structure element
(This used to be commit 1087ea830e)
2007-10-10 13:05:16 -05:00
Andrew Tridgell
142d295aa8 r3039: This solves the problem of async handlers in ntvfs backends not being
in the right state when called. For example, when we use the unixuid
handler in the chain of handlers, and a backend decides to continue a
call asynchronously then we need to ensure that the continuation
happens with the right security context.

The solution is to add a new ntvfs operation ntvfs_async_setup(),
which calls all the way down through the layers, setting up anything
that is required, and takes a private pointer. The backend wanting to
make a async calls can use ntvfs_async_setup() to ensure that the
modules above it are called when doing async processing.
(This used to be commit a256e71029)
2007-10-10 13:00:01 -05:00
Stefan Metzmacher
dcad0f6fd4 r2751: this is a new ntvfs design which tries to solve:
- the stacking of modules
- finding the modules private data
- hide the ntvfs details from the calling layer
- I set NTVFS_INTERFACE_VERSION 0 till we are closer to release
  (because we need to solve some async problems with the module stacking)

metze
(This used to be commit 3ff03b5cb2)
2007-10-10 12:59:30 -05:00