From owner-p4-projects@FreeBSD.ORG Sat Jun 19 19:25:54 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A35E310656DB; Sat, 19 Jun 2010 19:25:53 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63F211065673 for ; Sat, 19 Jun 2010 19:25:53 +0000 (UTC) (envelope-from ligregni@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4FF5E8FC16 for ; Sat, 19 Jun 2010 19:25:53 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o5JJPrDO070597 for ; Sat, 19 Jun 2010 19:25:53 GMT (envelope-from ligregni@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o5JJPrwm070595 for perforce@freebsd.org; Sat, 19 Jun 2010 19:25:53 GMT (envelope-from ligregni@FreeBSD.org) Date: Sat, 19 Jun 2010 19:25:53 GMT Message-Id: <201006191925.o5JJPrwm070595@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to ligregni@FreeBSD.org using -f From: Sergio Ligregni To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 179854 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jun 2010 19:25:54 -0000 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 #include +/*** 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_