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

642 Commits

Author SHA1 Message Date
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
Jeremy Allison
0173eeb3b5 Fix bug found by Igor Mammedov <niallain@gmail.com> where we are
not returning a directory value for a QPATHINFO on a msdfs link
with a non-dfs path. Windows does this.
Jeremy.
(This used to be commit fbd99071f9)
2008-04-28 15:06:08 -07:00
Jeremy Allison
86e59c50f1 Rewrite the wrap checks to deal with gcc 4.x optimisations.
Karolin, please pull once Volker has reviewed. Thanks.
Jeremy.
(This used to be commit 09852899ca)
2008-04-07 21:11:16 -07:00
Stefan Metzmacher
19f49de92e smbd: make it possible to disable get_file_infos() on searches
metze
(This used to be commit 404a865a34)
2008-04-07 12:29:30 +02:00
Stefan Metzmacher
851cadba51 locking: combine get_delete_on_close_flag() and get_write_time() into get_file_infos()
This means we need to fetch the record only once.

metze
(This used to be commit 4130b87329)
2008-04-07 12:29:29 +02:00
Stefan Metzmacher
d03453864a smbd: implement the strange write time update logic
We now never call file_ntimes() directly, every update
is done via smb_set_file_time().

This let samba3 pass the BASE-DELAYWRITE test.

The write time is only updated 2 seconds after the
first write() on any open handle to the current time
(not the time of the first write).

Each handle which had write requests updates the write
time to the current time on close().

If the write time is set explicit via setfileinfo or setpathinfo
the write time is visible directly and a following close
on the same handle doesn't update the write time.

metze
(This used to be commit 2eab212ea2)
2008-04-07 12:29:26 +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
792c972538 Metze pointed out this we don't need FILE_ATTRIBUTE_READ here.
Jeremy.
(This used to be commit 923aa9f330)
2008-03-11 13:59:04 -07:00
Jeremy Allison
bac7b5b19e Try and fix bug #5315, as well as S4 torture tests RAW-OPLOCK BATCH19,
BATCH20 and RAW-RENAME.
Jeremy.
(This used to be commit 9065792d4b)
2008-03-11 13:27:33 -07: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
Volker Lendecke
6a2dbea794 Fix some typos
(This used to be commit cfa1b83814)
2008-03-08 12:31:21 +01:00
Volker Lendecke
14aa57a9e3 Don't use fname after create_file has been called
create_file calls unix_convert internally, so modifies fname. So we can't use
"fname" after create_file has returned. Use fsp->fsp_name instead.

Found during a lengthy debugging session with Karolin testing the xattr_tdb
module...
(This used to be commit 183fe57046)
2008-02-22 17:15:09 +01:00
Volker Lendecke
5398dd641c Fix uninitialized variables
Thanks to Corinna Vinschen
(This used to be commit aba8c17599)
2008-01-26 21:29:18 +01:00
Corinna Vinschen
9051199e40 Get Samba version or capability information from Windows
On Jan 22 13:31, Volker Lendecke wrote:
> On Tue, Jan 22, 2008 at 11:33:17AM +0100, Corinna Vinschen wrote:
> > Right.  I changed samba_gitcommitdate from time_t to NTTIME and shortened
> > samba_version_string to 28 bytes.  New patch below.
>
> Ok, pushed with some modifications. You might want to review
> that.

Reviewed and tested.  Looks good, thank you!

