PERFORCE change 172735 for review
Robert Watson
rwatson at FreeBSD.org
Thu Jan 7 16:59:19 UTC 2010
http://p4web.freebsd.org/chv.cgi?CH=172735
Change 172735 by rwatson at rwatson_fledge on 2010/01/07 16:59:06
Allow 0% minspace to be specified by the admin without crashing
auditd.
Submitted by: Andrew Pantyukhin <infofarmer at FreeBSD.org>
Affected files ...
.. //depot/projects/trustedbsd/openbsm/libauditd/auditd_lib.c#12 edit
Differences ...
==== //depot/projects/trustedbsd/openbsm/libauditd/auditd_lib.c#12 (text+ko) ====
@@ -26,7 +26,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * $P4: //depot/projects/trustedbsd/openbsm/libauditd/auditd_lib.c#11 $
+ * $P4: //depot/projects/trustedbsd/openbsm/libauditd/auditd_lib.c#12 $
*/
#include <sys/param.h>
@@ -606,7 +606,7 @@
while (getacdir(cur_dir, MAXNAMLEN) >= 0) {
if (statfs(cur_dir, &sfs) < 0)
continue; /* XXX should warn */
- soft = (sfs.f_bfree < (sfs.f_blocks / (100 / auditd_minval))) ?
+ soft = (sfs.f_bfree < (sfs.f_blocks * auditd_minval / 100 )) ?
1 : 0;
hard = (sfs.f_bfree < AUDIT_HARD_LIMIT_FREE_BLOCKS) ? 1 : 0;
if (soft) {
More information about the p4-projects
mailing list