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

37 Commits

Author SHA1 Message Date
Volker Lendecke
07948ef6e1 smbd: Add brl_fsp access function 2013-09-11 08:27:11 +02:00
David Disseldorp
ef00eb90e5 s3-vfs: add copy_chunk vfs hooks
copy_chunk copies n bytes from a source file at a specific offset to a
destination file at a given offset. This interface will be used in
handling smb2 FSCTL_SRV_COPYCHUNK ioctl requests.

Use a pread/pwrite loop in vfs_default, so that requests referring to
the same src and dest file are possible.

Provide send and receive hooks for copy chunk VFS interface, allowing
asynchronous behaviour.

Check whether the request source offset + length exceeds the current
size. Return STATUS_INVALID_VIEW_SIZE under such a condition, matching
Windows server behaviour.

Reviewed by: Jeremy Allison <jra@samba.org>
2013-01-16 23:15:06 +01:00
Andrew Bartlett
1f36ec1293 vfs: Remove type parameter from sys_acl_blob_get_{fd,file}
This interface actually needs to match the get_nt_acl interface in
that the system ACL implmenetation may not be posix ACLs, and the blob
is not meant to be enforced to be of a particular system ACL
structure.

Andrew Bartlett
2012-10-11 12:25:11 +11:00
Andrew Bartlett
c8ade07760 smbd: Add mem_ctx to {f,}get_nt_acl VFS call
This makes it clear which context the returned SD is allocated on, as
a number of callers do not want it on talloc_tos().

As the ACL transformation allocates and then no longer needs a great
deal of memory, a talloc_stackframe() call is used to contain the
memory that is not returned further up the stack.

Andrew Bartlett
2012-10-11 12:25:11 +11:00
Andrew Bartlett
9158974540 smbd: Add mem_ctx to sys_acl_init() and all callers
This changes from allocation on NULL to allocation on the supplied
memory context.

Currently that supplied context is talloc_tos() at the the final consumer of
the ACL.

Andrew Bartlett
2012-10-11 12:25:11 +11:00
Andrew Bartlett
e8375ddf2d smbd: Add extra VFS hooks to get the posix ACL as a blob
This will allow us to hash this, rather than the NT ACL it maps to.
This will in turn allow us to know if the NT ACL is valid even if we
have to change the mapping code.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Sep 12 07:06:01 CEST 2012 on sn-devel-104
2012-09-12 07:06:01 +02:00
Christof Schmitt
5765d73f72 s3:vfs/time_audit: Add back pointer for sys_acl_delete_def_file_fn
Commit e25830dcd8 removed the function
pointer from the time_audit module, although the VFS function still
exists. Add the function pointer again in time_audit as this seems
to be an accidentally deletion.

Signed-off-by: Christian Ambach <ambi@samba.org>
2012-09-10 17:58:19 +02:00
Ralph Wuerthner
dc9b622d75 s3:vfs/time_audit: add path names to log messages
Signed-off-by: Christian Ambach <ambi@samba.org>
2012-09-10 17:58:19 +02:00
Andrew Bartlett
e25830dcd8 s3-smbd: Remove sys_acl_*() VFS wrapper functions
We no longer do struct smb_acl_t manipuations via the VFS layer,
which is now reduced to handling the get/set functions.

The only backend that implemented these functions (aside from audit)
was the vfs_default module calling the sys_acl code.  The various ACL
implementation modules either worked on the fully initilaised
smb_acl_t object or on NT ACLs.

This not only makes the operation of the posix ACL code more efficient
(as allocation and free is not put via the VFS), it makes it easier to
test and removes the fantasy that a module could safely redefine this
structure or the behaviour here.

The smb_acls.idl now defines the structure, and it is now allocated
with talloc.

These operations were originally added to the VFS in commit
3bb219161a.

Andrew Bartlett
2012-08-15 11:44:50 +10:00
Björn Jacke
3f9b2cc682 vfs_time_audit: Remove some unnecessary return; statements 2012-08-08 00:21:26 +02:00
Volker Lendecke
5d09cec6fe s3-vfs: async fsync
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:48:04 -07:00
Volker Lendecke
9dc78c90f3 s3-aio: Remove unused VFS functions and more
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:45:58 -07:00
Volker Lendecke
be05dad399 s3-vfs: Add pwrite_send/recv to vfs modules
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:45:14 -07:00
Volker Lendecke
90461aa023 s3-vfs: Add pread_send/recv to vfs modules
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18 15:44:53 -07:00
Andrew Bartlett
6aa12fcb30 build: Remove SMB_OFF_T, replace with off_t
Now that we always require a 64 bit off_t, we no longer need SMB_OFF_T.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Apr  6 01:47:43 CEST 2012 on sn-devel-104
2012-04-06 01:47:43 +02:00
Andrew Bartlett
19eee33d82 s3-vfs: Remove unused lremovexattr call from VFS modules, system.c and configure
If this is ever needed again, it would be more appropriate as an options argument
to removexattr.

Andrew Bartlett
2012-04-05 13:39:01 +10:00
Andrew Bartlett
c70ac29c54 s3-vfs: Remove unused lsetxattr call from VFS modules, system.c and configure
If this is ever needed again, it would be more appropriate as an options argument
to listxattr.

Andrew Bartlett
2012-04-05 13:39:00 +10:00
Andrew Bartlett
c5b17c5555 s3-vfs: Remove unused llistxattr call from VFS modules, system.c and configure
If this is ever needed again, it would be more appropriate as an options argument
to listxattr.

