--- vfs_full_audit.c.orig 2006-01-16 15:29:14.000000000 +0000 +++ vfs_full_audit.c 2006-01-16 15:31:12.000000000 +0000 @@ -667,7 +667,7 @@ static BOOL log_success(vfs_op_type op) { if (success_ops == NULL) - return True; + return False; return bitmap_query(success_ops, op); } @@ -677,7 +677,7 @@ static BOOL log_failure(vfs_op_type op) { if (failure_ops == NULL) - return True; + return False; return bitmap_query(failure_ops, op); } @@ -776,16 +776,25 @@ { int result; const char *none[] = { NULL }; - const char *all [] = { "all" }; openlog("smbd_audit", 0, audit_syslog_facility(handle)); + + if (success_ops) { + bitmap_free(success_ops); + success_ops = NULL; + } + + if (failure_ops) { + bitmap_free(failure_ops); + failure_ops = NULL; + } init_bitmap(&success_ops, lp_parm_string_list(SNUM(conn), "full_audit", "success", none)); init_bitmap(&failure_ops, lp_parm_string_list(SNUM(conn), "full_audit", "failure", - all)); + none)); result = SMB_VFS_NEXT_CONNECT(handle, conn, svc, user); @@ -803,12 +812,6 @@ do_log(SMB_VFS_OP_DISCONNECT, True, handle, "%s", lp_servicename(SNUM(conn))); - bitmap_free(success_ops); - success_ops = NULL; - - bitmap_free(failure_ops); - failure_ops = NULL; - return; }