From 69bb8853f61212074a7095055fb3570660a1cc27 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 16 Jun 2022 12:05:19 -0700 Subject: s3: VFS: full_audit. Ensure the module doesn't load if an operation name is miss-spelled or otherwise unknown. Document this new behavior. Remove knownfail. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15098 Signed-off-by: Jeremy Allison Reviewed-by: Andrew Bartlett --- source3/modules/vfs_full_audit.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source3/modules/vfs_full_audit.c') diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c index 167f446938b..6d38738ac52 100644 --- a/source3/modules/vfs_full_audit.c +++ b/source3/modules/vfs_full_audit.c @@ -751,9 +751,19 @@ static int smb_full_audit_connect(vfs_handle_struct *handle, pd->success_ops = init_bitmap( pd, lp_parm_string_list(SNUM(handle->conn), "full_audit", "success", none)); + if (pd->success_ops == NULL) { + DBG_ERR("Invalid success operations list. Failing connect\n"); + SMB_VFS_NEXT_DISCONNECT(handle); + return -1; + } pd->failure_ops = init_bitmap( pd, lp_parm_string_list(SNUM(handle->conn), "full_audit", "failure", none)); + if (pd->failure_ops == NULL) { + DBG_ERR("Invalid failure operations list. Failing connect\n"); + SMB_VFS_NEXT_DISCONNECT(handle); + return -1; + } /* Store the private data. */ SMB_VFS_HANDLE_SET_DATA(handle, pd, NULL, -- cgit v1.2.1