Fix Coverity ID 450
authorVolker Lendecke <vl@samba.org>
Sun, 23 Mar 2008 16:50:55 +0000 (17:50 +0100)
committerVolker Lendecke <vl@samba.org>
Sun, 23 Mar 2008 17:28:23 +0000 (18:28 +0100)
(This used to be commit 700cceb6940c95997cfef374cffd50729a35528a)

source3/modules/vfs_full_audit.c

index 6a8861361c5d84a86fd235bfb6df71a364d88fe1..19218cc47d12a2edb69b40ea953d6bddd8cafe7e 100644 (file)
@@ -679,7 +679,11 @@ static int audit_syslog_priority(vfs_handle_struct *handle)
 
        int priority;
 
-       priority = lp_parm_enum(SNUM(handle->conn), "full_audit", "priority", enum_log_priorities, LOG_NOTICE);
+       priority = lp_parm_enum(SNUM(handle->conn), "full_audit", "priority",
+                               enum_log_priorities, LOG_NOTICE);
+       if (priority == -1) {
+               priority = LOG_WARNING;
+       }
 
        return priority;
 }