1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
Commit Graph

1008 Commits

Author SHA1 Message Date
Kai Blin
57ea909b32 libwbclient: Add async call framework. 2009-05-30 09:17:37 +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
Jelmer Vernooij
80420745ff Add a new non-convenience version of push_codepoint. 2009-04-23 17:50:18 +02:00
Andrew Tridgell
d380c49791 use the tevent nesting code to avoid the uid problem in the VFS
backend

The vfs_unixuid module changes the uid of the process when executing
operations on behalf of the user. Within the VFS backend we may rely
on semi-async calls, such as winbind calls, which will call the event
loop again. To cope with this we need to ensure that while inside
those calls we revert the uid to root, then revert back to the
connected user when we have finished with the semi-async calls.
2009-03-19 11:23:49 +11:00
Stefan Metzmacher
66b2604ef1 s4:ntvfs_generic: use talloc_get_type() to remote compiler warnings
metze
2009-02-13 13:44:36 +01:00
Stefan Metzmacher
d25a3c749f s4:pvfs_aio: fix compiler warning
metze
2009-02-05 17:48:09 +01:00
Stefan Metzmacher
fdd6c106cf s4:pvfs: remove compiler warning
metze
2009-02-05 17:48:08 +01:00
Stefan Metzmacher
3d6587c777 s4:pvfs: use talloc_get_type() to cast from void *
metze
2009-02-05 17:48:07 +01:00
Stefan Metzmacher
5fbbddec35 s4:pvfs: fix some talloc related compiler warnings
metze
2009-02-05 17:48:06 +01:00
Stefan Metzmacher
0ac7792e02 s4:libcliraw: s/private/private_data
metze
2009-02-02 13:08:51 +01:00
Stefan Metzmacher
5e9ee54060 s4:ntvfs/unixuid: s/private/priv
metze
2009-02-02 13:08:34 +01:00
Stefan Metzmacher
7bb4461644 s4:ntvfs/smb2: s/private/p
metze
2009-02-02 13:08:34 +01:00
Stefan Metzmacher
42f92109d2 s4:ntvfs/simple: s/private/p
metze
2009-02-02 13:08:33 +01:00
Stefan Metzmacher
2110ef3c5d s4:ntvfs/posix: s/private/private_data
metze
2009-02-02 13:08:33 +01:00
Stefan Metzmacher
7ee87c339b s4:ntvfs/nbench: s/private/nprivates
metze
2009-02-02 13:08:33 +01:00
Stefan Metzmacher
8a95f4d2d6 s4:ntvfs/ipc: s/private/ipriv
metze
2009-02-02 13:08:32 +01:00
Stefan Metzmacher
33e8f47725 s4:ntvfs/common: s/private/private_data
metze
2009-02-02 13:08:32 +01:00
Stefan Metzmacher
0c64c213e8 s4:ntvfs/cifs_posix_cli: s/private/p
metze
2009-02-02 13:08:31 +01:00
Stefan Metzmacher
24fb16f1f6 s4:ntvfs/cifs/: s/private/p
metze
2009-02-02 13:08:31 +01:00
Stefan Metzmacher
50ad5239fd s4:ntvfs: s/private/private_data
metze
2009-02-02 13:08:30 +01:00
Simo Sorce
380874ef86 Fix the mess with ldb includes.
Separate again the public from the private headers.

Add a new header specific for modules.
Also add service function for modules as now ldb_context and ldb_module are
opaque structures for them.
2009-01-30 01:02:03 -05:00
Andrew Tridgell
c81863e868 added support for stream renames in Samba4
This allows the RAW-STREAMS test to work again. We still have some
limitations though:

  - renames of a stream to the default stream doesn't work
  - delete on close handling between streams and the main file 
    is still broken
2009-01-07 16:46:34 +11:00
Stefan Metzmacher
033428d7da tevent: move samba4 stuff from libtevent.m4 to samba.m4
metze
2009-01-04 18:57:18 +01:00
Stefan Metzmacher
b1be241ca5 s4:sysdep/inotify: use tevent_fd_set_auto_close()
metze
2009-01-03 19:58:52 +01:00
Stefan Metzmacher
183c379fe5 s4:lib/tevent: rename structs
list=""
list="$list event_context:tevent_context"
list="$list fd_event:tevent_fd"
list="$list timed_event:tevent_timer"

