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

976 Commits

Author SHA1 Message Date
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
1bdd08227e smbpid needs to be 32 bit now to cope with SMB2
(This used to be commit a2854fd6ea)
2008-06-02 11:03:19 +10:00
Andrew Tridgell
beaa01e403 implemented client side SMB2 signing
This doessn't work against Windows yet, and I've submitted a WSPP
request for clarification of the docs to try and find out
why. Meanwhile this is no worse than what we had, as it only gets used
when the server demands signing, and we didn't work then anyway.
(This used to be commit b788096add)
2008-05-30 17:03:54 +10:00
Andrew Tridgell
b33dba845e don't emulate broken SMB2 locking behaviour from windows
(This used to be commit c50e7a15f9)
2008-05-30 07:28:29 +10:00
Andrew Tridgell
f0bc7c07fe don't mask out SEC_FILE_READ_ATTRIBUTE on SMB2
(This used to be commit 1dfa50a480)
2008-05-29 22:22:42 +10:00
Andrew Tridgell
383d10577c fixed the error code for bad SMB2 ioctls
(This used to be commit b1d2d388ec)
2008-05-29 20:46:18 +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
21d770a02c querying the ACCESS_INFORMATION is always allowed
(This used to be commit 25d5b94d6a)
2008-05-29 18:23:33 +10:00
Andrew Tridgell
e42ded24a0 SEC_FILE_READ_ATTRIBUTE is only automatically granted on SMB, not SMB2
(This used to be commit 7bff069142)
2008-05-29 18:23:20 +10:00
Andrew Tridgell
67226f054b fixed create_action for truncated files
(This used to be commit 884c32fcef)
2008-05-28 22:44:20 +10:00
Andrew Tridgell
86d69fd4b6 SMB2 doesn't have NAME_INFORMATION level
(This used to be commit a431d51b11)
2008-05-28 21:48:40 +10:00
Andrew Tridgell
fa0bc441e3 don't allow a file to be changed to a directory with setfileinfo
(This used to be commit ad7acbf8bf)
2008-05-28 20:06:04 +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
275e057bea Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-test
(This used to be commit ecb0e5477a)
2008-05-28 12:07:20 +10:00
Andrew Tridgell
fd67526bd3 answer SMB2_ALL_EAS qfileinfo
(This used to be commit f5cf47eef1)
2008-05-28 11:49:43 +10:00
Andrew Tridgell
6222b8e7e2 fixed error code for write on a directory
(This used to be commit 68eb5b050e)
2008-05-28 11:48:21 +10:00
Andrew Tridgell
b5f39fbda0 fix error code for read on a directory
(This used to be commit afd4f47971)
2008-05-28 11:48:11 +10:00
Jelmer Vernooij
715cee3bdb Use variables for directories in ntvfs smb2 module.
(This used to be commit ea550711c5)
2008-05-28 03:07:42 +02: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
46e64417a3 another attempt at the damn SEC_STD_SYNCHRONIZE flag
(This used to be commit 2ac27bfffa)
2008-05-27 16:02:27 +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
cf274201b4 disable the SEC_STD_SYNCHRONIZE test until we know what it means
(This used to be commit 897f4582be)
2008-05-27 15:27:25 +10:00
Andrew Tridgell
65e31a965e make the SEC_STD_SYNCHRONIZE test more specific
(This used to be commit 8c263f91bd)
2008-05-27 14:59:55 +10:00
Andrew Tridgell
6e265867ff SEC_STD_SYNCHRONIZE is only invalid on SMB2
(This used to be commit 067f1271ad)
2008-05-27 14:30:42 +10:00
Andrew Tridgell
f0b4b15f64 check for some more invalid bits in smb2 create
(This used to be commit dcdaa9f5fd)
2008-05-27 14:07:11 +10:00
Andrew Tridgell
9a37e7ed93 Vista returns ACCESS_DENIED here
(This used to be commit f5068c6e50)
2008-05-27 14:06:51 +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
bf8d9e180e fill in reserved field on SMB2 flush
(This used to be commit 400a3b39d5)
2008-05-26 15:00:27 +10:00
Andrew Tridgell
c5c1b3706a allow larger streams using the TDB backend
(This used to be commit 8c0d756eb8)
2008-05-26 14:59:58 +10:00
Stefan Metzmacher
5d648b4aa5 pvfs_open: return FILE_IS_A_DIRECTORY when opening a stream on a directory
metze
(This used to be commit 1421b1cc0c)
2008-05-23 09:55:15 +02:00
Stefan Metzmacher
391b746430 pvfs_resolve: stream_name = "" is only the same as NULL for files
metze
(This used to be commit 47756129fd)
2008-05-23 09:55:15 +02:00
Stefan Metzmacher
c78bf3c2c9 pvfs_streams: directories don't have streams
metze
(This used to be commit 9ed7bb5afe)
2008-05-23 09:55:03 +02:00
Andrew Tridgell
ec7a6ee8ab fix make test for EAs again
- go back to 4 byte alignment until I work out the rules that Vista
  wants more exactly
