summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@samba.org>2012-09-27 12:34:53 +0200
committerDavid Disseldorp <ddiss@samba.org>2012-09-28 19:28:49 +0200
commit0d7a2af9084c376ad4f664389bb8a59dd6887ab7 (patch)
tree5ea5b7dd2ddc808a787e7aaf8367a98a13104913 /source3
parente8e91fbbab16c7bcaa9665839d86c7d169e89fff (diff)
downloadsamba-0d7a2af9084c376ad4f664389bb8a59dd6887ab7.tar.gz
samba-0d7a2af9084c376ad4f664389bb8a59dd6887ab7.tar.bz2
samba-0d7a2af9084c376ad4f664389bb8a59dd6887ab7.zip
vfs: check full_audit enum->str mapping on startup
Signed-off-by: Jim McDonough <jmcd@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Fri Sep 28 19:28:49 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/modules/vfs_full_audit.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index 5c5f91cfd0..6050c55027 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -203,7 +203,7 @@ typedef enum _vfs_op_type {
SMB_VFS_OP_LAST
} vfs_op_type;
-/* The following array *must* be in the same order as defined in vfs.h */
+/* The following array *must* be in the same order as defined in vfs_op_type */
static struct {
vfs_op_type type;
@@ -444,9 +444,10 @@ static struct bitmap *init_bitmap(TALLOC_CTX *mem_ctx, const char **ops)
}
for (i=0; i<SMB_VFS_OP_LAST; i++) {
- if (vfs_op_names[i].name == NULL) {
+ if ((vfs_op_names[i].name == NULL)
+ || (vfs_op_names[i].type != i)) {
smb_panic("vfs_full_audit.c: name table not "
- "in sync with vfs.h\n");
+ "in sync with vfs_op_type enums\n");
}
if (strequal(op, vfs_op_names[i].name)) {
if (neg) {