Date: Tue, 25 Jan 2005 23:59:35 GMT From: Wayne Salamon <wsalamon@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 69736 for review Message-ID: <200501252359.j0PNxZTc087548@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=69736 Change 69736 by wsalamon@rickenbacker on 2005/01/25 23:58:34 Modify test library to match include paths for FreeBSD, use system calls instead of syscall(). Affected files ... .. //depot/projects/trustedbsd/audit3/tools/regression/audit/test/include/audittest.h#2 edit .. //depot/projects/trustedbsd/audit3/tools/regression/audit/test/lib/Makefile#2 edit .. //depot/projects/trustedbsd/audit3/tools/regression/audit/test/lib/audittest.c#2 edit .. //depot/projects/trustedbsd/audit3/tools/regression/audit/test/lib/tlib.c#2 edit Differences ... ==== //depot/projects/trustedbsd/audit3/tools/regression/audit/test/include/audittest.h#2 (text+ko) ==== @@ -28,8 +28,8 @@ #include <assert.h> #include <stdio.h> #include <stdbool.h> -#include <sys/audit.h> -#include <sys/bsm_kevents.h> +#include <bsm/audit.h> +#include <bsm/audit_kevents.h> #define AUDITLOGSUFFIX "audit.log" #define INITIAL_AUID 666 ==== //depot/projects/trustedbsd/audit3/tools/regression/audit/test/lib/Makefile#2 (text+ko) ==== @@ -24,20 +24,22 @@ # 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. -# -LIB_NAME=libaudittest.a +LIB_NAME=audittest +LONG_LIB_NAME=lib$(LIB_NAME).a GCC=gcc -g -Wall -I/usr/include -I../include +LD=ld +AR=ar all: lib test lib: - $(GCC) -fno-common -c audittest.c - libtool -static -o $(LIB_NAME) *.o + $(GCC) -fPIC -c audittest.c + $(AR) -r $(LONG_LIB_NAME) *.o test: tlib.c - $(GCC) -lbsm $(LIB_NAME) tlib.c -o tlib + $(GCC) -lbsm tlib.c -o tlib audittest.o chmod +x tlib clean: - rm -f *.o $(LIB_NAME) tlib + rm -f *.o $(LONG_LIB_NAME) tlib ==== //depot/projects/trustedbsd/audit3/tools/regression/audit/test/lib/audittest.c#2 (text+ko) ==== @@ -33,8 +33,8 @@ #include <sys/syscall.h> #include <sys/types.h> #include <sys/stat.h> -#include <sys/audit.h> -#include <libbsm.h> +#include <bsm/audit.h> +#include <bsm/libbsm.h> #include <audittest.h> int aut_verbose; @@ -46,6 +46,7 @@ void aut_logfile(char *prefix) { int ret; + char *fn; if (prefix != NULL) sprintf(logfile, "%s.%s", prefix, AUDITLOGSUFFIX); @@ -57,7 +58,8 @@ perror("Audit log file open"); exit(-1); } - ret = syscall(SYS_auditctl, logfile); + fn = logfile; + ret = auditctl(AC_SETLOGFILE, &fn, sizeof(fn)); if (ret != 0) { perror("auditctl() failed"); exit(-1); @@ -105,7 +107,7 @@ { int ret; - ret = syscall(SYS_auditctl, NULL); + ret = auditctl(AC_SHUTDOWN, NULL, 0); if (ret != 0) { perror("auditctl() shutdown failed"); return (ret); ==== //depot/projects/trustedbsd/audit3/tools/regression/audit/test/lib/tlib.c#2 (text+ko) ==== @@ -26,8 +26,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include <stdbool.h> -#include <libbsm.h> -#include <sys/bsm_kevents.h> +#include <bsm/libbsm.h> +#include <bsm/audit_kevents.h> #include <audittest.h> extern int aut_verbose;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200501252359.j0PNxZTc087548>