summaryrefslogtreecommitdiff
path: root/source4/smb_server/smb/reply.c
AgeCommit message (Collapse)AuthorFilesLines
2010-03-05s4-pvfs: move the private ntcreatex flags to private_flagsAndrew Tridgell1-6/+1
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
2010-02-02Change uint_t to unsigned int in source4Matt Kraai1-3/+3
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-10-17s4-smbserver: removed bogus initialisation of two union armsAndrew Tridgell1-1/+0
Thanks to Metze for spotting this.
2009-10-15s4-smb: fill in fnum as well for root_fidAndrew Tridgell1-0/+1
This helps with the CIFS NTVFS backend, but doesn't solve all problems
2009-10-15s4-smb: declare root_fid as a file handleAndrew Tridgell1-1/+1
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.
2009-08-05on buffer overflow windows gives SMBSRV:ERRerror hereAndrew Tridgell1-1/+1
2009-08-04fixed support for readx greater than 64kAndrew Tridgell1-1/+2
This fixes bug 6547, where smbclient in S3 reads more than 64k at a time with readx.
2009-05-20Have ntvfs_connect() accept union smb_tcon *tcon instead of char* sharenameSam Liddicott1-22/+2
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-04-23Add async support for reply_tcon* and ntvfs_connectSam Liddicott1-50/+104
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>
2008-07-24make sure we initialise query_maximal_accessAndrew Tridgell1-0/+1
(This used to be commit 036f73d39a7ef882fd76afcd3c11eef483f6c308)
2008-05-28make sure we send a reply packet for bad create optionsAndrew Tridgell1-1/+2
(This used to be commit f9b94f62998aef5f5f3879ac3cfba93016fa521b)
2008-05-26stricter checks for valid inputs in SMB2 open and lockAndrew Tridgell1-0/+5
(This used to be commit a7b5689a73adde59de28770aa3949660441291ea)
2008-02-14Convert SMB and SMB2 code to use a common buffer handling structureAndrew Tridgell1-47/+47
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)
2007-10-10r25551: Convert to standard bool type.Jelmer Vernooij1-3/+3
(This used to be commit c9651e2c5c078edee7b91085e936a93625c8d708)
2007-10-10r23792: convert Samba4 to GPLv3Andrew Tridgell1-3/+2
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)
2007-10-10r17283: use the async calls of auth_check_password() and gensec_update()Stefan Metzmacher1-109/+128
in the smb server. metze (This used to be commit 216e02c69cf5914487f0000d836d1082795487b2)
2007-10-10r16979: - ntcancel should compare TID,UID,MID and PIDStefan Metzmacher1-3/+10
- don't return ntcancel error, as we don't know how signing works for them metze (This used to be commit 20311e58d512e9fcc38ce786aaecf7246d182ca4)
2007-10-10r16950: remove the smb mid from the ntvfs layer and keep a list of pendingStefan Metzmacher1-5/+18
requests on the smbsrv_connection, to be able to match then on ntcancel metze (This used to be commit 04f0d3d03179b6060fd013b867d13caa92ec6460)
2007-10-10r15827: fixed a spelling errorAndrew Tridgell1-1/+1
(This used to be commit 801357af2ef80fe270750c084a78142711ae9e6c)
2007-10-10r15734: This is a major change to the NTVFS subsystem:Stefan Metzmacher1-84/+145
- 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)
2007-10-10r15718: - split the SMBflush with the 0xFFFF wildcard fnum into a different ↵Stefan Metzmacher1-1/+9
level metze (This used to be commit 95bf41b4d4ec96349802955e364fe44ef85f9077)
2007-10-10r14644: fix SMBecho, used by w2k clients, failing this,Stefan Metzmacher1-1/+1
causes an SMBulogoffX and SMBtdis jelmer: I think this should go into TP2 metze (This used to be commit 94d775c74d611e950bb5502bfe7f7c4015c6f772)
2007-10-10r14541: separate smbsrv_request and ntvfs_request,Stefan Metzmacher1-483/+273
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)
2007-10-10r14502: Supply both needed arguments for the backend logoff processing.Andrew Bartlett1-0/+2
This should fix the segfaults on the build farm. Metze: please check Andrew Bartlett (This used to be commit fb927a71173eba2bd33bbb9ea589b63f5e33b3f2)
2007-10-10r14487: split smbsrv_request into two parts, one will be moved to ntvfs_requestStefan Metzmacher1-0/+2
but I don't to get the commit to large, to I'll do this tomorrow... metze (This used to be commit 10e627032d7d04f1ebf6efed248c426614f5aa6f)
2007-10-10r14485: mark smb commands as need session and need tcon explicit,Stefan Metzmacher1-43/+0
so we only need to check in one global place and can't forget in other places... metze (This used to be commit 742be8e075651c3b7e502ec6da01286fd7a2d4ca)
2007-10-10r14464: Don't include ndr_BASENAME.h files unless strictly required, insteadJelmer Vernooij1-0/+1
try to include just the BASENAME.h files (containing only structs) (This used to be commit 3dd477ca5147f28a962b8437e2611a8222d706bd)
2007-10-10r14256: - rename smb_file -> smb_handleStefan Metzmacher1-41/+41
- move it into the in/out substructs again - allow file.path only on smb_fileinfo/smb_setfileinfo metze (This used to be commit be6d5298a2cdb7e7c61d70471bad445645af5963)
2007-10-10r14208: removed use of req->flags2 inside the ntvfs layer. This should helpAndrew Tridgell1-0/+5
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)
2007-10-10r14173: change smb interface structures to always useStefan Metzmacher1-47/+47
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)
2007-10-10r14157: - pass a struct ntvfs_request to the ntvfs layerStefan Metzmacher1-6/+6
(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)
2007-10-10r14016: use type safe talloc when constructing operation structures in smb ↵Andrew Tridgell1-38/+43
server (This used to be commit 78dd6b3e0cd4f048e9b0317107ceb59198fc2bee)
2007-10-10r13877: remove smbsrv_send_dos_error() and use ↵Stefan Metzmacher1-6/+6
smbsrv_send_error(..,NT_STATUS_DOS()) metze (This used to be commit 60d7920527cd0e4142427fa59b9e617d99e3d984)
2007-10-10r13872: fix typoStefan Metzmacher1-1/+1
metze (This used to be commit f28fb440d59401fb8ba5b8eb7868f0063d151693)
2007-10-10r13870: prefix more functions with smbsrv_Stefan Metzmacher1-114/+114
metze (This used to be commit e6275db7b926d3660ad4a0f40041a5129001427a)
2007-10-10r13868: remove useless talloc_free() wrapperStefan Metzmacher1-4/+4
metze (This used to be commit bd3162e6a7f154630c2d88be70ce19e8dd977133)
2007-10-10r13866: prefix more functions with smbsrv_Stefan Metzmacher1-5/+5
metze (This used to be commit bb083f17c961964dd99185ae4194596ccaafd4a8)
2007-10-10r13865: prefix functions with smbsrv_Stefan Metzmacher1-57/+57
metze (This used to be commit 2af96632757ee4bb0261b1871100008b48c5fd4d)
2007-10-10r13862: rename chain_reply -> smbsrv_chain_replyStefan Metzmacher1-10/+10
metze (This used to be commit 497b219c7d7ec15d1d25e174a7287b7da8d02403)
2007-10-10r12608: Remove some unused #include lines.Jelmer Vernooij1-1/+0
(This used to be commit 70e7449318aa0e9d2639c76730a7d1683b2f4981)
2007-10-10r12528: Add seperate proto headers for ntvfs, tdr, smb_server and nbt_server.Jelmer Vernooij1-0/+1
(This used to be commit 87f665a1d5ba74289974bf9d8f9441c162e6f1b1)
2007-10-10r12102: for SMB2 we need to allocate tcons per sessionStefan Metzmacher1-2/+2
metze (This used to be commit 4d527ac005086c2db954578b4126ca128e436e01)
2007-10-10r11786: move all SMB protocol specific stuff to smb_server/smb/Stefan Metzmacher1-0/+2461
metze (This used to be commit 5fea278cb65076cea71bb6c921e51c4feffc37d7)