- add the zero sized EA handling for SMB2 more generically
(This used to be commit 326b69bc80)
2008-05-23 00:07:12 +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
ac185ae0c5 fixes for EAs and filename in gentest_smb2 results
- SMB2 returns 0 for a null EA
- return the share qualified name for the filename in SMB2 ALL_INFO
  level
(This used to be commit f9708184a2)
2008-05-22 23:00:08 +10:00
Andrew Tridgell
7a9ffeca21 check for invalid file attribute values in create
(This used to be commit dd21e3d9d7)
2008-05-22 17:53:50 +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
Andrew Tridgell
2352602a57 check the creation options where the client can require a path to be a
file or a directory
(This used to be commit c05b58940f)
2008-05-20 11:58:47 +10:00
Andrew Tridgell
e7d993b8b2 added SMB2 proxying of rmdir
(This used to be commit 1e0c24b276)
2008-05-19 13:05:08 +10:00
Andrew Tridgell
03eb236f20 Merge commit 'origin/v4-0-test' into vfs_smb2
(This used to be commit 733937e87a)
2008-05-19 11:40:25 +10:00
Andrew Tridgell
66cbf7eb59 added mkdir to SMB2 proxy
(This used to be commit 1323aab11f)
2008-05-19 11:39:16 +10:00
Jelmer Vernooij
60ae8f0657 Fix a bunch of dependencies.
(This used to be commit a63f458462)
2008-05-18 23:40:23 +02:00
Jelmer Vernooij
4c70cda986 Fix a couple (well, little more than that..) of typos.
(This used to be commit a6b5211994)
2008-05-18 23:02:47 +02:00
Jelmer Vernooij
4c8756f147 Create prototype headers from Makefile directory, without smb_build in the middle.
(This used to be commit f4a77b96f9)
2008-05-18 22:30:08 +02:00
Jelmer Vernooij
03643aec88 Use variables for source directory in a couple more places.
(This used to be commit c41bd3005f)
2008-05-18 19:54:27 +02:00
Andrew Tridgell
9b177f8d58 added SMB2 proxying for unlink
(This used to be commit a5459bd880)
2008-05-16 15:01:31 +10:00
Andrew Tridgell
d9f47ba00b added handlers for connect, search_first and fsinfo.
Directory listing in smbclient now works
(This used to be commit 8007342061)
2008-05-15 20:47:28 +10:00
Andrew Tridgell
ca3257b286 started new vfs_smb2 module
This new module is based on the vfs_cifs module. The idea is to create a backend
which maps SMB requests to a SMB2 server. This will allow existing
test suites for SMB to be run against our SMB2 client and server code.

It will also help validate our SMB2 client library, probably leading
to some API changes to make it flexible enough
(This used to be commit 6ea8295a64)
2008-05-15 10:57:22 +10:00
Jelmer Vernooij
7c7de11f20 Fix LDB module initialization when using external ldb.
(This used to be commit b7b4aff8b5)
2008-05-11 01:53:11 +02:00
Jelmer Vernooij
7b45a4d7fa Merge branch 'v4-0-test' into v4-0-gmake3
Conflicts:

	source/auth/config.mk
	source/auth/gensec/config.mk
	source/torture/smbtorture.c
(This used to be commit edfd02e59b)
2008-05-10 18:08:00 +02:00
Stefan Metzmacher
3e80085fb0 pvfs: remove XATTR_ATTRIB_FLAG_STICKY_WRITE_TIME code
I'll fix this more correctly very soon,
so that we'll pass the BASE-DELAYWRITE test.

metze
(This used to be commit b09dd6b65d)
2008-05-07 15:46:22 +02:00
Jelmer Vernooij
cc9c4aaa8d Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-gmake3
Conflicts:

	source/Makefile
	source/auth/config.mk
	source/auth/gensec/config.mk
	source/build/m4/public.m4
	source/build/make/python.mk
	source/build/make/rules.mk
	source/build/smb_build/header.pm
	source/build/smb_build/main.pl
	source/build/smb_build/makefile.pm
	source/dsdb/config.mk
	source/dsdb/samdb/ldb_modules/config.mk
	source/kdc/config.mk
	source/lib/events/config.mk
	source/lib/events/events.c
	source/lib/ldb/config.mk
	source/lib/nss_wrapper/config.mk
	source/lib/policy/config.mk
	source/lib/util/config.mk
	source/libcli/smb2/config.mk
	source/libnet/config.mk
	source/librpc/config.mk
	source/nbt_server/config.mk
	source/ntptr/ntptr_base.c
	source/ntvfs/posix/config.mk
	source/ntvfs/sysdep/config.mk
	source/param/config.mk
	source/rpc_server/config.mk
	source/rpc_server/service_rpc.c
	source/scripting/ejs/config.mk
	source/scripting/python/config.mk
	source/smb_server/config.mk
	source/smbd/server.c
	source/torture/config.mk
	source/torture/smb2/config.mk
	source/wrepl_server/config.mk
