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

105 Commits

Author SHA1 Message Date
Ralph Boehme
c2f0fd40da smb: rename NTCREATEX_OPTIONS_PRIVATE_DENY_FCB to NTCREATEX_FLAG_DENY_FCB
Just a shorter name, no change in behaviour.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-10-23 17:44:33 +00:00
Ralph Boehme
6da16727e1 smb: rename NTCREATEX_OPTIONS_PRIVATE_DENY_DOS to NTCREATEX_FLAG_DENY_DOS
Just a shorter name, no change in behaviour.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2020-10-23 17:44:33 +00:00
Matthew DeVore
232054c09b lib/util: remove extra safe_string.h file
lib/util/safe_string.h is similar to source3/include/safe_string.h, but
the former has fewer checks. It is missing bcopy, strcasecmp, and
strncasecmp.

Add the missing elements to lib/util/safe_string.h remove the other
safe_string.h which is in the source3-specific path. To accomodate
existing uses of str(n?)casecmp, add #undef lines to source files where
they are used.

Signed-off-by: Matthew DeVore <matvore@google.com>
Reviewed-by: David Mulder <dmulder@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Aug 28 02:18:40 UTC 2020 on sn-devel-184
2020-08-28 02:18:40 +00:00
Christof Schmitt
73d452305f ntvfs: Use NT_STATUS_NOTIFY_ENUM_DIR instead of STATUS_NOTIFY_ENUM_DIR
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2020-06-22 12:07:38 +00:00
David Mulder
18db8bd9c4 Implement alt name query for smb2
Implements smb2_qpathinfo_alt_name() and
RAW_FILEINFO_SMB2_ALT_NAME_INFORMATION.

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 097df343ce21c8340aee7f42f233fe74b92b47e2)
2020-04-28 18:09:39 +00:00
Stefan Metzmacher
0c60231919 s4:libcli/raw: add RAW_FILEINFO_NORMALIZED_NAME_INFORMATION support
This is supported over the wire in SMB 3.1.1 on starting with
Windows 10 1803.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13919

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-05-01 17:22:26 +00:00
ouyang.xu
98ea4a2219 pvfs_open win10 fix, need return SMB2_CREATE_TAG_QFID
Signed-off-by: kkhaike <kkhaike@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>

Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Fri Aug 19 09:35:15 CEST 2016 on sn-devel-144
2016-08-19 09:35:14 +02:00
David Disseldorp
d1e664f154 s4/ntvfs: support FS_SECTOR_SIZE_INFORMATION query-info
Return the same values as used by s3fs.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-03-18 18:57:21 +01:00
Stefan Metzmacher
3e9cc501ab s4:ntvfs: explicitly handle RAW_FILEINFO_UNIX_{BASIC,LINK} in ntvfs_map_fileinfo()
This avoids compiler warnings.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-25 07:25:45 +01:00
Stefan Metzmacher
96ada4d87b s4:ntvfs: add '_fn' suffix to all ntvfs_ops function pointers
This hopefully fixes the build on systems where _LARGE_FILES
triggers defines of syscalls e.g. '#define lseek lseek64'
on AIX.

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Jun 13 11:03:15 CEST 2012 on sn-devel-104
2012-06-13 11:03:15 +02:00
Matthias Dieter Wallnöfer
75e77f9fa0 s4:ntvfs subsystems - rework it using concrete enum values
This changes commit 260bc987b0 to comply
with metze's plans.
2011-06-16 09:05:31 +02:00
Matthias Dieter Wallnöfer
260bc987b0 s4:ntvfs subsystem - quiet enum warnings
Simply return "NT_STATUS_INVALID_LEVEL" for unknown types of requests.

Reviewed-by: Tridge
2011-06-09 10:53:36 +02:00
Andrew Tridgell
80a37beb53 s4-pvfs: move the private ntcreatex flags to private_flags
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-03-05 16:12:05 +11:00
Matt Kraai
d8071e7ed7 Change uint_t to unsigned int in source4
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-02 07:18:18 +01:00
Andrew Tridgell
b3115f5cdc s4-ntvfs: win7 does not check for the NONE smb2 lock flag on unlock 2009-11-27 19:42:10 +11:00
Andrew Tridgell
186ea099c5 s4-ntvfs: move valid lock range test from smb2 layer to generic code
win7 also fails invalid lock ranges on SMB
2009-11-27 19:42:10 +11:00
Andrew Tridgell
04f235a9eb s4-smb2: check for invalid SMB2 lock ranges 2009-11-27 16:05:05 +11:00
Andrew Tridgell
aa4c516023 s4-smb2: check for an invalid lock flags combination
UNLOCK with FAIL_IMMEDIATELY is not allowed
2009-11-27 16:05:05 +11:00
Stefan Metzmacher
77f335042b s4:ntvfs_generic: check for valid SMB2_LOCK flags
metze
2009-11-18 08:24:13 +01:00
Andrew Tridgell
3c028ff88b s4-smb: declare root_fid as a file handle
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-10-15 20:03:00 +11:00
Sam Liddicott
131c95edda Upgrade ntvfs_map_*info to ntvfs_map_async_setup/ntvfs_map_async_finish
ntvfs_map_fsinfo, ntvfs_map_qpathinfo, ntvfs_map_qfileinfo used an
old synchronous mapping technique, acceptable on the grounds that
they were only used by the simple vfs which was synchronous.

