audit_warn.c (185573) | audit_warn.c (186647) |
---|---|
1/*- 2 * Copyright (c) 2005 Apple Inc. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * --- 12 unchanged lines hidden (view full) --- 21 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY 22 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * | 1/*- 2 * Copyright (c) 2005 Apple Inc. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * --- 12 unchanged lines hidden (view full) --- 21 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY 22 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * |
29 * $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/audit_warn.c#9 $ | 29 * $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/audit_warn.c#10 $ |
30 */ 31 32#include <sys/types.h> 33 34#include <stdio.h> 35#include <stdlib.h> 36#include <unistd.h> 37 --- 28 unchanged lines hidden (view full) --- 66 } 67 /* 68 * Parent. 69 */ 70 return (0); 71} 72 73/* | 30 */ 31 32#include <sys/types.h> 33 34#include <stdio.h> 35#include <stdlib.h> 36#include <unistd.h> 37 --- 28 unchanged lines hidden (view full) --- 66 } 67 /* 68 * Parent. 69 */ 70 return (0); 71} 72 73/* |
74 * Indicates that the hard limit for all filesystems has been exceeded count 75 * times. | 74 * Indicates that the hard limit for all filesystems has been exceeded. |
76 */ 77int | 75 */ 76int |
78audit_warn_allhard(int count) | 77audit_warn_allhard(void) |
79{ | 78{ |
80 char intstr[12]; 81 char *args[3]; | 79 char *args[2]; |
82 | 80 |
83 snprintf(intstr, 12, "%d", count); 84 | |
85 args[0] = HARDLIM_ALL_WARN; | 81 args[0] = HARDLIM_ALL_WARN; |
86 args[1] = intstr; 87 args[2] = NULL; | 82 args[1] = NULL; |
88 89 return (auditwarnlog(args)); 90} 91 92/* 93 * Indicates that the soft limit for all filesystems has been exceeded. 94 */ 95int --- 148 unchanged lines hidden --- | 83 84 return (auditwarnlog(args)); 85} 86 87/* 88 * Indicates that the soft limit for all filesystems has been exceeded. 89 */ 90int --- 148 unchanged lines hidden --- |