(This used to be commit 13bbd42068)
2008-04-25 10:04:20 +01: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
Jelmer Vernooij
dd0da89e84 Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-test
(This used to be commit ece878c1f9)
2008-04-17 13:05:25 +02:00
Jelmer Vernooij
21fc767378 Specify event_context to ldb_wrap_connect explicitly.
(This used to be commit b4e1ae07a2)
2008-04-17 12:23:44 +02:00
Andrew Tridgell
30b9c37420 Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-test
Conflicts:

	source/ntvfs/ntvfs_generic.c
(This used to be commit a626a9c69c)
2008-04-17 09:36:09 +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
Jelmer Vernooij
14023e502b Require explicit event context rather than looking if it is not specified.
(This used to be commit 1da0063bd5)
2008-04-17 01:22:39 +02:00
Jelmer Vernooij
c15ffa27cb Explicitly require event context to be specified.
(This used to be commit a95a71fe45)
2008-04-17 01:19:53 +02:00
Jelmer Vernooij
1efbd5fbf6 Remove event context tracking from the credentials struct.
(This used to be commit 4d7fc946b2)
2008-04-17 01:03:18 +02:00
Jelmer Vernooij
a195cd9d8f Use readily available event context.
(This used to be commit 2823fca23a)
2008-04-16 22:52:07 +02:00
Andrew Tridgell
b967afca64 Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-test
(This used to be commit e891157b4e)
2008-04-15 09:54:41 +02:00
Andrew Tridgell
79af7ff2f7 fixed a valgrind error in id mapping
the status field is sent on both call and reply, but was only being
initialised on reply
(This used to be commit 2ebd7b8099)
2008-04-14 18:59:40 +02:00
Andrew Tridgell
292ed5d04f fixed an unitialised write warning in valgrind
the 'reserved' field was not being initialised before being pushed to
the wire
(This used to be commit dfe4b50098)
2008-04-14 18:44:43 +02:00
Jelmer Vernooij
e9017ba418 Use _OBJ_FILES variables in a couple more places.
(This used to be commit 92856d5054)
2008-04-14 17:22:58 +02:00
Jelmer Vernooij
7cf29ac84e Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-gmake4
(This used to be commit 9d3d64e138)
2008-04-14 11:55:19 +02:00
Jelmer Vernooij
f78bc8c489 Remove prototypes from build.h in preparation of removing build.h
altogether.
(This used to be commit dbeab2a9cd)
2008-04-14 11:54:50 +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
b5d84a74d1 Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-gmake3
Conflicts:

	source/auth/credentials/config.mk
	source/auth/gensec/config.mk
	source/build/smb_build/makefile.pm
	source/heimdal_build/config.mk
	source/lib/events/config.mk
	source/lib/nss_wrapper/config.mk
	source/lib/policy/config.mk
	source/lib/registry/config.mk
	source/lib/socket_wrapper/config.mk
	source/lib/tdb/config.mk
	source/lib/tls/config.mk
	source/lib/util/config.mk
	source/libcli/config.mk
	source/libcli/ldap/config.mk
	source/libnet/config.mk
	source/librpc/config.mk
	source/param/config.mk
	source/rpc_server/config.mk
	source/scripting/ejs/config.mk
	source/smbd/process_model.mk
(This used to be commit 760378e029)
2008-04-08 03:45:06 +02:00
Kai Blin
4133bd85e9 ntvfs: Use wbclient for pvfs_acl and pvfs_acl_nfs4
(This used to be commit ac5e5fee1d)
2008-04-02 23:07:27 +02:00
Kai Blin
a71f36e2b8 ntvfs: Use wbclient in vsf_unixuid, not sidmap
(This used to be commit 2908a77fa5)
2008-04-02 23:07:17 +02:00
Jelmer Vernooij
236fc02913 Reduce the number of installed headers.
(This used to be commit 2243e24024)
2008-04-02 13:41:10 +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
Jelmer Vernooij
90f76ae99b Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-gmake3
(This used to be commit 4e0b94d648)
2008-03-28 00:59:54 +01:00
Jelmer Vernooij
18d80bdf1f Merge v4.0-test
(This used to be commit 977dbdeaf3)
2008-03-28 00:44:14 +01:00
Andrew Bartlett
7f2927528c Fix references to ntvfs share config
Andrew Bartlett
(This used to be commit 4e4152dfd7)
2008-03-27 20:40:40 +11:00
Andrew Bartlett
4fc27c9969 Make oplocks a per-share option.
This even goes via the share options system (a very odd layer of indirection).

