summaryrefslogtreecommitdiffstats
path: root/source3/modules
diff options
context:
space:
mode:
authorChristian Ambach <ambi@samba.org>2011-05-24 17:19:52 +0200
committerChristian Ambach <ambi@samba.org>2011-05-24 18:29:45 +0200
commit425ac2c361fc1712c09b52f2cab0988597bf9b7e (patch)
treee4a2f5fd8072179f3b205451c42df3975402157a /source3/modules
parent9c3e5380ecabe44796f5d53f8aa9f81642434dd8 (diff)
downloadsamba-425ac2c361fc1712c09b52f2cab0988597bf9b7e.tar.gz
samba-425ac2c361fc1712c09b52f2cab0988597bf9b7e.tar.xz
samba-425ac2c361fc1712c09b52f2cab0988597bf9b7e.zip
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
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_audit.c6
-rw-r--r--source3/modules/vfs_extd_audit.c6
-rw-r--r--source3/modules/vfs_full_audit.c6
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;