Andrew Bartlett
2012-04-05 13:39:00 +10:00
Andrew Bartlett
b2f7cfa848 s3-vfs: Remove unused lgetxattr call from VFS modules, system.c and configure 2012-04-05 13:39:00 +10:00
Andrew Bartlett
f6e0532024 build: Remove SMB_STRUCT_DIR define 2012-04-05 02:39:09 +02:00
Andrew Bartlett
2320b2144f build: Remove SMB_STRUCT_DIRENT define 2012-04-05 02:39:09 +02:00
Volker Lendecke
fa6f61e835 s3: Pass filters explicitly through vfs notify watch
This removes a dependency on "struct notify_entry" and makes the nature of the
API more explicit. We depend upon the VFS module to mask out elements from
e->filter and e->subdir_filter that it took over to handle.

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Mon Mar 26 17:45:44 CEST 2012 on sn-devel-104
2012-03-26 17:45:43 +02:00
Volker Lendecke
4319076cca s3: Pass "path" through vfs_notify_watch 2012-03-21 12:52:09 +01:00
Richard Sharpe
422494a8e6 vfs: Make function pointer names consistent. They all end in _fn
Autobuild-User: Richard Sharpe <sharpe@samba.org>
Autobuild-Date: Mon Dec 12 04:58:40 CET 2011 on sn-devel-104
2011-12-12 04:58:40 +01:00
Christian Ambach
bb66504dad s3:modules fix Bug 8244 - Cannot copy files larger than 2 GB to Samba share
the time_audit module uses int instead of uint64 as return value
in get_alloc_size so that sizes of files larger than 2 GB are
cut of leading to wrong replies to NtCreateAndX and Windows
clients giving up

While checking the types of all functions, I found two more wrong
return value types that needed correction

Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Fri Jun 17 23:11:10 CEST 2011 on sn-devel-104
2011-06-17 23:11:10 +02:00
Jeremy Allison
c7d2f6d35a Remove the char * argument from the SMB_VFS_GETWD() call. Now always
returns malloc'ed memory.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Jun  1 04:06:12 CEST 2011 on sn-devel-104
2011-06-01 04:06:12 +02:00
Volker Lendecke
0ec9a90c29 s3: Remove SHADOW_COPY_DATA typedef 2011-05-31 21:47:07 +02:00
Günther Deschner
c7073f8b54 s3-vfs: rename open function to open_fn.
This should finally fix the AIX build and allow to remove AIX specific ifdefs.

Guenther

Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Apr 21 02:01:20 CEST 2011 on sn-devel-104
2011-04-21 02:01:20 +02:00
Günther Deschner
b1e3b9d7c1 s3: only include ntioctl.h where needed.
Guenther
2011-03-30 01:13:10 +02:00
Günther Deschner
45364f5e69 s3-vfs: include smbd/smbd.h in vfs modules.
Guenther
2011-03-30 01:13:08 +02:00
Jeremy Allison
a674a56a97 Add fdopendir to the VFS. We will use this to reuse a directory fd already open by NtCreateX.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Feb  9 00:55:22 CET 2011 on sn-devel-104
2011-02-09 00:55:22 +01:00
Jeremy Allison
716ea734e4 Rename vfs operation posix_fallocate to just fallocate and add the vfs_fallocate_mode parameter.
It turns out we need the fallocate operations to be able to both
allocate and extend filesize, and to allocate and not extend
filesize, and posix_fallocate can only do the former. So by defining
the vfs op as posix_fallocate we lose the opportunity to use any
underlying syscalls (like Linux fallocate) that can do the latter
as well.

We don't currently use the non-extending filesize call, but now
I've changed the vfs op definition we can in the future. For the
moment simply map the fallocate op onto posix_fallocate for the
VFS_FALLOCATE_EXTEND_SIZE case and return ENOSYS for the
VFS_FALLOCATE_KEEP_SIZE case.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Dec 18 08:59:27 CET 2010 on sn-devel-104
2010-12-18 08:59:27 +01:00
Jeremy Allison
5819a36aef Move posix_fallocate into the VFS where it belongs.
Jeremy.
2010-12-02 16:25:59 -08:00
Jeremy Allison
2b788aa6ce Move the uglyness of #ifdef REALPATH_TAKES_NULL into the vfs_default
module, change the signature of VFS_REALPATH to always return a
malloc'ed string.

Needed to make some privileges work I plan on doing shortly
easier to code.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Nov 20 02:15:50 CET 2010 on sn-devel-104
2010-11-20 02:15:50 +01:00
Björn Jacke
fa203f4541 s3/time_audit: fix a change that was just for debuggin purposeѕ
Autobuild-User: Björn Jacke <bjacke@samba.org>
Autobuild-Date: Wed Nov 10 12:28:41 UTC 2010 on sn-devel-104
2010-11-10 12:28:41 +00:00
Björn Jacke
692a7477dd s3/vfs_time_audit: use monotonic clock for time deltas
Autobuild-User: Björn Jacke <bjacke@samba.org>
Autobuild-Date: Wed Nov 10 01:13:22 UTC 2010 on sn-devel-104
2010-11-10 01:13:22 +00:00
Abhidnya P Chirmule
2cfee006e1 s3: Add a vfs_time_audit module
This warns if a file system is slow

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Oct 28 08:56:44 UTC 2010 on sn-devel-104
2010-10-28 08:56:44 +00:00