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

548 Commits

Author SHA1 Message Date
Andrew Bartlett
cba7f8b827 s3:dom_sid Global replace of DOM_SID with struct dom_sid
This matches the structure that new code is being written to,
and removes one more of the old-style named structures, and
the need to know that is is just an alias for struct dom_sid.

Andrew Bartlett

Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-21 10:39:59 +02:00
Jeremy Allison
572e5dec1b Implement missing info level SMB_FILE_LINK_INFORMATION.
Fix bug #7435 - SMB2 hardlink fails (invalid level).
Found at the Microsoft plugsharing plugfest.

Jeremy.
2010-05-18 18:34:54 -07:00
Günther Deschner
7f6bb48bdf s3-secdesc: remove "typedef struct security_descriptor SEC_DESC".
Guenther
2010-05-18 12:30:12 +02:00
Günther Deschner
f6445d8f86 s3-build: fix the build.
Guenther
2010-05-18 12:27:31 +02:00
Jelmer Vernooij
b8268cf7b0 s3: Remove use of iconv_convenience. 2010-05-18 11:45:31 +02:00
Jeremy Allison
e90444319c Carefully label SMB1-specific locking calls.
Jeremy.
2010-04-29 17:08:12 -07:00
Jeremy Allison
ac09506d36 Connect set security descriptor into SMB2 code.
Jeremy.
2010-04-28 14:13:22 -07:00
Jeremy Allison
a94a4b788c Plumb in get_nt_acl into SMB2.
Jeremy.
2010-04-26 20:11:59 -07:00
Jeremy Allison
7984243768 Move to using 64-bit mid values in our internal open file database.
This will allow us to share logic much easier between SMB1 and SMB2
servers.

Jeremy
2010-04-12 21:40:28 -07:00
Björn Jacke
3fdebc0646 s3: add comment about what the FSCTL_QUERY_ALLOCATED_RANGES currently does 2010-04-07 12:22:47 +02:00
Jeremy Allison
15531d9df1 Add FSCTL_QUERY_ALLOCATED_RANGES to the list of Windows ioctls we support.
Based on a patch reported and tested by Ira Cooper <samba@ira.wakeful.net>.

Jeremy.
2010-04-05 19:33:55 -07:00
Jeremy Allison
f58d02dbee Second part of fix for bug #6494 - Incorrect FileStatus returned in NT_CREATE_ANDX.
Ensure we do this in nttrans create too.

