Age | Commit message (Collapse) | Author | Files | Lines |
|
Guenther
|
|
metze
|
|
metze
|
|
Re-using two of the create_options bits was bound to eventually
cause problems, and indeed, Windows7 now uses one of those bits
when opening text files.
Fixes bug 7189
|
|
Signed-off-by: Stefan Metzmacher <metze@samba.org>
|
|
Thanks to Metze for spotting this.
|
|
This helps with the CIFS NTVFS backend, but doesn't solve all problems
|
|
In order to implement root_fid in the s4 SMB server we need to declare
it as a handle type, just as for other fnum values in SMB. This
required some extensive (but simple) changes in many bits of code.
|
|
|
|
This fixes bug 6547, where smbclient in S3 reads more than 64k at a
time with readx.
|
|
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>
|
|
smbsrv_tcon_backend no longer creates the ntvfs_request wrapper,
so smbsrv_reply_tcon* can now do this and then invoke ntvfs_connect
in the typical manner using SMBSRV_SETUP_NTVFS_REQUEST and
SMBSRV_CALL_NTVFS_BACKEND
Previously smbsrv_tcon_backend has been responsible for instantiating
the ntvfs_module_context to service a tree-connect request, and
then create an ntvfs_request wrapper around the smbsrv_request
and pass this to ntvfs_connect for the newly created ntvfs.
These actions could not be invoked asynchronously.
This meant that any client requests made while instantiating the
ntvfs module, including any composite's used during authentication
(or related client connections for the case of proxy modules)
would block other ntvfs modules and requests in the current process as
they executed a nested event loop to await completion.
Signed-off-by: Sam Liddicott <sam@liddicott.com>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
|
|
(This used to be commit 036f73d39a7ef882fd76afcd3c11eef483f6c308)
|
|
(This used to be commit f9b94f62998aef5f5f3879ac3cfba93016fa521b)
|
|
(This used to be commit a7b5689a73adde59de28770aa3949660441291ea)
|
|
This converts our SMB and SMB2 code to use a common structure "struct
request_bufinfo" for information on the buffer bounds of a packet,
alignment information and string handling. This allows us to use a
common backend for SMB and SMB2 code, while still using all the same
string and blob handling functions.
Up to now we had been passing a NULL req handle into these common
routines from the SMB2 side of the server, which meant that we failed
any operation which did a bounds checked string extraction (such as a
RenameInformation setinfo call, which is what Vista uses for renaming
files)
There is still some more work to be done on this - for example we can
now remove many of the SMB2 specific buffer handling functions that we
had, and use the SMB ones.
(This used to be commit ca6d9be6cb6a403a81b18fa6e9a6a0518d7f0f68)
|
|
(This used to be commit c9651e2c5c078edee7b91085e936a93625c8d708)
|
|
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 fcf38a38ac691abd0fa51b89dc951a08e89fdafa)
|
|
in the smb server.
metze
(This used to be commit 216e02c69cf5914487f0000d836d1082795487b2)
|
|
- don't return ntcancel error, as we don't know how signing works
for them
metze
(This used to be commit 20311e58d512e9fcc38ce786aaecf7246d182ca4)
|
|
requests on the smbsrv_connection, to be able to match then on
ntcancel
metze
(This used to be commit 04f0d3d03179b6060fd013b867d13caa92ec6460)
|
|
(This used to be commit 801357af2ef80fe270750c084a78142711ae9e6c)
|
|
- 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 287fc1c22d670f6e568014b420f7f4cb31dc7958)
|
|
level
metze
(This used to be commit 95bf41b4d4ec96349802955e364fe44ef85f9077)
|
|
causes an SMBulogoffX and SMBtdis
jelmer: I think this should go into TP2
metze
(This used to be commit 94d775c74d611e950bb5502bfe7f7c4015c6f772)
|
|
with this it's now possible to write a
ntvfs_test programm like the vfstest in samba3
also smb2 support will be possible later
metze
(This used to be commit 7253153691e35cd206346fbd4e9b9f95c042f602)
|
|
This should fix the segfaults on the build farm.
Metze: please check
Andrew Bartlett
(This used to be commit fb927a71173eba2bd33bbb9ea589b63f5e33b3f2)
|
|
but I don't to get the commit to large, to I'll do this tomorrow...
metze
(This used to be commit 10e627032d7d04f1ebf6efed248c426614f5aa6f)
|
|
so we only need to check in one global place and can't forget
in other places...
metze
(This used to be commit 742be8e075651c3b7e502ec6da01286fd7a2d4ca)
|
|
try to include just the BASENAME.h files (containing only structs)
(This used to be commit 3dd477ca5147f28a962b8437e2611a8222d706bd)
|
|
- move it into the in/out substructs again
- allow file.path only on smb_fileinfo/smb_setfileinfo
metze
(This used to be commit be6d5298a2cdb7e7c61d70471bad445645af5963)
|
|
metze on his quest to unify the ntvfs strucures for the smb and smb2
servers. The only place we needed flags2 inside ntvfs was for the
FLAGS2_READ_PERMIT_EXECUTE bit, which only affects readx, so I added a
readx.in.read_for_execute flag instead.
(This used to be commit b78abbbce60ab0009da19a72dd769800c44298a2)
|
|
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 2ef3f5970901b5accdb50f0d0115b5d46b0c788f)
|
|
(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 ed9ed1f48f602354810937c0b0de850b44322191)
|
|
server
(This used to be commit 78dd6b3e0cd4f048e9b0317107ceb59198fc2bee)
|
|
smbsrv_send_error(..,NT_STATUS_DOS())
metze
(This used to be commit 60d7920527cd0e4142427fa59b9e617d99e3d984)
|
|
metze
(This used to be commit f28fb440d59401fb8ba5b8eb7868f0063d151693)
|
|
metze
(This used to be commit e6275db7b926d3660ad4a0f40041a5129001427a)
|
|
metze
(This used to be commit bd3162e6a7f154630c2d88be70ce19e8dd977133)
|
|
metze
(This used to be commit bb083f17c961964dd99185ae4194596ccaafd4a8)
|
|
metze
(This used to be commit 2af96632757ee4bb0261b1871100008b48c5fd4d)
|
|
metze
(This used to be commit 497b219c7d7ec15d1d25e174a7287b7da8d02403)
|
|
(This used to be commit 70e7449318aa0e9d2639c76730a7d1683b2f4981)
|
|
(This used to be commit 87f665a1d5ba74289974bf9d8f9441c162e6f1b1)
|
|
metze
(This used to be commit 4d527ac005086c2db954578b4126ca128e436e01)
|
|
metze
(This used to be commit 5fea278cb65076cea71bb6c921e51c4feffc37d7)
|