The Samba-Bugzilla – Attachment 5353 Details for
Bug 4025
vfs_full_audit.c success/fail config needs logical NOT
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch
0001-s3-vfs_full_audit.c-support-negated-vfs-functions-in.patch (text/plain), 1.81 KB, created by
Holger Hetterich
on 2010-02-15 13:55:09 UTC
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Holger Hetterich
Created:
2010-02-15 13:55:09 UTC
Size:
1.81 KB
patch
obsolete
>From 6075ab79ae82be01a94a421c81da316fa55e1f99 Mon Sep 17 00:00:00 2001 >From: Holger Hetterich <hhetter@novell.com> >Date: Mon, 15 Feb 2010 20:49:58 +0100 >Subject: [PATCH] s3: vfs_full_audit.c: support negated vfs functions in the success list > >Supports negated arguments in configuration like: >full_audit:success = all !readdir !telldir !closedir >Part of BSO#4025 >--- > source3/modules/vfs_full_audit.c | 17 ++++++++++++++--- > 1 files changed, 14 insertions(+), 3 deletions(-) > >diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c >index 19ac7ad..9f4d44d 100644 >--- a/source3/modules/vfs_full_audit.c >+++ b/source3/modules/vfs_full_audit.c >@@ -433,8 +433,9 @@ static bool log_failure(vfs_handle_struct *handle, vfs_op_type op) > > static void init_bitmap(struct bitmap **bm, const char **ops) > { >+ int i; > bool log_all = False; >- >+ bool negated_ops = False; > if (*bm != NULL) > return; > >@@ -447,9 +448,14 @@ static void init_bitmap(struct bitmap **bm, const char **ops) > } > > while (*ops != NULL) { >- int i; > bool found = False; > >+ if (*ops[0] == '!' && negated_ops == False) { >+ for (i=0; i<SMB_VFS_OP_LAST; i++) bitmap_set(*bm, i); >+ negated_ops = True; >+ } >+ >+ > if (strequal(*ops, "all")) { > log_all = True; > break; >@@ -469,6 +475,11 @@ static void init_bitmap(struct bitmap **bm, const char **ops) > bitmap_set(*bm, i); > found = True; > } >+ if (*ops[0] == '!' >+ && strequal(*ops + 1,vfs_op_names[i].name)) { >+ bitmap_unset(*bm,i); >+ found = True; >+ } > } > if (!found) { > DEBUG(0, ("Could not find opname %s, logging all\n", >@@ -479,7 +490,7 @@ static void init_bitmap(struct bitmap **bm, const char **ops) > ops += 1; > } > >- if (log_all) { >+ if (log_all && !negated_ops) { > /* The query functions default to True */ > bitmap_free(*bm); > *bm = NULL; >-- >1.6.4.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 4025
:
5353
|
5381
|
5408
|
5431