Jeremy.
2010-03-30 16:54:43 -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
642101ac23 Remove all calls to reply_doserror - turn them into
correct reply_nterror calls. Next rename reply_doserror ->
reply_force_doserror and plumb in when NT_STATUS_DOS is
used.
Jeremy.
2009-12-21 11:05:25 -08:00
Jeremy Allison
f8ab38a8f2 Vector correctly through reply_openerror() (which uses the same logic).
Jeremy.
2009-12-17 18:31:26 -08:00
Jeremy Allison
187ef6b482 Fix make test. Only do POSIX case conversion if FILE_FLAG_POSIX_SEMANTICS set. Doh !
Jeremy.
2009-11-24 13:02:34 -08:00
Jeremy Allison
a930e3e4e1 Restore NtCreateX case handling with FILE_FLAG_POSIX_SEMANTICS to the way
it worked in 3.3.x and 3.2.x. UCF_POSIX_PATHNAMES may no longer be needed,
as lp_posix_pathnames() being set isn't the same as case handling from
NtCreateX (lp_posix_pathnames() changes the STAT calls to LSTAT, not
the case semantics).
Jeremy.
2009-11-23 21:06:54 -08:00
Jeremy Allison
f8bd0559ad Proper fix for #6898 - Samba duplicates file content on appending. Pointed out by Volker.Restores the pathname handling for FILE_FLAG_POSIX_SEMANTICS but still prevents the O_APPEND problems. Jeremy. 2009-11-23 15:05:23 -08:00
Jeremy Allison
7ebe5b1641 Fix bug #6898 - Samba duplicates file content on appending
Clients using a Windows open call should not be able to set
FILE_FLAG_POSIX_SEMANTICS in an open.
Jeremy.
2009-11-23 10:09:47 -08:00
Volker Lendecke
0f8e2a6ebb Revert "s3: Move the global variable Protocol to struct smbd_server_connection"
This reverts commit c85a4c9ba4.
2009-11-23 16:34:59 +01:00
Volker Lendecke
c85a4c9ba4 s3: Move the global variable Protocol to struct smbd_server_connection 2009-11-21 20:49:17 +01: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
c99dd5c23e Got the logic simplification worked out so we still pass
BASE-DELAYWRITE and also RAW-CLOSE.
Jeremy.
2009-11-05 22:58:12 -08:00
Jeremy Allison
977fa4e377 Revert commit "0551284dc08eb93ef7b2b2227a45e5ec21d482fb" - simplify
the logic. This was incorrect (I'll revisit this tomorrow).
Jeremy.
2009-11-05 21:27:25 -08:00
Jeremy Allison
0551284dc0 Simplify the logic - remove extraneous argument and calls to set_close_write_time().
We were treating a file time set on close as a sticky write time set, and I don't
think it is. I will add a torture test later to RAW-CLOSE to confirm this.
Jeremy.
2009-11-05 17:40:01 -08:00
Jeremy Allison
7f9fe127ba Get closer to an accurate model of Windows timestamp changes.
"Normal" non truncate writes always cause the timestamp to
be set on close. Once a close is done on a handle this can
reset the sticky write time to current time also.
Updated smbtorture4 confirms this.
Jeremy.
2009-11-05 16:20:11 -08:00
Jeremy Allison
cbafe17bb3 Remove "Protocol" as an extern, and add accessor functions.
Jeremy.
2009-11-04 15:15:50 -08:00
Volker Lendecke
f0fd5df7fd s3: Fix shadow copy display on Windows 7
Windows 7 is a bit more picky on our NT_STATUS_BUFFER_TOO_SMALL. Announce the
right buffer size, the same amount we later check for.
2009-10-08 14:07:07 +02: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
Jeremy Allison
ca2c93b9e5 Fix bug 6494 - Incorrect FileStatus returned in NT_CREATE_ANDX.
Lookup the EA and Stream status on CreateX.
Jeremy.
2009-09-14 15:30:05 -07:00
Jeremy Allison
c69f92d16d Second attempt at fix for bug 6529 - Offline files conflict with Vista and Office 2003.
Confirmation from reporter that this fixes the issue in master on ext3/ext4.
Back-ports to follow.
Jeremy.
2009-08-24 20:57:37 -07:00
Jeremy Allison
d6270df748 Add "store create time" parameter (docs to follow)
that stores the create time in the user.DosTimestamps EA.
Jeremy.
2009-08-12 13:00:54 -07:00
Jeremy Allison
c9dca82ed7 Refactor the use of create_time and change time to go
through functions. Will aid in making us pass RAW-SETFILEINFO.
Jeremy.
2009-08-10 15:07:53 -07:00
Tim Prouty
f49f3fcb01 s3: Convert a few callers of unix_convert() over to filename_convert()
This patch also changes the unix convert flags to make sure the
correct semantics are preservered for allowing/disallowing wildcards
in the last component of the path.
2009-07-24 18:51:41 -07:00
Tim Prouty
cd5133b112 s3: Simplify rename_internals() by passing in smb_filename structs 2009-07-24 15:10:45 -07:00
Tim Prouty
10324b177e s3: Allow filename_convert() to pass through unix_convert_flags and let the caller know if the path has a wildcard
This also eliminates the need for resolve_dfspath().
2009-07-24 15:10:45 -07:00
Tim Prouty
00e267008d s3: Remove the now unused fname parameter from filename_convert() 2009-07-21 12:04:59 -07:00
Tim Prouty
4860fc4951 s3: Fix RENAME_FLAG_RENAME path to stop calling unix_convert twice 2009-07-21 12:04:59 -07:00
Tim Prouty
82c3f505fe s3: Move is_ntfs_stream*() to filename.c 2009-07-20 17:26:57 -07:00
Tim Prouty
5a8d70d465 s3: Change fsp->fsp_name to be an smb_filename struct! 2009-07-20 17:26:56 -07:00
Tim Prouty
161e182b65 s3: Remove is_ntfs_stream_name() and split_ntfs_stream_name()
Actually I moved split_ntfs_stream_name into torture.c which is the one
consumer of it.  This could probably be changed at some point.
2009-07-08 21:36:04 -07:00
Tim Prouty
1a1d10d22f s3: Plumb smb_filename through dos_mode() and related funtions 2009-07-08 21:36:03 -07:00
Jeremy Allison
400c18a8c4 Rename update_stat_ex_writetime() -> update_stat_ex_mtime()
to better describe what we're doing here.
Jeremy
2009-07-08 18:05:30 -07:00
Jeremy Allison
c9c3d4312d The migration to struct stat_ex broke the calculation of
create time from the existing timestamps (for systems
that need to do this). Once the write time is changed
via a sticky write, the create time might need to be
recalculated. To do this I needed to add a bool into
struct stat_ex to remember if the st_ex_btime field
was calculated, or read from the OS. Also fixed the
returning of modified write timestamps in the return
from NTCreateX, SMBattr and SMBattrE (which weren't
taking into account the modified timestamp stored
in the open file table). Attempting to fix an issue
with Excel 2003 and offline files. Volker and Metze,
please review.
Jeremy
2009-07-08 17:51:35 -07:00
Tim Prouty
99bd4fda0c s3: Plumb smb_filename around SMB_VFS_CHFLAGS
SMB_VFS_CHFLAGS isn't actually getting the smb_filename struct for now
since it only operates on the basefile.  This is the strategy for all
path-based operations that will never actually operate on a stream.

By clarifying the meaning of path based operations that don't take an
smb_filename struct, modules that implement streams such as vfs_onefs
no longer need to implement SMB_VFS_CHFLAGS to ensure it's only called
on the base_name.
2009-07-06 15:38:41 -07:00
Tim Prouty
0f6e10886f s3: Change some filename_convert to pass in NULL for char **fname argument 2009-07-06 15:38:41 -07:00
Stefan Metzmacher
b804c30856 s3:smbd: make change_notify_reply() more generic and hide send_nt_replies() behind a callback
This prepares change notify support for SMB2.

metze
2009-07-02 09:11:01 +02:00
Stefan Metzmacher
ef96e8c958 s3:smbd: simplify the notify code a bit and always reply via change_notify_reply() -> send_nt_replies()
metze
2009-07-02 09:11:00 +02:00
Stefan Metzmacher
8b94eb6cc8 s3:smbd: push nttrans and trans2 responses with no data to the client
For sync replies it's not a problem, as construct_reply() will send
the response, but for async replies we would not send the reply to the client.
Currently the notify code works arround this manually, so I assume
we didn't have a bug here. But the next commits will simplify
the notify code.

metze
2009-07-02 09:10:59 +02:00
Stefan Metzmacher
d73bc83c19 s3:smbd: restore the 3.0.x bahavior of send_nt_replies()
We should also set the error code, when we return no parameters or data.

metze
2009-07-02 09:10:59 +02:00