From 425ac2c361fc1712c09b52f2cab0988597bf9b7e Mon Sep 17 00:00:00 2001 From: Christian Ambach Date: Tue, 24 May 2011 17:19:52 +0200 Subject: s3:vfs properly terminate enums in audit modules without the proper terminations of the enums, invalid arguments for the audit modules will lead to a smbd crash as the loop in lp_enum() will attempt to access memory behind the array --- source3/modules/vfs_audit.c | 6 ++++-- source3/modules/vfs_extd_audit.c | 6 ++++-- source3/modules/vfs_full_audit.c | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/source3/modules/vfs_audit.c b/source3/modules/vfs_audit.c index 349600fc43..8213bafa1c 100644 --- a/source3/modules/vfs_audit.c +++ b/source3/modules/vfs_audit.c @@ -40,7 +40,8 @@ static int audit_syslog_facility(vfs_handle_struct *handle) { LOG_LOCAL4, "LOCAL4" }, { LOG_LOCAL5, "LOCAL5" }, { LOG_LOCAL6, "LOCAL6" }, - { LOG_LOCAL7, "LOCAL7" } + { LOG_LOCAL7, "LOCAL7" }, + { -1, NULL} }; int facility; @@ -61,7 +62,8 @@ static int audit_syslog_priority(vfs_handle_struct *handle) { LOG_WARNING, "WARNING" }, { LOG_NOTICE, "NOTICE" }, { LOG_INFO, "INFO" }, - { LOG_DEBUG, "DEBUG" } + { LOG_DEBUG, "DEBUG" }, + { -1, NULL} }; int priority; diff --git a/source3/modules/vfs_extd_audit.c b/source3/modules/vfs_extd_audit.c index 34a43c712f..192b0750ab 100644 --- a/source3/modules/vfs_extd_audit.c +++ b/source3/modules/vfs_extd_audit.c @@ -43,7 +43,8 @@ static int audit_syslog_facility(vfs_handle_struct *handle) { LOG_LOCAL4, "LOCAL4" }, { LOG_LOCAL5, "LOCAL5" }, { LOG_LOCAL6, "LOCAL6" }, - { LOG_LOCAL7, "LOCAL7" } + { LOG_LOCAL7, "LOCAL7" }, + { -1, NULL} }; int facility; @@ -64,7 +65,8 @@ static int audit_syslog_priority(vfs_handle_struct *handle) { LOG_WARNING, "WARNING" }, { LOG_NOTICE, "NOTICE" }, { LOG_INFO, "INFO" }, - { LOG_DEBUG, "DEBUG" } + { LOG_DEBUG, "DEBUG" }, + { -1, NULL} }; int priority; diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c index a723a0ce2d..e4d9599e74 100644 --- a/source3/modules/vfs_full_audit.c +++ b/source3/modules/vfs_full_audit.c @@ -355,7 +355,8 @@ static int audit_syslog_facility(vfs_handle_struct *handle) { LOG_LOCAL4, "LOCAL4" }, { LOG_LOCAL5, "LOCAL5" }, { LOG_LOCAL6, "LOCAL6" }, - { LOG_LOCAL7, "LOCAL7" } + { LOG_LOCAL7, "LOCAL7" }, + { -1, NULL} }; int facility; @@ -375,7 +376,8 @@ static int audit_syslog_priority(vfs_handle_struct *handle) { LOG_WARNING, "WARNING" }, { LOG_NOTICE, "NOTICE" }, { LOG_INFO, "INFO" }, - { LOG_DEBUG, "DEBUG" } + { LOG_DEBUG, "DEBUG" }, + { -1, NULL} }; int priority; -- cgit