Andrew Bartlett
(This used to be commit f2c65f9907)
2008-03-27 20:32:02 +11:00
Stefan Metzmacher
71e2f7d260 opendb_tdb: enable oplocks per default
metze
(This used to be commit 225a9852ee)
2008-03-27 10:11:48 +01:00
Stefan Metzmacher
e76c8aa097 pvfs_open: set h->have_opendb_entry directly after odb_open_file()
Otherwise we may not clean up in the destructor.

metze
(This used to be commit 218ec98a16)
2008-03-15 12:36:20 +01:00
Stefan Metzmacher
74d940ca57 pvfs_open: the pvfs_odb_retry structs need to be children of the request
Otherwise they're not cleaned up when the request is finished.

metze
(This used to be commit 055760f0f4)
2008-03-15 12:35:04 +01:00
Stefan Metzmacher
1f65ddb336 pvfs_unlink: disable async retries for wildcard deletes
We would setup multiple retries per client request.

metze
(This used to be commit 951764e284)
2008-03-15 12:22:36 +01:00
Stefan Metzmacher
50243cdbbd pvfs_open: retry pvfs_open() after an EGAIN or EWOULDBLOCK from open()
In case a unix application as an oplock or share mode on
a file we need to retry periodicly as there's no way
to get a notification from the kernel when the oplock
is released.

metze
(This used to be commit 4d40f3a026)
2008-03-12 17:35:07 +01:00
Stefan Metzmacher
454e9bed04 pvfs_open: pass O_NONBLOCK to open() so that we'll not block with kernel oplocks
metze
(This used to be commit eeb0b8c349)
2008-03-12 17:35:06 +01:00
Stefan Metzmacher
49c86b73bf opendb_tdb: use sys_lease to setup kernel oplocks
metze
(This used to be commit e473068bdd)
2008-03-12 17:35:06 +01:00
Stefan Metzmacher
d93f2f2e80 ntvfs/sysdep: implement linux kernel oplocks based F_SETLEASE
metze
(This used to be commit 3f165d3114)
2008-03-12 17:35:06 +01:00
Stefan Metzmacher
c3643d0ec8 ntvfs/sysdep: add sys_lease abstraction to later support kernel oplocks
metze
(This used to be commit b399f0c872)
2008-03-12 17:35:05 +01:00
Stefan Metzmacher
7ba236d78e pvfs_open: pass down &f->handle->fd to odb_open_file()
metze
(This used to be commit 80f5f93621)
2008-03-12 17:35:04 +01:00
Stefan Metzmacher
59917521e9 opendb: pass down a pointer to the fd in odb_open_file()
This prepares kernel oplock support.

metze
(This used to be commit 9db9b6d85d)
2008-03-12 17:35:04 +01:00
Stefan Metzmacher
7cdf28ebac ntvfs/cifs: fix the fnum on RAW_RENAME_NTTRANS
metze
(This used to be commit b43f1a53dd)
2008-03-12 17:35:03 +01:00
Stefan Metzmacher
f533d6d8a2 pvfs_rename: implement RAW_RENAME_NTTRANS as noop as w2k3
metze
(This used to be commit 40563583f7)
2008-03-12 17:14:44 +01:00
Stefan Metzmacher
8e70dc7e9a pvfs: return NT_STATUS_NOT_IMPLEMENTED on RAW_RENAME_NTTRANS
metze
(This used to be commit 6dc280731d)
2008-03-11 20:16:52 +01:00
Jelmer Vernooij
fb6fdfce37 Fix the build.
(This used to be commit f2e4974471)
2008-03-08 17:02:40 +01:00
Jelmer Vernooij
2bf39edc9d Push SOVERSION and VERSION out of perl code.
(This used to be commit 0ba8ac6a14)
2008-03-08 15:28:12 +01:00
Jelmer Vernooij
0c6de7c959 Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-gmake3
(This used to be commit cffaf5f603)
2008-03-08 15:27:32 +01:00
Stefan Metzmacher
db06d932c8 opendb_tdb: keep struct opendb_file arround for the lifetime of struct odb_lock
That means we only have to parse the record once
and as the tdb record is locked the in memory copy
is always the same as the one in the tdb.

metze
(This used to be commit 0641a43cd6)
2008-03-08 09:28:17 +01:00
Stefan Metzmacher
11fb55e8a4 opendb_tdb: correctly initialize modified to false
Otherwise this variable would never change its value...

metze
(This used to be commit 5b13a564b8)
2008-03-08 09:28:17 +01:00