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

333 Commits

Author SHA1 Message Date
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
Michael Adam
05352cf2cb Remove superfluous parameter fd from SMB_VFS_FSET_NT_ACL().
Michael
(This used to be commit 4f2d139a18)
2008-01-06 23:08:00 +01:00
Jeremy Allison
c6a2292724 Using a bool with a logical operation. IBM checker caught.
Jeremy.
(This used to be commit 7f9fe7da1e)
2008-01-04 23:17:38 -08:00
Jeremy Allison
9254bb4ef1 Refactor the crypto code after a very helpful conversation
with Volker. Mostly making sure we have data on the incoming
packet type, not stored in the smb header.
Jeremy.
(This used to be commit c4e5a50504)
2008-01-04 12:56:23 -08:00
Volker Lendecke
31d3f5726a Use NULL instead of 0
"struct security_descriptor" has pointers, not integers inside
(This used to be commit 13158014e3)
2008-01-01 13:13:31 +01:00
Volker Lendecke
33f01360e0 Fix setting the initial permission bits
This fixes a make test failure on Solaris. When creating a new file,
file_set_dosmode() called from open_file_ntcreate calculates a new permission
mask, very likely different from what had been calculated in
open_file_ntcreate. Further down we overwrote the newly calculated value with
SMB_FCHMOD_ACL, ignoring what file_set_dosmode had calculated.

Why did Linux not see this? fchmod_acl on a newly created file without acls
would not retrieve an acl at all, whereas under Solaris acl(2) returns
something even for files with just posix permissions returns something.

Jeremy, given that we have very similar code in 3.0.28 this might also explain
some of the bug reports that people have concerning ACLs on new files.

Volker

P.S: This one took a while to find...
(This used to be commit 2135dfe91b)
2007-12-28 08:52:29 +01:00
Volker Lendecke
250c57ccfb We need to return the correct atime
On systems with nanosecond atime we need to re-stat after messing with the fd,
at least Solaris 10 updates atime after we stat(2)ed the file.
(This used to be commit 6e6ec0a563)
2007-12-26 14:55:57 +01:00
Michael Adam
e47520f222 Remove redundant connection_struct from fd_close() parameter list.
Michael
(This used to be commit 3611cc8561)
2007-12-22 02:01:32 +01:00
Michael Adam
4773973300 Remove redundant connection_struct from fd_close_posix() parameter list.
Michael
(This used to be commit f3365b74ac)
2007-12-22 02:01:32 +01:00
Volker Lendecke
39ea0edbbe separate out create_file_unixpath()
(This used to be commit deaacf971e)
2007-12-11 16:16:54 +01:00
Volker Lendecke
3063f85a72 Move more stuff out of the way
(This used to be commit ae422fce01)
2007-12-11 16:16:54 +01:00
Volker Lendecke
0ac113e5a2 Move INTERNAL_OPEN_ONLY calculation out of the way
(This used to be commit 0e96549b56)
2007-12-11 16:16:54 +01:00
Volker Lendecke
3a9576c724 Increase debug level
(This used to be commit 4e6df55471)
2007-12-10 12:22:01 +01:00
Volker Lendecke
ca4eee5bbe Pass only internal oplock request values to create_file
Other callers (e.g. reply_open_and_X) might have other ideas of the bit
shuffling
(This used to be commit 6a58d823e5)
2007-12-07 14:05:06 +01:00
Volker Lendecke
ce535b4dd8 More parameter shuffling
(This used to be commit 8f70f691ff)
2007-12-07 14:05:06 +01:00
Volker Lendecke
c55e44b6a7 Re-arrange create_file() parameters
This changes them to be a bit closer to open_file_ntcreate and thus provides
less surprises to developers
(This used to be commit d000258b96)
2007-12-07 14:05:05 +01:00
Volker Lendecke
30d31a3f85 Make fname arg to create_file a "const char *"
(This used to be commit da94b5f9e3)
2007-12-07 14:05:05 +01:00
Volker Lendecke
b2ca9253e9 There's no point in passing down a 0
(This used to be commit 525a6887af)
2007-12-05 15:47:32 +01:00
Volker Lendecke
188daba1a7 Move create_file to open.c
I'm checking in this long sequence of micro-checkins for review, the overall
patch from 3b057022a5 to this is not too large.
(This used to be commit 51db8d09a4)
2007-12-05 13:45:12 +01:00
Jeremy Allison
acb829ecc3 Add MAX_DNS_NAME_LENGTH, remove more pstrings.
Jeremy.
(This used to be commit a1725f4ff7)
2007-11-15 18:27:26 -08:00
Jeremy Allison
8f1f2f04c7 Fix some cases where file_set_dosmode was being passed
False instead of NULL. Fix more of the notifications to
be correct for Samba4 RAW-NOTIFY torture (we had missed
one when calling set_ea_dos_attribute().
Jeremy.
(This used to be commit 39d265375c)
2007-10-31 15:45:45 -07:00
Jeremy Allison
30191d1a57 RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3c)
2007-10-18 17:40:25 -07:00
Gerald (Jerry) Carter
e5a951325a [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.
(This used to be commit 5c6c8e1fe9)
2007-10-10 15:34:30 -05:00