Adding file auditing and changing the signature of one of the get nt acl functions

Richard Sharpe realrichardsharpe at gmail.com
Sat Apr 21 19:29:02 MDT 2012


Hi folks,

Here is what I am thinking of for the auditing function in the VFS. I
have also included one small change to the get nt acl VFS routine as
well so that we always pass down a struct smb_filename ... I am not
sure how much work will be required to fix that though.

Let me know if you think this needs to change or have a better
signature. I want to get the signature change and the default routine
into the code before we cut the next major branch. The actual details
in smbd can be done after we have the interface properly defined and
have time to code it up.

diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index e858235..dfd095b 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -362,7 +362,7 @@ struct vfs_fn_pointers {
                                   uint32 security_info,
                                   struct security_descriptor **ppdesc);
        NTSTATUS (*get_nt_acl_fn)(struct vfs_handle_struct *handle,
-                                 const char *name,
+                                 struct smb_filename *name,
                                  uint32 security_info,
                                  struct security_descriptor **ppdesc);
        NTSTATUS (*fset_nt_acl_fn)(struct vfs_handle_struct *handle,
@@ -370,6 +370,12 @@ struct vfs_fn_pointers {
                                   uint32 security_info_sent,
                                   const struct security_descriptor *psd);

+       NTSTATUS (*audit_file_fn)(struct vfs_handle_struct *handle,
+                                 struct smb_filename *file,
+                                 struct security_acl *sacl,
+                                 uint32_t access_requested,
+                                 uint32_t access_granted);
+
        /* POSIX ACL operations. */

        int (*chmod_acl_fn)(struct vfs_handle_struct *handle, const char *name,

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)


More information about the samba-technical mailing list