summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_audit.c
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/vfs_audit.c
parent9c3e5380ecabe44796f5d53f8aa9f81642434dd8 (diff)
downloadsamba-425ac2c361fc1712c09b52f2cab0988597bf9b7e.tar.gz
samba-425ac2c361fc1712c09b52f2cab0988597bf9b7e.tar.bz2
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/vfs_audit.c')
-rw-r--r--source3/modules/vfs_audit.c6
1 files changed, 4 insertions, 2 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;