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

355 Commits

Author SHA1 Message Date
Stefan Metzmacher
e605fdc81c s3:smbd: close the low level fd of the base_fsp, if the file was created
metze
2008-12-01 14:28:27 -08:00
Stefan Metzmacher
787b0536b7 s3:smbd: only try and fallback to open a directory if it's not a stream open
metze
2008-12-01 13:52:28 -08:00
Stefan Metzmacher
936037c7da s3:smbd: wildcard characters are allowed in stream names
We only check the filename of the basefile now.

metze
2008-12-01 13:27:47 -08:00
Jeremy Allison
338303eb37 Rever 83ff6979f5 - "Fix the logic bug that caused us to
run into kernel oplocks on an open for a stream inside a file with stream_xattr module. On
opening the base_fsp we must break existing oplocks." as it broke make test.
Jeremy.
2008-11-21 22:48:37 -08:00
Jeremy Allison
83ff6979f5 Fix the logic bug that caused us to run into kernel oplocks on an open for a stream inside a file with stream_xattr module. On opening the base_fsp we must break existing oplocks.
Jeremy.
2008-11-21 18:20:38 -08:00
Jeremy Allison
8d674e351a Second part of the fix for bug #5903 - vfs_streams_xattr breaks contents of the file
(also fix a bad merge of the previous patch from 3.3).
Jeremy.
2008-11-21 15:42:03 -08:00
Jeremy Allison
97fb05c2c0 First part of fix for bug #5903 - vfs_streams_xattr breaks contents of the file.
Restructures parts of open code so that fsp must be allocated before calling
open_file_ntcreate(_internal). Also fix up file ref-counting inside files.c.
Jeremy.
2008-11-21 12:14:53 -08:00
Jeremy Allison
24c598b1b9 Don't call FSET_NT_ACL on file create if there's no SD to set. Leave the default ACL in place.
Jeremy.
2008-11-06 01:40:21 -08:00
Jeremy Allison
bfc59f63f3 Pass all of RAW-ACLS except for inheritence. Working on that next.
Jeremy.
2008-11-04 01:34:08 -08:00
Jeremy Allison
6a37302b55 Pass the directory versions of the RAW-ACL (still not inheritance). Refactor some common code between open_file_ntcreate() and open_directory().
Jeremy.
2008-11-03 23:18:43 -08:00
Jeremy Allison
4f8fac1b8e Pass all the non-inherited S4 RAW-ACL tests.
Jeremy.
2008-11-03 22:42:53 -08:00
Jeremy Allison
54eaf2de74 Get closer to passing S4 RAW-ACLs.
Jeremy.
2008-10-31 18:04:53 -07:00
Jeremy Allison
8c1a90c2e3 Start moving us closer to passing S4 RAW-ACL test using the vfs_acl_xattr module. Inheritance fails at the moment though.
Jeremy.
2008-10-30 16:13:03 -07:00
Jelmer Vernooij
4746f79d50 Use {u,}int64_t instead of SMB_BIG_{U,}INT. 2008-10-14 01:59:36 +02:00
Volker Lendecke
c530009401 Pass struct smb_request to file_free
on the way to get rid of chain_fsp
2008-10-13 19:32:38 +02:00
Volker Lendecke
c3fedcddd5 Pass struct smb_request to file_new
Goal is to remove the chain_fsp global variable
2008-10-13 19:32:38 +02:00
Volker Lendecke
3bbe5e88e5 Pass struct smb_request to file_fsp
The goal is to get rid of the chain_fsp global variable
2008-10-13 19:32:37 +02:00
Jeremy Allison
543c6a02ae For the vfs_acl_xattr.c module, make sure we map GENERIC file and directory bits
to specific bits every time a security descriptor is set. The S4 torture suite proves
that generic bits are not returned when querying an ACL set using them (ie. only
the specific bits are stored on disk).
Jeremy.
2008-10-08 18:06:58 -07:00
Jeremy Allison
da8bebaa64 Fix bug #5797 - Moving readonly files fails. Reported by infomail@lordb.de.
We don't need to deny a DELETE open on a readonly file (I'm also adding a s4
torture test for this), the set_file_disposition call will return
NT_STATUS_CANNOT_DELETE if the delete-on-close bit is set
on a readonly file (and we already do this).
Jeremy.
2008-09-26 15:17:14 -07:00
Jeremy Allison
458101b577 Fix bug 5761 "open of mangled directory name results in 'is a stream name'"
reported by Regan Heath <Regan.Heath@BridgeHeadSoftware.com>.
Jeremy.
2008-09-15 14:21:28 -07:00
Stefan Metzmacher
eb8dd6a811 smbd: fix the handling of create_options to pass RAW-OPEN
Some of the bits generate INVALID_PARAMETER and some bits
are ignored when they come from a client, that's why we need
to use bits from the ignored range for our internal usage.

