1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-17 15:17:09 +03:00

70 Commits

Author SHA1 Message Date
Jeremy Allison
f487f742cb Yay ! Remove a VFS entry. Removed the set_nt_acl() call,
this can only be done via fset_nt_acl() using an open
file/directory handle. I'd like to do the same with
get_nt_acl() but am concerned about efficiency
problems with "hide unreadable/hide unwritable" when
doing a directory listing (this would mean opening
every file in the dir on list).
Moving closer to rationalizing the ACL model and
maybe moving the POSIX calls into a posix_acl VFS
module rather than having them as first class citizens
of the VFS.
Jeremy.
2008-05-08 18:09:07 -07:00
Michael Adam
1429453551 Remove redundant parameter fd from SMB_VFS_CLOSE().
Now all those redundant fd's have vanished from the VFS API.

Michael
2008-04-21 00:22:42 +02:00
Michael Adam
d928e6648d Change fd_close_posix() to return int instead of NTSTATUS.
The errno is handed up through the VFS layer to the callers.

Michael
2008-04-21 00:21:24 +02:00
Michael Adam
3cf56b124a 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
2008-04-21 00:21:23 +02:00
Volker Lendecke
71641f04d4 Correctly check return of rename(2)
Bug 5279 -- Thanks to Max Matveev
2008-02-25 13:05:18 +01:00
Volker Lendecke
f12ac1eced Remove two unused variables 2008-01-23 10:33:36 +01:00
Volker Lendecke
5b05e09daf Attempt to fix the darwin build 2008-01-21 18:08:19 +01:00
Volker Lendecke
3ad798d803 Add SMB_VFS_FS_CAPABILITIES
It turns out that this is a necessary operation, separate from statvfs. statvfs
can fail during tcon, so conn->fs_capabilities would never see that we support
streams on a particular share.

James, can you check that I got the darwin variant right? Thanks!
2008-01-21 16:14:27 +01:00
Volker Lendecke
c34d729c7c 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()
2008-01-19 22:58:17 +01:00
Alexander Bokovoy
e342ca0d93 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.
2008-01-17 16:59:29 +03:00
Alexander Bokovoy
75cc086614 Rework of VFS is_offline() function to only return boolean offline/online result for a file.
This makes sense as upper levels are only taking returned result of 0
(no error) into consideration when deciding whether to mark file
offline/online as returned from is_offline.

