diff options
author | Volker Lendecke <vl@samba.org> | 2014-08-07 10:23:25 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-08-07 22:12:12 +0200 |
commit | 02d22d6a6143d5ed818932f9190cf1a8a94e250a (patch) | |
tree | 9fca2a3fe6753f222e3bda43c7a19ad196adf48a /source3/modules/vfs_full_audit.c | |
parent | a6e098fb221eb581b99e9b31f221462ee6b7b1cb (diff) | |
download | samba-02d22d6a6143d5ed818932f9190cf1a8a94e250a.tar.gz samba-02d22d6a6143d5ed818932f9190cf1a8a94e250a.tar.xz samba-02d22d6a6143d5ed818932f9190cf1a8a94e250a.zip |
vfs_full_audit: Pass "vfs_full_audit_private_data" to log_failure/success()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/modules/vfs_full_audit.c')
-rw-r--r-- | source3/modules/vfs_full_audit.c | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c index 262b241147..90d27dfbb3 100644 --- a/source3/modules/vfs_full_audit.c +++ b/source3/modules/vfs_full_audit.c @@ -385,14 +385,8 @@ static char *audit_prefix(TALLOC_CTX *ctx, connection_struct *conn) return result; } -static bool log_success(vfs_handle_struct *handle, vfs_op_type op) +static bool log_success(struct vfs_full_audit_private_data *pd, vfs_op_type op) { - struct vfs_full_audit_private_data *pd = NULL; - - SMB_VFS_HANDLE_GET_DATA(handle, pd, - struct vfs_full_audit_private_data, - return True); - if (pd->success_ops == NULL) { return True; } @@ -400,14 +394,8 @@ static bool log_success(vfs_handle_struct *handle, vfs_op_type op) return bitmap_query(pd->success_ops, op); } -static bool log_failure(vfs_handle_struct *handle, vfs_op_type op) +static bool log_failure(struct vfs_full_audit_private_data *pd, vfs_op_type op) { - struct vfs_full_audit_private_data *pd = NULL; - - SMB_VFS_HANDLE_GET_DATA(handle, pd, - struct vfs_full_audit_private_data, - return True); - if (pd->failure_ops == NULL) return True; @@ -498,16 +486,21 @@ static TALLOC_CTX *do_log_ctx(void) static void do_log(vfs_op_type op, bool success, vfs_handle_struct *handle, const char *format, ...) { + struct vfs_full_audit_private_data *pd; fstring err_msg; char *audit_pre = NULL; va_list ap; char *op_msg = NULL; int priority; - if (success && (!log_success(handle, op))) + SMB_VFS_HANDLE_GET_DATA(handle, pd, + struct vfs_full_audit_private_data, + return;); + + if (success && (!log_success(pd, op))) goto out; - if (!success && (!log_failure(handle, op))) + if (!success && (!log_failure(pd, op))) goto out; if (success) |