Below you'll find a tiny patch to add the git commit date.  It seems
I simply missed its existence in version.h :(  Tested on Windows XP.

Thanks,
Corinna

	* source/smbd/trans2.c (samba_extended_info_version): Fill out
	samba_gitcommitdate member with GIT commit timestamp.
(This used to be commit a33d079758)
2008-01-22 16:45:25 +01:00
Volker Lendecke
d4d962f691 Move samba_extended_info_version to smbd/trans2.c
This is right now only used there, and in version.c it gave linker errors
because some binaries (e.g. smbmnt) don't link in time.o
(This used to be commit 1f0eaaa591)
2008-01-22 13:00:22 +01:00
Corinna Vinschen
559603ad69 Get Samba version or capability information from Windows
On Jan 21 16:18, Danilo Almeida wrote:
> Corina wrote:
>
> > +	time_t samba_gitcommitdate;
>
> And:
>
> > +   SIVAL(pdata,28,extended_info.samba_gitcommitdate);
> > +   memcpy(pdata+32,extended_info.samba_version_string,32);
>
> Note that you are dropping bits on a system w/64-bit time_t, and that this has the 2038 problem.

Right.  I changed samba_gitcommitdate from time_t to NTTIME and shortened
samba_version_string to 28 bytes.  New patch below.

Thanks,
Corinna
(This used to be commit 28aa1c199d)
2008-01-22 12:39:47 +01:00
Volker Lendecke
a4c2b04a2b Hide streams from the EA API
(This used to be commit e9bb3d5067)
2008-01-22 12:29:02 +01:00
Volker Lendecke
6a69bc3ef9 Fix get_ea_names_from_file for many EAs
Found by the IBM checker
(This used to be commit 8741a9b374)
2008-01-22 09:23:27 +01:00
Volker Lendecke
043a7e1774 Activate SMB_QUERY_FILE_STREAM_INFO
gcolley was right, my nt4 does not blue screen with it
(This used to be commit 9f2b5dc186)
2008-01-20 15:59:31 +01:00
Volker Lendecke
1b976d5192 Add the STREAMINFO vfs call
Based on jpeach's work, modified the streaminfo prototype

Make use of it in trans2.c together with marshall_stream_info()
(This used to be commit c34d729c7c)
2008-01-19 22:58:17 +01:00
Volker Lendecke
84518f1fc7 Add get_ea_names_from_file to sanely list posix xattrs
Refactor get_ea_list_from_file to use that.
(This used to be commit aec357a456)
2008-01-19 16:07:56 +01:00
Volker Lendecke
6d7eb2e6ec Make get_ea_value public
(This used to be commit 0aa406bbba)
2008-01-19 15:50:05 +01:00
Jeremy Allison
ca6cf1fe94 Actually test vl's new code and make it work to fix the build farm :-).
Jeremy.
(This used to be commit 63defd3e9d)
2008-01-18 18:39:27 -08:00
Volker Lendecke
145ab107b2 Always return nlink=1 for directories
I did not test it, but it should not affect cifsfs, there are special posix
calls that also return the stat information unfiltered.
(This used to be commit e96cf1309e)
2008-01-18 17:37:04 -08:00
Alexander Bokovoy
03387a0f58 Remove is_remotestorage() call from VFS. We already have statvfs() there to handle FS capabilities.
As discussed with Volker, it is better to calculate FS capabilities at
connection time. We already do this with help of VFS statvfs() call
which allows to fill-in system-specific attributes including FS
capabilities. So just re-use it if you want to represent additional
capabilities in your modules. The only caution is that you need to
call underlying statvfs() call to actually get system-specific
capabilities (and other fields) added. Then add module-specific ones.
(This used to be commit e342ca0d93)
2008-01-17 16:59:29 +03:00
Alexander Bokovoy
d86fc3ec8c Add support for offline files support, remote storage, and Async I/O force operations to VFS
Offline files support and remote storage are for allowing communication with
backup and archiving tools that mark files moved to a tape library as offline.
We translate this info into corresponding CIFS offline file attribute and
mark an exported volume as remote storage.

Async I/O force is to allow selective redirection of I/O operations to asynchronous
processing in case it is viable at VFS module discretion. It is needed for
proper handling of offline files as performing regular I/O on offline file will
block smbd.


Signed-off-by: Alexander Bokovoy <ab@samba.org>(This used to be commit 875208724e)
2008-01-16 12:17:03 +03: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
Michael Adam
aab6704ce8 Remove redundant parameter fd from SMB_VFS_FSETXATTR().
Michael
(This used to be commit 0bd2643463)
2008-01-08 11:47:33 +01:00
Michael Adam
1590dd32cf Remove redundant parameter fd from SMB_VFS_FREMOVEXATTR().
Michael
(This used to be commit bfc3b5a27f)
2008-01-08 11:29:09 +01:00
Michael Adam
9f691df852 Remove redundant parameter fd from SMB_VFS_FLISTXATTR().
Michael
(This used to be commit 167649b3b8)
2008-01-08 10:51:40 +01:00
Michael Adam
50ee744fa4 Remove redundant parameter fd from SMB_VFS_FGETXATTR().
Michael
(This used to be commit 2cb739a82d)
2008-01-08 10:00:47 +01:00
Michael Adam
62e9d503d8 Remove redundant parameter fd from SMB_VFS_SYS_ACL_GET_FD().
Michael
(This used to be commit 42663e8736)
2008-01-07 23:54:07 +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
Jeremy Allison
29562987c3 Now conn is part of smb_request, we don't need it as
an extra parameter. This cleans up quite a few places
we were passing it around without needing it.
Jeremy.
(This used to be commit 8f36def18e)
2008-01-04 15:37:24 -08:00
Jeremy Allison
9394916e49 We dont' modify the smb header for crypto anymore.
Jeremy.
(This used to be commit f5b6b6dac6)
2008-01-04 14:43:43 -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
523dbf801b Convert call_trans2open to create_file()
(This used to be commit 22138572bd)
2008-01-02 13:32:29 +01:00
Jeremy Allison
bd3521457c Allow encryption context setup on IPC$.
Jeremy.
(This used to be commit 5d424cb306)
2007-12-29 22:36:49 -08:00
Volker Lendecke
a59280792c Remove tiny code duplication
sid_size did the same as ndr_size_dom_sid
(This used to be commit 8aec5d09ba)
2007-12-29 23:12:51 +01:00
Jeremy Allison
38369ba741 Ensure we turn off POSIX large read/write if encryption
is mandatory or signing is on.
Jeremy.
(This used to be commit 5088b70479)
2007-12-28 00:02:13 -08:00
Jeremy Allison
afce2b245a Add the capability to set "smb encrypt = required"
on a share (or global) and have the server reply with
ACCESS_DENIED for all non-encrypted traffic (except
that used to query encryption requirements and set
encryption state).
Jeremy.
(This used to be commit d241bfa577)
2007-12-27 23:51:03 -08:00
Jeremy Allison
675f41dc14 Add "smb encrypt" parameter. Can be set to "no, yes, required".
Currently if set required this is not enforced. I'll be adding
that soon.
Jeremy.
(This used to be commit df7e447623)
2007-12-27 16:54:07 -08:00
Jeremy Allison
5413ad4aca Add CIFS_UNIX_TRANSPORT_ENCRYPTION_CAP capability to
our reported caps.
Jeremy.
(This used to be commit e86d027823)
2007-12-27 10:18:22 -08:00
Jeremy Allison
afc93255d1 Add SMB encryption. Still fixing client decrypt but
negotiation works.
Jeremy.
(This used to be commit d78045601a)
2007-12-26 17:12:36 -08:00
Volker Lendecke
d4bfafa29c Fix bug 5055
(This used to be commit 8bcd2df841)
2007-11-26 15:28:13 +01:00
Jeremy Allison
61b37c73ee Paranoia check that space_remaining never goes -ve.
Jeremy.
(This used to be commit 76f9c0b2dc)
2007-11-20 15:31:18 -08:00
Jeremy Allison
b059e2cbf1 Ensure we use PATH_MAX for symlinks.
Jeremy.
(This used to be commit a90ef69350)
2007-11-16 17:06:57 -08:00
Volker Lendecke
082da3d287 Fix a debug message
(This used to be commit a86849e4f9)
2007-11-05 03:40:18 +01:00
Jeremy Allison
73d4079680 Remove the smb_read_error global variable and replace
it with accessor functions. "One global or pstring a day...." :-).
Jeremy.
(This used to be commit d50d14c300)
2007-11-03 15:12:42 -07:00