for s in $list; do
	o=`echo $s | cut -d ':' -f1`
	n=`echo $s | cut -d ':' -f2`
	r=`git grep "struct $o" |cut -d ':' -f1 |sort -u`
	files=`echo "$r" | grep -v source3 | grep -v nsswitch | grep -v packaging4`
	for f in $files; do
		cat $f | sed -e "s/struct $o/struct $n/g" > $f.tmp
		mv $f.tmp $f
	done
done

metze
2008-12-29 20:46:40 +01:00
Stefan Metzmacher
af29b82536 s4:pvfs_aio: use tevent
metze
2008-12-29 19:57:07 +01:00
Stefan Metzmacher
635a973be5 s4:sys_lease_linux: use tevent
metze
2008-12-29 19:57:00 +01:00
Stefan Metzmacher
e36d64728f s4:cluster: remove old/broken ctdb code
We don't need a full copy of ctdb...
If we want to readd cluster support,
we should just use a ctdb client library.

metze
2008-12-29 14:46:09 +01:00
Stefan Metzmacher
a7036d2bd0 s4: Revert "r24284: change brlock_tdb.c to use the dbwrap API. This actually makes the"
This reverts commit 4792285282.

Conflicts:

	source4/ntvfs/common/brlock_tdb.c
	source4/ntvfs/common/config.mk
2008-12-29 14:46:06 +01:00
Jelmer Vernooij
dcc4081f75 Fix more compiler warnings. 2008-12-23 23:22:57 +01:00
Jelmer Vernooij
8df6af213a Use 32-bit smbpid in interface as required by SMB2, in line with
1bdd08227e.
2008-12-23 23:02:54 +01:00
Jelmer Vernooij
bd64688c6a Fix more compiler warnings in various places. 2008-12-23 22:57:11 +01:00
Tim Prouty
d031472227 s4: Fix include path to work with tevent 2008-12-18 15:03:37 -08:00
Stefan Metzmacher
71b3582fe4 s4:ntvfs_generic: pass RAW-OPEN again
This is the samba4 version of commit
9391dad85d

metze
2008-12-18 13:32:49 +01:00
Stefan Metzmacher
081f8883ba s4: fix LIBEVENTS dependencies and use more forward declarations
We should only include events.h where we really need it
and prefer forward declarations of 'struct event_context'

metze
2008-12-17 11:04:45 +01:00
Jelmer Vernooij
0f04beff33 Rename dom_sid.idl -> server_id.idl (since it no longer actually contains the dom_sid). No longer include it from security.idl. 2008-12-16 15:36:18 +01:00
Sam Liddicott
39e468f558 vfs_cifs - Use ntvfs request transport close to close downstream session
When upstream session closes, close the downstream session

Signed-off-by: Sam Liddicott <sam@liddicott.com>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-05 12:52:19 +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
Stefan Metzmacher
84b2db8d51 s4:pvfs: correctly check stream names
metze
2008-12-01 14:41:29 -08:00
Stefan Metzmacher
7c07be9cab s4:pvfs: return the correct error code for invalid names
metze
2008-12-01 14:40:51 -08:00
Jelmer Vernooij
a9dbd73b2f Remove last instance of global_loadparm. 2008-11-02 19:32:50 +01:00
Jelmer Vernooij
29a20af75f Remove use of global_loadparm for SMB2 client connections. 2008-11-02 16:20:00 +01:00
Jelmer Vernooij
ff36c52d8c Remove another use of global_loadparm.
Eventually, we should move some of these parameters into a separate
struct (perhaps into smb_transport_options?), to avoid the long lists of
parameters.
2008-11-02 16:07:28 +01:00
Jelmer Vernooij
7a6190e9a7 Remove another use of global_loadparm. 2008-11-02 01:03:26 +01:00
Jelmer Vernooij
d9cbf2b0d9 Remove another use of global_loadparm. 2008-11-01 23:26:36 +01:00
Jelmer Vernooij
7942333712 Remove another use of global_loadparm. 2008-11-01 23:09:18 +01:00
Andrew Tridgell
b1b58a1dcf use glibc sys/inotify.h header
when we first added the inotify code glibc didn't have the inotify
functions yet. Now that it does we can use the official header and
avoid the asm/unistd.h syscall workaround
2008-10-30 15:53:46 +11:00
Stefan Metzmacher
b99926ca5e s4: ntvfs/posix: to set a DACL at open time SEC_DESC_DACL_PRESENT must be set
metze
2008-10-28 17:13:21 +01:00
Jelmer Vernooij
23302413b3 Remove unused include param/param.h. 2008-10-24 16:37:56 +02:00
Jelmer Vernooij
c3415b3e57 Add version of next_codepoint without iconv_convenience. 2008-10-24 16:00:43 +02:00