summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_full_audit.c
AgeCommit message (Collapse)AuthorFilesLines
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.
2010-11-20Move the uglyness of #ifdef REALPATH_TAKES_NULL into the vfs_defaultJeremy Allison1-2/+2
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-08-06s3-netlogon: remove global include of netlogon.h.Günther Deschner1-0/+1
This reduces precompiled headers by another 4 MB and also slightly speeds up the build. Guenther
2010-05-28s3:auth use info3 in auth_serversupplied_infoSimo Sorce1-1/+1
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-18s3-secdesc: remove "typedef struct security_descriptor SEC_DESC".Günther Deschner1-3/+3
Guenther
2010-04-05Fix related to bug #7326 - can't read/write any files with full_auditVolker Lendecke1-2/+3
2010-03-28s3: Use bitmap_talloc in vfs_full_audit.cVolker Lendecke1-40/+20
This also simplifies the calling convention for init_bitmap() slightly
2010-03-05Fix for bug #7189 - Open txt files with notepad on samba shares creates problem.Jeremy Allison1-0/+2
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-02-28s3: vfs_full_audit.c: implement negated vfs_ops in the success/failure listHolger Hetterich1-24/+31
Supports negated arguments in configuration like: full_audit:success = all !readdir !telldir !closedir Update the manpage accordingly. Part of BSO#4025
2009-11-30Restructure the connect function code to always callJeremy Allison1-5/+5
down to NEXT-> before initializing. This allows us to do cleanup (by calling DISCONNECT) if initialization fails. Also fix vfs_acl_xattr which was failing to call the NEXT connect function. Jeremy.
2009-11-18s3: Do not talloc in readdirVolker Lendecke1-4/+7
This is a hot codepath (called from the stat cache)
2009-10-06s3: Add access_mask to the flock VFS callAbhidnya P Chirmule1-2/+2
2009-09-24vfs catia: Fix the double translation that was happening with createfile and ↵Aravind Srinivasan1-2/+3
open. Since the catia translation is implemented for open, it should not also be done in createfile. By removing createfile from catia, translation is now done correctly for the primary open path. In order to support systems that have custom createfile implementations that don't eventually call SMB_VFS_OPEN, SMB_VFS_TRANSLATE_NAME has been expanded to take an additional argument that specifies direction. Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-08-28s3: Add a new VFS op called SMB_VFS_TRANSLATE_NAMEAravind Srinivasan1-0/+15
This vop is designed to work in tandem with SMB_VFS_READDIR to allow vfs modules to make modifications to arbitrary filenames before they're consumed by callers. Subsequently the core directory enumeration code in smbd is now changed to free the memory that may be allocated in a module. This vop enables the new version of catia in the following patch. Signed-off-by: Tim Prouty <tprouty@samba.org>
2009-08-26s3: Allow full_audit to play nice with smbd if it's using syslogtprouty1-1/+11
Explictly pass the facility from both smbd and full_audit to syslog. Really the only major change is to not call openlog() in full_audit if WITH_SYSLOG is defined, which implies that smbd is already using syslog. This allows full audit to piggy-back on the same ident as smbd, while still differentiating the logging via the facility.
2009-08-26s3 audit: Change create_file in full_audit to print whether a directory or ↵tprouty1-2/+28
file was requested full_audit will now print out whether the createfile was requested for a file or directory. The create disposition is also printed out.
2009-08-24Second attempt at fix for bug 6529 - Offline files conflict with Vista and ↵Jeremy Allison1-2/+2
Office 2003. Confirmation from reporter that this fixes the issue in master on ext3/ext4. Back-ports to follow. Jeremy.
2009-07-24Move the "enum _vfs_op_type" to full_auditVolker Lendecke1-0/+142
It's only used there now. Someone should now go in and simplify full_audit... :-)
2009-07-24Make the smbd VFS typesafeVolker Lendecke1-244/+112
2009-07-20s3: Finish plumbing the fsp->fsp_name smb_fname conversion through the modules.Tim Prouty1-39/+54
2009-07-19Fix a few type errors in VFS modulesVolker Lendecke1-2/+2
2009-07-06s3: Plumb smb_filename through SMB_VFS_NTIMESTim Prouty1-3/+5
2009-07-06s3: Plumb smb_filename through SMB_VFS_UNLINKTim Prouty1-3/+4
2009-07-06s3 audit: Remove some recently introduced memory leaks in the audit modulesTim Prouty1-9/+42
2009-07-06s3 audit: Remove the usesless static function declarations from the audit ↵Tim Prouty1-539/+248
modules
2009-07-06s3: Plumb smb_filename through SMB_VFS_RENAMETim Prouty1-4/+8
2009-06-24s3: Plumb smb_filename through SMB_VFS_STAT and SMB_VFS_LSTATTim Prouty1-8/+10
This patch introduces two new temporary helper functions vfs_stat_smb_fname and vfs_lstat_smb_fname. They basically allowed me to call the new smb_filename version of stat, while avoiding plumbing it through callers that are still too inconvenient. As the conversion moves along, I will be able to remove callers of this, with the goal being to remove all callers. There was also a bug in create_synthetic_smb_fname_split (also a temporary utility function) that caused it to incorrectly handle filenames with ':'s in them when in posix mode. This is now fixed.
2009-06-17s3: Change SMB_VFS_OPEN to take an smb_filename structTim Prouty1-4/+5
This was a little messy because of all of the vfs modules I had to touch. Most of them were pretty straight forward, but the streams modules required a little attention to handle smb_filename. Since the use of smb_filename enables the vfs modules to access the raw, over-the-wire stream, a little bit of the handling that was being done by split_ntfs_stream_name has now been shifted into the individual stream modules. It may be a little more code, but overall it gives more flexibility to the streams modules, while also allowing correct stream handling.