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

76 Commits

Author SHA1 Message Date
Stefan Metzmacher
98c14ca61c s3:smb2_create: do not remove leading backslash from pipe names
metze
2012-05-28 19:51:57 +02:00
Volker Lendecke
1267ced693 s3: Introduce variable "indyniov" for easier reading 2012-04-24 16:44:26 +02:00
Jeremy Allison
21528da9cd Fix a bunch of "unused variable" warnings.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Feb 18 06:22:40 CET 2012 on sn-devel-104
2012-02-18 06:22:40 +01:00
Volker Lendecke
f1db71576a s3-smb2: Use the correct indicator if a request was deferred
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Fri Feb 10 16:44:23 CET 2012 on sn-devel-104
2012-02-10 16:44:23 +01:00
Volker Lendecke
6b87623e9d s3-smb2: Make sure we have a subreq set 2012-02-10 15:06:06 +01:00
Volker Lendecke
bed281dad7 s3: Remove the unused "file_existed" parameter from smbd_calculate_access_mask
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Jan  3 15:16:50 CET 2012 on sn-devel-104
2012-01-03 15:16:49 +01:00
Stefan Metzmacher
704cf10645 s3:smbd: avoid using sconn_server_id()
metze
2011-12-16 13:19:32 +01:00
Stefan Metzmacher
763fe4216b s3:smb2_server: use sconn->ev_ctx instead of sconn->smb2.event_ctx
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Dec 12 16:08:59 CET 2011 on sn-devel-104
2011-12-12 16:08:59 +01:00
Stefan Metzmacher
05246ae623 s3:smb2_create: defer STATUS_PENDING for 2 seconds as before
metze
2011-11-15 17:14:13 +01:00
Stefan Metzmacher
88dd90d928 s3:smb2_server: pass explicit defer_times to smbd_smb2_request_pending_queue()
metze
2011-11-15 17:14:13 +01:00
Stefan Metzmacher
693cb77b2f s3:smb2_server: always send STATUS_PENDING responses, but delayed by 0.5 milliseconds
In future we'll pass the delay from the caller.

metze
2011-11-15 17:14:13 +01:00
Christian Ambach
ec0c1f2c34 s3:smb2_create: fix allocation size return value when opening existing files
at least on GPFS, using the stat information gave wrong results
example: FileInfo gave 12582912000, Create Response gave 25769803776000