That means that we simply can move the decision down to VFS module and
clean up upper levels so that they always see only file status. If there
is an error when trying to identify file status, then VFS module could
decide what to return (offline or online) by itself -- after all, it
ought to have system-specific knowledge anyway.
2008-01-17 14:57:35 +03:00
Jeremy Allison
bcc94aed6f Fix the mess that ab just made of the new VFS code.
NEEDS MORE TESTING !
Jeremy.
2008-01-16 17:22:31 -08:00
Alexander Bokovoy
875208724e 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>
2008-01-16 12:17:03 +03:00
Michael Adam
3958abffaf Combine fsp and tofd to tofsp in SMB_VFS_RECVFILE().
Michael
2008-01-11 01:27:05 +01:00
Michael Adam
a52cfb7d77 Combine fsp and fromfd to fromfsp in SMB_VFS_SENDFILE().
Michael
2008-01-11 01:27:05 +01:00
Michael Adam
c8ae7d095a Remove redundant parameter fd from SMB_VFS_WRITE().
Michael
2008-01-10 15:49:35 +01:00
Michael Adam
a8fc2ddad8 Remove redundant parameter fd from SMB_VFS_READ().
Michael
2008-01-10 15:33:51 +01:00
Michael Adam
3c997ae000 Remove redundant parameter fd from SMB_VFS_AIO_CANCEL().
Michael
2008-01-08 12:20:55 +01:00
Michael Adam
0bd2643463 Remove redundant parameter fd from SMB_VFS_FSETXATTR().
Michael
2008-01-08 11:47:33 +01:00
Michael Adam
bfc3b5a27f Remove redundant parameter fd from SMB_VFS_FREMOVEXATTR().
Michael
2008-01-08 11:29:09 +01:00
Michael Adam
167649b3b8 Remove redundant parameter fd from SMB_VFS_FLISTXATTR().
Michael
2008-01-08 10:51:40 +01:00
Michael Adam
2cb739a82d Remove redundant parameter fd from SMB_VFS_FGETXATTR().
Michael
2008-01-08 10:00:47 +01:00
Michael Adam
9296e93588 Remove redundant parameter fd from SMB_VFS_SYS_ACL_SET_FD().
Michael
2008-01-08 01:54:19 +01:00
Michael Adam
7b201c177b Remove redundant parameter fd from SMB_VFS_FCHMOD_ACL().
Michael
2008-01-08 01:14:24 +01:00
Michael Adam
42663e8736 Remove redundant parameter fd from SMB_VFS_SYS_ACL_GET_FD().
Michael
2008-01-07 23:54:07 +01:00
Michael Adam
ee5a20becd Remove redundant parameter fd from SMB_VFS_GETLOCK().
Michael
2008-01-07 22:18:50 +01:00
Michael Adam
8880eb82f1 Remove redundant parameter fd from SMB_VFS_LINUX_SETLEASE().
Michael
2008-01-07 21:47:56 +01:00
Michael Adam
195c519377 Remove redundant parameter fd from SMB_VFS_KERNEL_FLOCK().
Michael
2008-01-07 17:14:20 +01:00
Michael Adam
4f3ab2c406 Remove redundant parameter fd from SMB_VFS_LOCK().
Michael
2008-01-07 16:38:23 +01:00
Michael Adam
20691272a1 Fix the build: Fix caller of strict_allocate_ftruncate().
Michael
2008-01-07 16:12:03 +01:00
Michael Adam
2ad66050a0 Remove redundant parameter fd from SMB_VFS_FTRUNCATE().
Michael
2008-01-07 15:59:02 +01:00
Michael Adam
fbb193db3e Remove redundant parameter fd from SMB_VFS_FCHOWN().
Michael
2008-01-07 15:59:02 +01:00
Michael Adam
a54d5604da Remove redundant parameter fd from SMB_VFS_FCHMOD().
Michael
2008-01-07 15:59:02 +01:00
Michael Adam
0b86c420be Remove redundant parameter fd from SMB_VFS_FSTAT().
Michael
2008-01-07 15:59:01 +01:00
Michael Adam
8f83c9a7b2 Remove redundant parameter fd from SMB_VFS_FSYNC().
Michael
2008-01-07 15:59:01 +01:00
Michael Adam
df929796f2 Remove redundant parameter fd from SMB_VFS_LSEEK().
Michael
2008-01-07 15:59:01 +01:00
Michael Adam
8c4901a19a Remove redundant parameter fd from SMB_VFS_PWRITE().
Michael
2008-01-07 15:59:01 +01:00
Michael Adam
73e28806ce Remove unneeded parameter fd from SMB_VFS_PREAD().
Michael
2008-01-07 00:14:19 +01:00
Michael Adam
4f2d139a18 Remove superfluous parameter fd from SMB_VFS_FSET_NT_ACL().
Michael
2008-01-06 23:08:00 +01:00
Michael Adam
c0c7c1223d Remove superfluous fd parameter from SMB_VFS_FGET_NT_ACL().
Michael
2008-01-06 23:07:59 +01:00
Michael Adam
b5f600fab5 Change the prototype of the vfs function get_nt_acl().
Up to now, get_nt_acl() took a files_struct pointer (fsp) and
a file name. All the underlying functions should need and now
do need (after the previous preparatory work), is a connection_struct
and a file name. The connection_struct is already there in the
vfs_handle passed to the vfs functions. So the files_struct
argument can be eliminated.

This eliminates the need of calling open_file_stat in a couple
of places to produce the fsp needed.

Michael
2007-12-19 23:08:01 +01:00
Michael Adam
50c82cc145 Split get_nt_acl() into two functions: fsp- and non-fsp variant.
Replace smbd/posix_acls.c:get_nt_acl() by two funcions:
posix_get_nt_acl() and posix_fget_nt_acl(). The first
takes a connection struct and a file name instead of a
files_struct pointer. This is in preparation of changing
the vfs api for SMB_VFS_GET_NT_ACL.

Michael
2007-12-19 23:07:56 +01:00
Volker Lendecke
dcbe1bf942 Make [f]get_nt_acl return NTSTATUS 2007-11-13 15:47:01 +01:00
Jeremy Allison
bfbdb6324c Add in the recvfile entry to the VFS layer with a default
implementation. Needed for the zero-copy write code.
Jeremy.
2007-10-29 17:16:13 -07:00
Jeremy Allison
f35a266b3c 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.
2007-10-18 17:40:25 -07:00
Gerald (Jerry) Carter
5c6c8e1fe9 [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch. 2007-10-10 15:34:30 -05:00
Stefan Metzmacher
cdaa24e804 r24120: add a file_id_create() hook into the VFS layer
it's needed for some cluster filesystems to
overload this function.

metze
2007-10-10 12:29:08 -05:00
James Peach
234cb7c893 r23962: Linux oplock support is conditional on HAVE_KERNEL_OPLOCKS_LINUX,
not plain old LINUX.
2007-10-10 12:28:49 -05:00
Andrew Tridgell
b0132e94fc r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
Jeremy Allison
407e6e695b r23779: Change from v2 or later to v3 or later.
Jeremy.
2007-10-10 12:28:20 -05:00