summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_full_audit.c
AgeCommit message (Collapse)AuthorFilesLines
2013-09-11smbd: Add brl_fsp access functionVolker Lendecke1-3/+6
2013-01-16s3-vfs: add copy_chunk vfs hooksDavid Disseldorp1-0/+38
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>
2012-10-11vfs: Remove type parameter from sys_acl_blob_get_{fd,file}Andrew Bartlett1-2/+1
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-11smbd: Add mem_ctx to {f,}get_nt_acl VFS callAndrew Bartlett1-4/+8
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-11smbd: Add mem_ctx to sys_acl_init() and all callersAndrew Bartlett1-4/+5
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-09-28vfs: check full_audit enum->str mapping on startupDavid Disseldorp1-3/+4
Signed-off-by: Jim McDonough <jmcd@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Fri Sep 28 19:28:49 CEST 2012 on sn-devel-104
2012-09-28vfs: add missing pwrite ops to full_auditDavid Disseldorp1-0/+2
The op enum is used by audit_opname() as an index into the vfs_op_names array, so any decrepencies cause bogus audit log entries. Signed-off-by: Jim McDonough <jmcd@samba.org>
2012-09-20vfs: fix acl_blob_get* in vfs_full_auditDavid Disseldorp1-9/+11
Plumb-in functions and use correct return types. Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Thu Sep 20 20:42:09 CEST 2012 on sn-devel-104
2012-09-20vfs: fix lock logging in vfs_full_auditDavid Disseldorp1-4/+4
2012-09-12smbd: Add extra VFS hooks to get the posix ACL as a blobAndrew Bartlett1-0/+37
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-08-15s3-smbd: Remove sys_acl_*() VFS wrapper functionsAndrew Bartlett1-302/+0
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 3bb219161a270f12c27c3bc7e1220829c6e9f284. Andrew Bartlett
2012-08-08vfs_full_audit: Remove some unnecessary return; statementsBjörn Jacke1-9/+0
2012-07-18s3-vfs: async fsyncVolker Lendecke1-0/+74
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18s3-aio: Remove unused VFS functions and moreVolker Lendecke1-98/+0
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18s3-vfs: Add pwrite_send/recv to vfs modulesVolker Lendecke1-0/+75
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18s3-vfs: Add pread_send/recv to vfs modulesVolker Lendecke1-0/+77
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-07-18loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.Rusty Russell1-2/+2
They use talloc_tos() internally: hoist that up to the callers, some of whom don't want to us talloc_tos(). A simple patch, but hits a lot of files. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-04-06build: Remove SMB_OFF_T, replace with off_tAndrew Bartlett1-11/+11
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-05s3-vfs: Remove unused lremovexattr call from VFS modules, system.c and configureAndrew Bartlett1-17/+0
If this is ever needed again, it would be more appropriate as an options argument to removexattr. Andrew Bartlett
2012-04-05s3-vfs: Remove unused lsetxattr call from VFS modules, system.c and configureAndrew Bartlett1-19/+0
If this is ever needed again, it would be more appropriate as an options argument to listxattr. Andrew Bartlett
2012-04-05s3-vfs: Remove unused llistxattr call from VFS modules, system.c and configureAndrew Bartlett1-15/+0
If this is ever needed again, it would be more appropriate as an options argument to listxattr. Andrew Bartlett
2012-04-05s3-vfs: Remove unused lgetxattr call from VFS modules, system.c and configureAndrew Bartlett1-17/+0
2012-04-05build: Remove SMB_STRUCT_DIR defineAndrew Bartlett1-10/+10
2012-04-05build: Remove SMB_STRUCT_DIRENT defineAndrew Bartlett1-2/+2
2012-03-26s3: Pass filters explicitly through vfs notify watchVolker Lendecke1-2/+4
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-21s3: Pass "path" through vfs_notify_watchVolker Lendecke1-1/+3
2011-12-12vfs: Make function pointer names consistent. They all end in _fnRichard Sharpe1-110/+110
Autobuild-User: Richard Sharpe <sharpe@samba.org> Autobuild-Date: Mon Dec 12 04:58:40 CET 2011 on sn-devel-104
2011-07-20s3-auth use auth_user_info not netr_SamInfo3 in auth3_session_infoAndrew Bartlett1-1/+1
This makes auth3_session_info identical to auth_session_info The logic to convert the info3 to a struct auth_user_info is essentially moved up the stack from the named pipe proxy in source3/rpc_server to create_local_token(). Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20s3-auth Use struct auth_user_info_unix for unix_name and sanitized_usernameAndrew Bartlett1-2/+2
This is closer to the layout of struct auth_session_info in auth.idl Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20s3-auth Use *unix_token rather than utok in struct auth3_session_infoAndrew Bartlett1-1/+1
This brings this structure one step closer to the struct auth_session_info. A few SMB_ASSERT calls are added in some key places to ensure that this pointer is initialised, to make tracing any bugs here easier in future. NOTE: Many of the users of this structure should be reviewed, as unix and NT access checks are mixed in a way that should just be done using the NT ACL. This patch has not changed this behaviour however. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-08lib/util Move bitmap.c to lib/utilAndrew Bartlett1-0/+1
2011-06-29param: Merge param headers into lib/param/loadparm.hAndrew Bartlett1-0/+1
This defines a common table format, so we can in future define a common table. Andrew Bartlett
2011-06-09s3-talloc Change TALLOC_ZERO_P() to talloc_zero()Andrew Bartlett1-1/+1
Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_P isn't standard talloc.
2011-06-01Remove the char * argument from the SMB_VFS_GETWD() call. Now alwaysJeremy Allison1-4/+4
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-05-31s3: Remove SHADOW_COPY_DATA typedefVolker Lendecke1-1/+2
2011-05-25Fix bug #8165 - Inverted WITH_SYSLOG condition in vfs_full_audit.c.Jeremy Allison1-1/+1
Found by freeserif@yahoo.com. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed May 25 22:37:23 CEST 2011 on sn-devel-104
2011-05-24s3:vfs properly terminate enums in audit modulesChristian Ambach1-2/+4
without the proper terminations of the enums, invalid arguments for the audit modules will lead to a smbd crash as the loop in lp_enum() will attempt to access memory behind the array
2011-04-21s3-vfs: rename open function to open_fn.Günther Deschner1-1/+1
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-03-30s3: only include ntioctl.h where needed.Günther Deschner1-0/+1
Guenther
2011-03-30s3-auth: vfs modules need auth.hGünther Deschner1-0/+1
Guenther
2011-03-30s3-vfs: include smbd/smbd.h in vfs modules.Günther Deschner1-0/+1
Guenther
2011-03-30s3-includes: only include system/filesys.h when needed.Günther Deschner1-0/+1
Guenther
2011-03-30s3-includes: only include system/syslog.h when needed.Günther Deschner1-0/+1
Guenther
2011-03-02s3: Pass smb_filename through the set_offline vfs opVolker Lendecke1-0/+12
2011-03-02s3: Pass smb_filename through the is_offline vfs opVolker Lendecke1-0/+13
2011-03-02s3: Fix operation names in vfs_full_audit.cVolker Lendecke1-2/+2
2011-02-22s3-auth Rename auth_serversupplied_info varaiables: server_info -> session_infoAndrew Bartlett1-4/+4
These variables, of type struct auth_serversupplied_info were poorly named when added into 2001, and in good consistant practice, this has extended all over the codebase in the years since. The structure is also not ideal for it's current purpose. Originally intended to convey the results of the authentication modules, it really describes all the essential attributes of a session. This rename will reduce the volume of a future patch to replaced these with a struct auth_session_info, with auth_serversupplied_info confined to the lower levels of the auth subsystem, and then eliminated. (The new structure will be the output of create_local_token(), and the change in struct definition will ensure that this is always run, populating local groups and privileges). Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-02-09Add fdopendir to the VFS. We will use this to reuse a directory fd already ↵Jeremy Allison1-0/+16
open by NtCreateX. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Feb 9 00:55:22 CET 2011 on sn-devel-104
2010-12-18Rename vfs operation posix_fallocate to just fallocate and add the ↵Jeremy Allison1-6/+7
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-02Move posix_fallocate into the VFS where it belongs.Jeremy Allison1-0/+17
Jeremy.