This makes the create part use the same method as fileinfo,
matching up the replies of both calls

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Oct 10 21:49:53 CEST 2011 on sn-devel-104
2011-10-10 21:49:53 +02:00
Stefan Metzmacher
1bc93c2605 s3:smb2_server: return OBJECT_NAME_INVALID if the path is terminated in SMB2_CREATE
metze
2011-09-07 10:38:08 +02:00
Stefan Metzmacher
251815bfd3 s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_create.c
metze
2011-09-07 10:38:04 +02:00
Christian Ambach
b58e7bb88e s3:smb2 fix Bug 8428 - wrong reply to DHnC (durable handle reconnect)
According to [MS-SMB2] 3.3.5.9.7
(http://msdn.microsoft.com/en-us/library/cc246784%28v=PROT.13%29.aspx),
smbd must reply with NT_STATUS_OBJECT_NAME_NOT_FOUND as it does not
support durable file-handles yet.

I have seen w2k8r2 running xcopy /C ending up in an endless loop
trying to get back the original file handle from smbd sending the same
requests over and over.

Metze, Jeremy, please check!

Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Aug 30 22:20:36 CEST 2011 on sn-devel-104
2011-08-30 22:20:36 +02:00
Volker Lendecke
f9d183f931 s3: Pass sconn explicitly to open_was_deferred 2011-08-02 19:18:08 +02:00
Stefan Metzmacher
f5d320ac0f s3:smb2_create: use smbd_calculate_access_mask() instead of smbd_check_open_rights()
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Jul 11 22:45:01 CEST 2011 on sn-devel-104
2011-07-11 22:45:01 +02:00
Stefan Metzmacher
601b138e92 s3:smb2_create: call 'return' after smbd_server_connection_terminate()
This is not strictly needed in the fork process model, but we hopefully
support other models in future.

metze
2011-07-04 16:21:45 +02:00
Günther Deschner
50883cfeb4 s3-tevent: only include ../lib/util/tevent wrappers where needed.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Apr 29 14:00:30 CEST 2011 on sn-devel-104
2011-04-29 14:00:30 +02:00
Günther Deschner
8c24ebf371 s3: include smbd/smbd.h where needed.
Guenther
2011-03-30 01:13:08 +02:00
Andrew Tridgell
15e84a9a09 charcnv: removed the allow_badcharcnv and allow_bad_conv options to convert_string*()
we shouldn't accept bad multi-byte strings, it just hides problems

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Mar 24 01:47:26 CET 2011 on sn-devel-104
2011-03-24 01:47:26 +01:00
Jeremy Allison
a65bce4e38 Add uint32_t name_hash argument (currently unused) to get_file_infos().
Will be used when we store more than one delete on close token.
2011-01-25 14:02:18 -08:00
Simo Sorce
849cc65654 s3-smbd: Migrated to new spoolss functions for printing.
Signed-off-by: Jim McDonough <jmcd@samba.org>
2010-07-27 10:27:13 -04:00
Volker Lendecke
e168b85f00 s3: Remove procid_self() from fill_deferred_open_entry() 2010-07-05 11:06:31 +02:00
Volker Lendecke
375ce3c96a s3: Explicitly pass sconn to [remove|schedule]_deferred_open_message_smb2 2010-06-12 15:42:57 +02:00
Volker Lendecke
9747eb45d6 s3: Explicitly pass sconn to open_was_deferred_smb2 2010-06-12 15:42:57 +02:00
Volker Lendecke
c0240dbeec s3: Explicitly pass sconn to find_open_smb2req 2010-06-12 15:42:56 +02:00
Günther Deschner
f9f8007361 s3-build: only use ndr_security.h where needed.
Guenther
2010-05-31 11:32:37 +02:00
Jeremy Allison
d7542b58fc If using fake oplocks, use the correct SMB2 type code for "no oplock".
Jeremy.
2010-05-21 23:59:54 -07:00
Jeremy Allison
82484461e3 Don't forget brackets around bitwise tests.
Jeremy.
2010-05-21 17:12:40 -07:00
Jeremy Allison
b2a7ad8c95 Make DFS work over SMB2.
Jeremy.
2010-05-21 16:56:10 -07:00
Ira Cooper
28b8d42136 s3: added support for fake oplocks in SMB2. 2010-05-21 09:57:33 -07:00
Jeremy Allison
a8a4fe0605 Fix bug #7410 - samba sends "raw" inode number as uniqueid with unix extensions.
Move to a consistent get_FileIndex() function for all inode returns,
that checks if st_dev on the file is identical to the top directory
dev_t of the exported share, and if so uses the raw 64-bit inode
number. If it isn't (we've traversed a mount point) - return what
we used to do for Windows which is the concatination of the bottom
32-bits of the inode with the 32-bit device number. We can get more
creative with this over time (hashing?) if we want as now all inode returns go
through this single function.

Jeremy.
2010-05-20 11:36:47 -07:00
Jeremy Allison
1ad551ce30 After talking with Microsoft engineers, immediately replying
on compound requests on open being deferred for a sharing violation
is a Windows bug. Re-enable the code that simply delays the compound
response if the delay time is less than 2 seconds.

Jeremy.
2010-05-19 20:09:51 -07:00
Jeremy Allison
af44593555 (Finally) fix bug #7158 - SMB2 connection resets during IOZone tests from 64-bit Vista client
It turns out that the persistent handles are used by the Microsoft
redirector to index files on oplock break requests. So even if we
don't do durable handles (yet) we must set the persistent handle
on create. For now just use the same handle value as we use for
volatile.

