Date: Sat, 19 Jun 2010 19:25:53 GMT From: Sergio Ligregni <ligregni@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 179854 for review Message-ID: <201006191925.o5JJPrwm070595@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@179854?ac=10 Change 179854 by ligregni@ligPhenom on 2010/06/19 19:25:19 Issued the copyright and set some parameters Affected files ... .. //depot/projects/soc2010/disaudit/ideas.txt#1 add .. //depot/projects/soc2010/disaudit/shipd.c#2 edit .. //depot/projects/soc2010/disaudit/shipd.h#2 edit Differences ... ==== //depot/projects/soc2010/disaudit/shipd.c#2 (text+ko) ==== @@ -1,9 +1,38 @@ +/*- + * Copyright (c) 2010 + * Sergio Ligregni. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + #include "shipd.h" #include "/usr/include/stdio.h" #include "/usr/include/stdlib.h" #include <syslog.h> #include <stdarg.h> +/*** DECLARATIONS ***/ + /* Directory settings took from audit_control */ char audit_trails_dir[MAX_DIR_SIZE + 1]; char master_host[MAX_HOST_SIZE + 1]; @@ -44,17 +73,16 @@ } /* There is no shipd enabled and it wasn't called by AUDIT (normally the unique way to get 'last' on) */ - if (panic_level == 0 && last == 0) + if (panic_level < 2 && last == 0) { to_log("Shipd disabled"); exit(0); } - return 0; } -int + get_parameters() { /* GSoC: using an special file, intended to include this values at audit_control */ @@ -69,6 +97,8 @@ fscanf(fpars, "%s", audit_trails_dir); fscanf(fpars, "%s", master_host); fscanf(fpars, "%d", &panic_level); + + return 0; } void ==== //depot/projects/soc2010/disaudit/shipd.h#2 (text+ko) ==== @@ -1,3 +1,29 @@ +/*- + * Copyright (c) 2010 + * Sergio Ligregni. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ #ifndef _SHIPD_H_ #define _SHIPD_H_
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006191925.o5JJPrwm070595>