Other vfs may/do use these functions, and by upgrading them to use the
ntvfs_map_async_setup/ntvfs_map_async_finish framework, they can now be
used asynchronously.

Signed-off-by: Sam Liddicott <sam@liddicott.com>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-06-26 14:39:44 +02: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
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
Andrew Tridgell
f4e212323f added some debug code 2008-09-23 12:09:56 +10:00
Stefan Metzmacher
548ed8d958 ntvfs_generic: fix handling of create_options for SMB2
metze
(This used to be commit cbd585d2a1)
2008-08-14 13:13:51 +02:00
Andrew Tridgell
538f624fe0 it is not valid to set a UNLOCK flag on a lock request
(This used to be commit 63f3155729)
2008-06-03 09:36:02 +10:00
Andrew Tridgell
8da3217d1b smbpid is 32 bit, and update SMB2 locking per MS-SMB2
The UNLOCK bit is only used from the first lock structure
(This used to be commit 9483b7c137)
2008-06-02 11:04:13 +10:00
Andrew Tridgell
c86dc11be6 added support for returning the maximal access MXAC tag in SMB2 create
(This used to be commit 4eb49335d5)
2008-05-29 19:16:26 +10:00
Andrew Tridgell
6b70726305 implement the documented SMB2 create blobs in the server
Not all of them are honoured yet, but they are all parsed and the ones
that have SMB equivalents are honoured
(This used to be commit 9fc70e2ed6)
2008-05-28 16:28:37 +10:00
Andrew Tridgell
8daeee5c5d ensure that we honor SMB2 read min_count properly
(This used to be commit 318038d6f6)
2008-05-27 18:20:23 +10:00
Andrew Tridgell
beac55a88f enforce lock ordering in SMB2
(This used to be commit 3bec932a89)
2008-05-27 17:22:02 +10:00
Andrew Tridgell
cb36437db2 added support for the output fields of SMB2 close
(This used to be commit 2633bc7497)
2008-05-27 16:43:36 +10:00
Andrew Tridgell
848e7c5830 it seems that lock flags are only validated when UNLOCK is set
(This used to be commit d1bde5830c)
2008-05-27 16:02:10 +10:00
Andrew Tridgell
506849f600 check invalid create options in the right order
(This used to be commit 73dbfb9b41)
2008-05-27 12:42:43 +10:00
Andrew Tridgell
2ad2bdda89 stricter checks for valid inputs in SMB2 open and lock
(This used to be commit a7b5689a73)
2008-05-26 15:02:43 +10:00
Andrew Tridgell
2e0f61a18a SMB2 read returns NT_STATUS_END_OF_FILE on read past end of file
(This used to be commit 1590494daf)
2008-05-22 23:07:16 +10:00
Andrew Tridgell
4d39976ddd fixed SMB2 locking
- SMB2 locking is different in several ways from SMB locking. To fix
  it properly we will need a new generic mapping structure for
  locking, but for now do a best effort mapping

- added locking to gentest_smb2
(This used to be commit ea6d9cf602)
2008-05-21 22:12:20 +10:00
Stefan Metzmacher
39d2302721 ntvfs_generic: map RAW_LOCK_SMB2_BREAK to RAW_LOCK_GENERIC
metze
(This used to be commit b781bb733c)
2008-04-19 01:54:45 +02:00
Stefan Metzmacher
b2f2c1486e ntvfs_generic: fix mapping the granted oplocks for SMB2
metze
(This used to be commit 60c4a4fc1a)
2008-04-19 01:54:42 +02:00
Stefan Metzmacher
baad7a7e56 ntvfs_generic: map SMB2 oplock levels to the generic ones
metze
(This used to be commit 9013748273)
2008-04-17 03:54:26 +02:00
Andrew Tridgell
275f32ae2d fill in unknown fields in SMB2 READ call
(This used to be commit 9b686c1380)
2008-04-14 11:31:17 +02: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
Andrew Tridgell
158bd784fc missed another spot in the SMB2 create conversion
(This used to be commit df82b0aa69)
2008-02-13 17:36:41 +11: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
37f8c04d90 r22865: handle pending locks in smb2
metze
(This used to be commit 8329fa6895)
2007-10-10 14:52:25 -05:00
Stefan Metzmacher
bd93b41d17 r22849: map smb2 lock to the generic level
metze
(This used to be commit fbbb144f8e)
2007-10-10 14:52:24 -05:00
Andrew Tridgell
921f73c7e5 r18835: expand IO limits on SMB2. Samba4 now tops out at 16.7MB IOs.
(This used to be commit 1e34e4d5a1)
2007-10-10 14:19:16 -05:00
Stefan Metzmacher
e1248154d6 r17088: add ntvfs mapping function for notify
metze
(This used to be commit 7daf432d58)
2007-10-10 14:10:12 -05:00
Stefan Metzmacher
1b45214f31 r16868: init some uninitialized values
(found by valgrind)

metze
(This used to be commit 1bb60b5be4)
2007-10-10 14:09:54 -05:00