metze
(This used to be commit 7b4c8a4e39)
2008-08-20 15:50:26 +02:00
Jeremy Allison
f9223a7139 If we're not allowing streams on this conn ptr,
then don't allow create_file() to call down to
create_file_unixpath() with a stream name.
Jeremy.
(This used to be commit 167d611b52)
2008-07-24 18:12:12 -07:00
Volker Lendecke
c885ae01eb Remove current_user reference from printfsp.c
(This used to be commit 510f45d01a)
2008-06-26 13:13:23 +02:00
Volker Lendecke
40f5eab5eb Wrap the unix token info in a unix_user_token in auth_serversupplied_info
No functional change, this is a preparation for more current_user ref removal
(This used to be commit dcaedf345e)
2008-06-19 18:51:37 +02:00
Volker Lendecke
b6c125e4e0 Remove the current_user references from open.c
current_user_info was "only" used in a debug msg, and current_user.ut.uid is
also available via conn->server_info
(This used to be commit d0386914ff)
2008-06-15 13:41:16 +02:00
Volker Lendecke
d49de28f11 Remove the current_user reference from fake_file.c
The current vuid is not only available there, it is also in the current
smb_request structure.
(This used to be commit c8fd5eef32)
2008-06-15 13:37:53 +02:00
Volker Lendecke
5bda9a8af0 Remove "user" from connection_struct
(This used to be commit 368454a27c)
2008-05-10 11:17:01 +02:00
Jeremy Allison
b430b38220 Remove the "stat_open()" function, flag, and all associated code. It was only
being (correctly) used in the can_read/can_write checks for hide unreadable/unwritable
and this is more properly done using the functions in smbd/file_access.c.
Preparing to do NT access checks on all file access.
Jeremy.
(This used to be commit 6bfb06ad95)
2008-05-02 17:22:10 -07:00
Jeremy Allison
85dc0ad7be Rename inherit_access_acl() -> inherit_access_posix_acl() to make use clear.
Jeremy.
(This used to be commit b739c7f1cd)
2008-05-02 12:54:53 -07:00
Michael Adam
0db7aba8af Remove redundant parameter fd from SMB_VFS_CLOSE().
Now all those redundant fd's have vanished from the VFS API.

Michael
(This used to be commit 1429453551)
2008-04-21 00:22:42 +02:00
Michael Adam
3756467db6 Move the posix pending close functionality down into the VFS layer.
This hides the pending close fds from the outside. Call order
of SMB_VFS_CLOSE is reversed. Originally, it was:

fd_close -> fd_close_posix -> SMB_VFS_CLOSE -> close

And now it is:

fd_close -> SMB_VFS_CLOSE -> fd_close_posix -> close

This is in preparation of removing the fd parameter
from the SMB_VFS_CLOSE function. But it is also the right
place for the pending close calls anyways.

Michael
(This used to be commit 3cf56b124a)
2008-04-21 00:21:23 +02:00
Stefan Metzmacher
2ccf50256e locking: store the write time in the locking.tdb
This is needed to implement the strange write time update
logic later. We need to store 2 time timestamps to
distinguish between the time the file system had before
the first client opened the file and a forced timestamp update.

metze
(This used to be commit 6aaa2ce0ee)
2008-04-07 12:29:25 +02:00
Jeremy Allison
380fcfa600 Fix S3 to pass the test_raw_oplock_exclusive3 test.
Jeremy.
(This used to be commit 028302fac5)
2008-03-11 12:37:01 -07:00
Jeremy Allison
6cdd527fed Fix debug messages.
Jeremy.
(This used to be commit d265cedb55)
2008-02-22 16:12:57 -08:00
Volker Lendecke
2a78eb9c0d Fix a ton of IBM checker uninitialized variable warnings
SET_STAT_INVALID only sets nlink, not the other fields