Jeremy.
2010-05-19 19:28:26 -07:00
Jelmer Vernooij
b8268cf7b0 s3: Remove use of iconv_convenience. 2010-05-18 11:45:31 +02:00
Jeremy Allison
4955ccfff5 Fix more SMB2-OPLOCK bugs. Only 3 more issues to address then we're good to go on this test.
Jeremy.
2010-05-11 14:00:38 -07:00
Jeremy Allison
ae9fe3cc8e SMB2 always have level2 oplock capability. Correct mapping from break messages to SMB2 oplock levels.
Jeremy.
2010-05-10 14:23:44 -07:00
Jeremy Allison
a776933de6 Stop us crashing in SMB2-OPLOCK test. Don't allow more than one outstanding immediate event.
Jeremy.
2010-05-10 13:58:41 -07:00
Jeremy Allison
4e7195be36 Update (C) for 2010.
Jeremy.
2010-04-28 14:56:12 -07:00
Jeremy Allison
1055b3c229 When walking the SMB2 requests queue, ensure the request is still "in flight"
before examining the details.

SMB2 requests stay on the queue until their out.vector has been
send, only then are they talloc_free'd.

Thanks for Ira Cooper <ira@wakeful.net> for giving me the
backtrace showing this.

Jeremy.
2010-04-26 12:29:03 -07:00
Jeremy Allison
6beba782f1 Fix crash when rescheduling oplock open.
Jeremy.
2010-04-26 10:54:33 -07:00
Jeremy Allison
a796542a93 Implement oplocks within SMB2. Plumb into the existing SMB1 oplock system.
Seems to work but needs more tests (to be added).

Jeremy.
2010-04-24 00:29:41 -07:00
Jeremy Allison
2bbb8c917e Allow smb2 create requests to be cancelled.
Jeremy.
2010-04-23 13:10:15 -07:00
Jeremy Allison
350f4e348c At simo's request return struct tevent_req *treq -> treq. For consistency :-(. 2010-04-23 10:53:44 -07:00
Jeremy Allison
2b13a8d650 Rename - no functional change. Stop all variables being called "req".
tevent_req -> treq
struct smb_request -> smb1req
struct smbd_smb2_request -> smb2req

Jeremy.
2010-04-23 10:29:48 -07:00
Jeremy Allison
8f67f873ac Make deferred opens (NT_STATUS_SHARING_VIOLATION) work over SMB2.
Makes SMB2Create call re-entrant internally.
Now this infrastructure is in place, oplocks will follow shortly.
Tested with Win7 client and with W2K8R2.

Jeremy.
2010-04-22 23:52:19 -07:00
Jeremy Allison
c61c9c3a4c Fix for bug #7189 - Open txt files with notepad on samba shares creates problem.
Ensure we don't use any of the create_options for Samba private
use. Add a new parameter to the VFS_CREATE call (private_flags)
which is only used internally. Renumber NTCREATEX_OPTIONS_PRIVATE_DENY_DOS
and NTCREATEX_OPTIONS_PRIVATE_DENY_FCB to match the S4 code).
Rev. the VFS interface to version 28.

Jeremy.
2010-03-05 15:13:37 -08:00
Jeremy Allison
a770caed0f Remove "store create time" code, cause create time to be stored
in the "user.DOSATTRIB" EA. From the docs:
In Samba 3.5.0 and above the "user.DOSATTRIB" extended attribute has been extended to store
the create time for a file as well as the DOS attributes. This is done in a backwards compatible
way so files created by Samba 3.5.0 and above can still have the DOS attribute read from this
extended attribute by earlier versions of Samba, but they will not be able to read the create
time stored there. Storing the create time separately from the normal filesystem meta-data
allows Samba to faithfully reproduce NTFS semantics on top of a POSIX filesystem.
Passes make test but will need more testing.
Jeremy.
2009-11-17 14:55:02 -08:00
Jeremy Allison
16836f9e9e We now pass the Microsoft SMB2 fileio test with EA's and streams...
Jeremy.
2009-09-17 09:29:07 -07:00