We might consider to change SET_STAT_INVALID to always do ZERO_STRUCT
(This used to be commit 8cf8c5b203)
2008-01-22 09:23:34 +01:00
Volker Lendecke
b1017bb551 Free case_state earlier
Found by a "set but never used" warning. Thanks to talloc_tos() this was not
really a bug, but this way the code becomes much clearer.
(This used to be commit b326f11dc3)
2008-01-20 17:44:40 +01:00
Volker Lendecke
896ec68181 NT_STATUS_OBJECT_NAME_NOT_FOUND also means "no streams around :-)"
(This used to be commit 96b9a7b3eb)
2008-01-20 14:44:39 +01:00
Jeremy Allison
0bb6fb7b6f Couple of minor fixes for POSIX pathname processing in the
new stream code. (1) In smbd/filename, don't split the name at
':' if we know it's a posix path (this should be parameterized....).
(2). When calling posix_mkdir, we get the flag FILE_FLAG_POSIX_SEMANTICS
passed to open_directory(). I know for a posix client lp_posix_pathnames
should be true (which is checked for in is_ntfs_stream_name() but we
have an explicit flag here, so let's use it.
Jeremy.
(This used to be commit 7bb7a0def6)
2008-01-19 21:53:49 -08:00
Volker Lendecke
1069cfe4ad Add streams support
This is the core of the streams support. The main change is that in
files_struct there is now a base_fsp pointer that holds the main file open
while a stream is open. This is necessary to get the rather strange delete
semantics right: You can't delete the main file while a stream is open without
FILE_SHARE_DELETE, and while a stream is open a successful unlink of the main
file leads to DELETE_PENDING for all further access on the main file or any
stream.
(This used to be commit 6022873cc1)
2008-01-19 23:25:36 +01:00
Volker Lendecke
b36a78837f delete on close even prevents stat opens
(This used to be commit 85fe7f3f6e)
2008-01-12 20:11:10 +01:00
Volker Lendecke
4c0ca86051 There's no point in calling FLOCK on a non-existing fd
(This used to be commit 9ff79f231f)
2008-01-12 20:11:10 +01:00
Volker Lendecke
3cc3b9e187 use talloc_tos in a few more places
(This used to be commit 65dd869bea)
2008-01-10 13:19:58 +01:00
Jeremy Allison
253fbf1a6e Make use of talloc_pool in the main codepaths. Remove the sub-contexts.
Jeremy.
(This used to be commit bc932b8ad4)
2008-01-09 17:11:04 -08:00
Volker Lendecke
c16a00b0af Replace an uninitialized variable
Reported by the IBM checker
(This used to be commit 48f61e4b9f)
2008-01-09 10:34:27 +01:00
Michael Adam
b2182c11ea Remove redundant parameter fd from SMB_VFS_FCHMOD_ACL().
Michael
(This used to be commit 7b201c177b)
2008-01-08 01:14:24 +01:00
Michael Adam
327cc04da5 Remove redundant parameter fd from SMB_VFS_KERNEL_FLOCK().
Michael
(This used to be commit 195c519377)
2008-01-07 17:14:20 +01:00
Michael Adam
b457b94bb8 Remove redundant parameter fd from SMB_VFS_FTRUNCATE().
Michael
(This used to be commit 2ad66050a0)
2008-01-07 15:59:02 +01:00
Michael Adam
670909cb07 Remove redundant parameter fd from SMB_VFS_FCHOWN().
Michael
(This used to be commit fbb193db3e)
2008-01-07 15:59:02 +01:00
Michael Adam
e614dec27f Remove redundant parameter fd from SMB_VFS_FCHMOD().
Michael
(This used to be commit a54d5604da)
2008-01-07 15:59:02 +01:00
Michael Adam
87a684f7fc Remove redundant parameter fd from SMB_VFS_FSTAT().
Michael
(This used to be commit 0b86c420be)
2008-01-07 15:59:01 +01:00