Compare commits

...
This repository has been archived on 2026-01-16. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.

26 commits

Author SHA1 Message Date
sgrubb
8e462d1068 AMTU was needed for Common Criteria testing. No PP has needed it in about 5 years. Upstream for the package is also dead. 2014-05-30 16:29:34 -04:00
Dennis Gilmore
8bc487138a - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild 2013-08-02 19:45:42 -05:00
Dennis Gilmore
eab976ed49 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild 2013-02-13 10:31:38 -06:00
Dennis Gilmore
34d69acd17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild 2012-07-18 10:59:13 -05:00
Steve
ae9a3e12b1 Handle new network device naming scheme (#682337) 2012-05-14 11:38:08 -04:00
Steve
41f31a2eb2 Remove init script 2012-05-14 11:21:40 -04:00
Dennis Gilmore
2d7bcb9fcc - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild 2012-01-12 15:15:02 -06:00
Dennis Gilmore
6566a14113 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild 2011-02-07 19:08:56 -06:00
Fedora Release Engineering
a5ef8e4570 dist-git conversion 2010-07-28 09:51:00 +00:00
Steve Grubb
120a58d953 - Move amtu to /usr/sbin 2010-02-16 15:12:54 +00:00
Steve Grubb
746312a33a - Fix off by one in memory separation test 2010-01-18 16:56:36 +00:00
Bill Nottingham
63aa420558 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-25 22:39:39 +00:00
Steve Grubb
38ee4b19a3 - Corrected config file test (#522708)
- Made init script more LSB compatible (#522789)
2009-09-11 17:48:10 +00:00
Steve Grubb
8fe7927d97 - Add ExclusiveArch for platforms having memory separation tests 2009-08-28 20:05:10 +00:00
Tomáš Mráz
0ccac1a162 - rebuilt with new audit 2009-08-21 10:19:57 +00:00
Steve Grubb
0a8661c83c - rebuild for new audit-libs 2009-08-19 17:30:20 +00:00
Steve Grubb
f4da75748d - new upstream version
- Add init script for bootup system check
2009-07-26 16:39:49 +00:00
Steve Grubb
8a39a5aa05 - new upstream version
- Add init script for bootup system check
2009-07-26 16:30:10 +00:00
Steve Grubb
f09b3d32e5 - new upstream version
- Add init script for bootup system check
2009-07-26 13:27:12 +00:00
Jesse Keating
66d85bbc03 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild 2009-07-24 16:51:34 +00:00
Steve Grubb
2d21657a74 - new upstream version 2009-07-01 15:50:01 +00:00
Jesse Keating
946e29c76e - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild 2009-02-24 01:01:27 +00:00
Tom Callaway
114cd2ef3b fix license tag 2008-07-14 17:56:19 +00:00
Jesse Keating
dec8645e72 - Autorebuild for GCC 4.3 2008-02-19 23:45:06 +00:00
Steve Grubb
eaf244a092 Source file adjustment 2007-12-08 18:17:08 +00:00
Steve Grubb
43a125fc5c - new upstream version 2007-12-08 18:15:14 +00:00
10 changed files with 1 additions and 690 deletions

View file

@ -1,7 +0,0 @@
amtu-0.1.tar.gz
amtu-1.0.tar.gz
amtu-1.0.1.tar.gz
amtu-1.0.2.tar.gz
amtu-1.0.3.tar.gz
amtu-1.0.4.tar.gz
amtu-1.0.5-1.tar.gz

View file

@ -1,21 +0,0 @@
# Makefile for source rpm: amtu
# $Id: Makefile,v 1.1 2004/09/09 02:56:56 cvsdist Exp $
NAME := amtu
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attempt a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

View file

@ -1,32 +0,0 @@
--- amtu-1.0.2/src/memsep.c.orig 2005-12-01 23:11:44.000000000 -0500
+++ amtu-1.0.2/src/memsep.c 2005-12-01 22:58:17.000000000 -0500
@@ -56,6 +56,7 @@
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
+#include <stdint.h>
#include <unistd.h>
#include <string.h>
#include <signal.h>
@@ -91,15 +92,14 @@ void sig_handler(int sig)
/* range start <= j < end, aligned to sizeof(int) */
/* */
/************************************************************************/
+#if __LP64__
+#define RANDNUM ((uint64_t)random() << 32 | random())
+#else
+#define RANDNUM random()
+#endif
int *get_pointer_in_range(int *start, int *end)
{
- int *j;
- double n_ints;
-
- n_ints = (end - start)/sizeof(int);
-
- j = start + (int) (n_ints * rand()/(RAND_MAX + 1.0));
- return j;
+ return (int *)((char *)start + (RANDNUM % ((char *)end - (char *)start + 1)));
}
/************************************************************************/

View file

@ -1,76 +0,0 @@
diff -urp amtu-1.0.4.orig/src/iodisktest.c amtu-1.0.4/src/iodisktest.c
--- amtu-1.0.4.orig/src/iodisktest.c 2007-01-09 15:41:48.000000000 -0500
+++ amtu-1.0.4/src/iodisktest.c 2007-01-09 16:32:38.000000000 -0500
@@ -74,6 +74,7 @@
#define MAXLINE 500
#define MAXINDEX 100
#define MAXMEMSIZE 10485670
+#define BDEVNAME_SIZE 32
// Structure to track info about partitions
typedef struct {
@@ -279,7 +280,7 @@ int iodisktest(int argc, char *argv[])
FILE *fname;
FILE *fs;
FILE *fs1;
- char token[10];
+ char token[BDEVNAME_SIZE];
char line[MAXLINE];
int num = 32;
int num_of_rands = 0;
diff -urp amtu-1.0.4.orig/src/networkio.c amtu-1.0.4/src/networkio.c
--- amtu-1.0.4.orig/src/networkio.c 2007-01-09 15:41:48.000000000 -0500
+++ amtu-1.0.4/src/networkio.c 2007-01-09 17:26:28.000000000 -0500
@@ -208,6 +208,10 @@ int get_interfaces()
ifr = ifc.ifc_req;
numifs = ifc.ifc_len/sizeof (struct ifreq);
+ if (numifs > MAX_INTERFACES) {
+ printf("Too many interfaces, only testing the first %d\n", MAX_INTERFACES);
+ numifs = MAX_INTERFACES;
+ }
if (debug)
printf("SIOCGIFCONF has %d interfaces in list:\n", numifs);
@@ -231,6 +235,7 @@ int get_interfaces()
memset(&ifr_sub, '\0', sizeof(struct ifreq));
strncpy(ifr_sub.ifr_name, ifr->ifr_name,
sizeof(ifr_sub.ifr_name));
+ ifr_sub.ifr_name[sizeof(ifr_sub.ifr_name)-1] = 0;
if (ioctl(sock, SIOCGIFFLAGS, (char *)&ifr_sub) < 0) {
fprintf(stderr, "SIOCGIFFLAGS failed for %s.\n",
ifr->ifr_name);
@@ -287,7 +292,7 @@ int get_interfaces()
}
np->ifindex = ifr_sub.ifr_ifindex;
- np->ifname = (char *)malloc(sizeof(ifr->ifr_name));
+ np->ifname = strdup(ifr->ifr_name);
if (np->ifname == NULL)
{
fprintf(stderr, "get_interfaces: malloc failed\n");
@@ -302,8 +307,6 @@ int get_interfaces()
return -1;
}
- strncpy(np->ifname, ifr->ifr_name, sizeof(ifr->ifr_name));
-
if (ioctl(sock, SIOCGIFHWADDR, &ifr_sub) < 0) {
fprintf(stderr, "SIOCGIFHWADDR failed for %s.\n",
ifr_sub.ifr_name);
@@ -403,7 +406,6 @@ int networkio(int argc, char *argv[])
*/
bzero(packetbuf, sizeof(packetbuf));
bzero(&from, sizeof(from));
- len = sizeof(from);
rsock_fd = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_LOOP));
memset(&rcv_info, 0, sizeof(rcv_info));
@@ -449,6 +451,7 @@ int networkio(int argc, char *argv[])
*/
count = 0;
do {
+ len = sizeof(from);
cc = recvfrom(rsock_fd, packetbuf, sizeof(packetbuf),
MSG_DONTWAIT, (struct sockaddr *)&from, &len);

View file

@ -1,120 +0,0 @@
diff -urp amtu-1.0.orig/configure.in amtu-1.0/configure.in
--- amtu-1.0.orig/configure.in 2005-06-08 16:50:00.155816448 -0400
+++ amtu-1.0/configure.in 2005-06-08 16:51:12.515816056 -0400
@@ -1,9 +1,18 @@
-AC_INIT(src/amtu.c)
+AC_REVISION($Revision: 1.3 $)dnl
# AC_CANONICAL_SYSTEM is deprecated in the latest version of AUTOMAKE.
# We aren't using the latest version so we'll keep using it
#AC_CANONICAL_TARGET
+AC_INIT(src/amtu.c)
+AC_PREREQ(2.12)dnl
+AC_CONFIG_AUX_DIR(config)
+AC_CONFIG_SRCDIR(src/amtu.c)
+AM_CONFIG_HEADER(config.h)
+
+VERSION=1.0
+echo Configuring amtu $VERSION
+
AC_CANONICAL_SYSTEM
-AM_INIT_AUTOMAKE(amtu, 1.0)
+AM_INIT_AUTOMAKE(amtu, $VERSION)
AC_PROG_CC
case "$target" in
i386-* | i486-* | i586-* | i686-*) AC_DEFINE(HAVE_I86,1,NULL);;
@@ -15,6 +24,4 @@ ia64-*) AC_DEFINE(HAVE_IA64,1,NULL);;
esac
AC_CHECK_LIB(laus, laus_open)
AC_CHECK_LIB(audit, audit_open)
-AC_OUTPUT(Makefile \
-src/Makefile \
-doc/Makefile)
+AC_OUTPUT(Makefile src/Makefile doc/Makefile)
diff -urp amtu-1.0.orig/src/amtu.c amtu-1.0/src/amtu.c
--- amtu-1.0.orig/src/amtu.c 2005-03-17 13:46:39.000000000 -0500
+++ amtu-1.0/src/amtu.c 2005-06-08 16:51:42.051325976 -0400
@@ -36,6 +36,7 @@
//
//----------------------------------------------------------------------
+#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
diff -urp amtu-1.0.orig/src/amtu-i86.c amtu-1.0/src/amtu-i86.c
--- amtu-1.0.orig/src/amtu-i86.c 2005-03-17 13:48:38.000000000 -0500
+++ amtu-1.0/src/amtu-i86.c 2005-06-08 16:51:12.521815144 -0400
@@ -29,6 +29,7 @@
// using libaudit instead of liblaus
//----------------------------------------------------------------------
+#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
diff -urp amtu-1.0.orig/src/amtu-ppc.c amtu-1.0/src/amtu-ppc.c
--- amtu-1.0.orig/src/amtu-ppc.c 2005-03-17 13:48:57.000000000 -0500
+++ amtu-1.0/src/amtu-ppc.c 2005-06-08 16:51:12.522814992 -0400
@@ -28,6 +28,7 @@
// using libaudit instead of liblaus
//----------------------------------------------------------------------
+#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
diff -urp amtu-1.0.orig/src/amtu-s390.c amtu-1.0/src/amtu-s390.c
--- amtu-1.0.orig/src/amtu-s390.c 2005-03-17 13:49:16.000000000 -0500
+++ amtu-1.0/src/amtu-s390.c 2005-06-08 16:51:12.523814840 -0400
@@ -29,6 +29,7 @@
// using libaudit instead of liblaus
//----------------------------------------------------------------------
+#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
diff -urp amtu-1.0.orig/src/iodisktest.c amtu-1.0/src/iodisktest.c
--- amtu-1.0.orig/src/iodisktest.c 2005-03-17 13:49:29.000000000 -0500
+++ amtu-1.0/src/iodisktest.c 2005-06-08 16:52:28.261300992 -0400
@@ -53,6 +53,7 @@
//03/15/05 D.Velarde Added AUDIT_LOG statements to be used if we're
// using libaudit instead of liblaus
//----------------------------------------------------------------------
+#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
diff -urp amtu-1.0.orig/src/memory.c amtu-1.0/src/memory.c
--- amtu-1.0.orig/src/memory.c 2005-03-17 13:49:41.000000000 -0500
+++ amtu-1.0/src/memory.c 2005-06-08 16:52:48.022296864 -0400
@@ -46,6 +46,7 @@
// using libaudit instead of liblaus
//
//----------------------------------------------------------------------
+#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
diff -urp amtu-1.0.orig/src/memsep.c amtu-1.0/src/memsep.c
--- amtu-1.0.orig/src/memsep.c 2005-03-17 17:27:49.000000000 -0500
+++ amtu-1.0/src/memsep.c 2005-06-08 16:53:01.955178744 -0400
@@ -52,6 +52,7 @@
// don't switch to user nobody if running on RHEL4
//
//----------------------------------------------------------------------
+#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
diff -urp amtu-1.0.orig/src/networkio.c amtu-1.0/src/networkio.c
--- amtu-1.0.orig/src/networkio.c 2005-03-17 13:50:08.000000000 -0500
+++ amtu-1.0/src/networkio.c 2005-06-08 16:53:21.894147560 -0400
@@ -28,6 +28,7 @@
//
// -----------------------------------------------------------------
+#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

View file

@ -1,245 +0,0 @@
diff -urN amtu-1.0.orig/config.h.in amtu-0.2/config.h.in
--- amtu-1.0.orig/config.h.in 2005-05-27 17:15:17.048941192 -0400
+++ amtu-1.0/config.h.in 2005-05-27 17:16:12.582498808 -0400
@@ -15,3 +15,5 @@
/* NULL */
#undef HAVE_S390
+/* NULL */
+#undef HAVE_IA64
diff -urN amtu-1.0.orig/configure.in amtu-0.2/configure.in
--- amtu-1.0.orig/configure.in 2005-05-27 17:15:17.048941192 -0400
+++ amtu-1.0/configure.in 2005-05-27 17:15:37.431842520 -0400
@@ -20,6 +20,7 @@
powerpc64-*) AC_DEFINE(HAVE_PPC64,1,NULL);;
x86_64-*) AC_DEFINE(HAVE_X86_64,1,NULL);;
s390-* | s390x-*) AC_DEFINE(HAVE_S390,1,NULL);;
+ia64-*) AC_DEFINE(HAVE_IA64,1,NULL);;
esac
AC_CHECK_LIB(laus, laus_open)
AC_CHECK_LIB(audit, audit_open)
diff -urN amtu-1.0.orig/configure.in.orig amtu-0.2/configure.in.orig
--- amtu-1.0.orig/configure.in.orig 1969-12-31 19:00:00.000000000 -0500
+++ amtu-1.0/configure.in.orig 2005-05-27 17:11:50.436351080 -0400
@@ -0,0 +1,26 @@
+AC_REVISION($Revision: 1.3 $)dnl
+# AC_CANONICAL_SYSTEM is deprecated in the latest version of AUTOMAKE.
+# We aren't using the latest version so we'll keep using it
+#AC_CANONICAL_TARGET
+AC_INIT(src/amtu.c)
+AC_PREREQ(2.12)dnl
+AC_CONFIG_AUX_DIR(config)
+AC_CONFIG_SRCDIR(src/amtu.c)
+AM_CONFIG_HEADER(config.h)
+
+VERSION=0.2
+echo Configuring amtu $VERSION
+
+AC_CANONICAL_SYSTEM
+AM_INIT_AUTOMAKE(amtu, $VERSION)
+AC_PROG_CC
+case "$target" in
+i386-* | i486-* | i586-* | i686-*) AC_DEFINE(HAVE_I86,1,NULL);;
+powerpc-*) AC_DEFINE(HAVE_PPC,1,NULL);;
+powerpc64-*) AC_DEFINE(HAVE_PPC64,1,NULL);;
+x86_64-*) AC_DEFINE(HAVE_X86_64,1,NULL);;
+s390-* | s390x-*) AC_DEFINE(HAVE_S390,1,NULL);;
+esac
+AC_CHECK_LIB(laus, laus_open)
+AC_CHECK_LIB(audit, audit_open)
+AC_OUTPUT(Makefile src/Makefile doc/Makefile)
diff -urN amtu-1.0.orig/src/amtu-ia64.c amtu-0.2/src/amtu-ia64.c
--- amtu-1.0.orig/src/amtu-ia64.c 1969-12-31 19:00:00.000000000 -0500
+++ amtu-1.0/src/amtu-ia64.c 2005-05-27 17:15:37.432842368 -0400
@@ -0,0 +1,182 @@
+//----------------------------------------------------------------------
+//
+// Module Name: amtu-ia64.c
+//
+// Include File: none
+//
+// Description: Code for Abstract Machine Test i386 Privilege test.
+//
+// Notes: This module performs the machine specific privilege tests
+// to ensure that the underlying hardware is still enforcing
+// the appropriate control mechanisms.
+// -----------------------------------------------------------------
+// LANGUAGE: C
+//
+// (C) Copyright International Businesses Machine Corp. 2003
+// Licensed under the Common Public License v. 1.0
+// -----------------------------------------------------------------
+//
+// Change Activity:
+// DATE PGMR COMMENTS
+// -------- --------- ----------------------
+// 2/05/03 J.Young Add new X86-64 instructions
+// 7/20/03 EJR Added prolog, comments
+// 8/19/03 EJR Version # on CPL + comment stanzas for functions
+// 8/25/03 K.Simon Added NO_TAG to AUDIT_LOG
+// 8/26/03 K.Simon Added printf to display test name
+// 10/17/03 K.Simon Removed NO_TAG
+// 7/15/04 mra Converted file to be ia64 specific
+// 5/27/05 S. Grubb Update to use libaudit
+//----------------------------------------------------------------------
+
+#include "config.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <syscall.h>
+#include <errno.h>
+#include <string.h>
+#include <signal.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <syslog.h>
+#include "amtu.h"
+
+#if defined(HAVE_IA64)
+#ifdef HAVE_LIBLAUS
+#define AUDIT_LOG LAUS_LOG
+#endif
+
+/************************************************************************/
+/* */
+/* FUNCTION: catchfault */
+/* */
+/* PURPOSE: Signal handler to catch the segmentation violation which is */
+/* expected when trying to execute privileged instructions */
+/* without privilege. */
+/* */
+/************************************************************************/
+void catchfault(int sig)
+{
+ if (debug) {
+ printf("caught the fault %d\n", sig);
+ }
+ exit(0);
+}
+
+
+/************************************************************************/
+/* */
+/* FUNCTION: amtu_priv */
+/* */
+/* PURPOSE: Execute privileged instructions to ensure that they cannot */
+/* legitimately be run in user mode. */
+/* */
+/************************************************************************/
+int amtu_priv(int argc, char *argv[])
+{
+ struct sigaction sig;
+ pid_t pid, wpid;
+ int stat;
+
+ printf("Executing Supervisor Mode Instructions Test...\n");
+
+ /* Set up signal handler */
+ sig.sa_handler = catchfault;
+ sig.sa_flags = 0;
+ sigemptyset(&sig.sa_mask);
+ sigaction(SIGSEGV, &sig, NULL);
+ sigaction(SIGILL, &sig, NULL);
+ sigaction(SIGIOT, &sig, NULL);
+ sigaction(SIGIO, &sig, NULL);
+ sigaction(SIGINT, &sig, NULL);
+ sigaction(SIGABRT, &sig, NULL);
+ sigaction(SIGTERM, &sig, NULL);
+ sigaction(SIGQUIT, &sig, NULL);
+ sigaction(SIGBUS, &sig, NULL);
+
+ /* Each assembly directive should seg fault since they are */
+ /* privileged instructions. */
+
+
+ /*---------------------------------------------------------*/
+ /* Test One */
+ /*---------------------------------------------------------*/
+
+ pid = fork();
+ if (pid == 0) {
+ if (debug) {
+ printf("RSM test: ");
+ }
+ asm volatile ("RSM 1");
+ exit(-1);
+ } else if (pid == -1) {
+ /* error condition */
+ fprintf(stderr, "Privilege Separation Test FAILED (RSM)!\n");
+ AUDIT_LOG(("amtu failed privilege separation on RSM"))
+ exit(-1);
+ }
+ /* parent */
+ wpid = wait(&stat);
+ if (!(WIFEXITED(stat) && (WEXITSTATUS(stat) == 0))) {
+ fprintf(stderr, "Privilege Separation Test FAILED on RSM!\n");
+ AUDIT_LOG(("amtu failed privilege separation on RSM"))
+ return(-1);
+ }
+
+
+ /*---------------------------------------------------------*/
+ /* Test Two */
+ /*---------------------------------------------------------*/
+
+ pid = fork();
+ if (pid == 0) {
+ if (debug) {
+ printf("SSM test: ");
+ }
+ asm volatile ("SSM 0");
+ exit(-1);
+ } else if (pid == -1) {
+ /* error condition */
+ fprintf(stderr, "Privilege Separation Test FAILED (SSM)!\n");
+ AUDIT_LOG(("amtu failed privilege separation on SSM"))
+ exit(-1);
+ }
+ /* parent */
+ wpid = wait(&stat);
+ if (!(WIFEXITED(stat) && (WEXITSTATUS(stat) == 0))) {
+ fprintf(stderr, "Privilege Separation Test FAILED on SSM!\n");
+ AUDIT_LOG(("amtu failed privilege separation on SSM"))
+ return(-1);
+ }
+
+ /*---------------------------------------------------------*/
+ /* Test Three */
+ /*---------------------------------------------------------*/
+
+ pid = fork();
+ if (pid == 0) {
+ if (debug) {
+ printf("RFI test: ");
+ }
+ asm volatile ("RFI");
+ exit(-1);
+ } else if (pid == -1) {
+ /* error condition */
+ fprintf(stderr, "Privilege Separation Test FAILED (RFI)!\n");
+ AUDIT_LOG(("amtu failed privilege separation on RFI"))
+ exit(-1);
+ }
+ /* parent */
+ wpid = wait(&stat);
+ if (!(WIFEXITED(stat) && (WEXITSTATUS(stat) == 0))) {
+ fprintf(stderr, "Privilege Separation Test FAILED on RFI!\n");
+ AUDIT_LOG(("amtu failed privilege separation on RFI"))
+ return(-1);
+ }
+
+ AUDIT_LOG(("amtu - Privileged Instruction Test succeeded"))
+ printf("Privileged Instruction Test SUCCESS!\n");
+ return(0);
+}
+#endif
diff -urN amtu-1.0.orig/src/Makefile.am amtu-0.2/src/Makefile.am
--- amtu-1.0.orig/src/Makefile.am 2005-05-27 17:15:17.056939976 -0400
+++ amtu-1.0/src/Makefile.am 2005-05-27 17:15:37.432842368 -0400
@@ -1,3 +1,3 @@
-AM_CPPFLAGS = -Wall
+AM_CPPFLAGS = -Wall -W -Wfloat-equal -Wundef
bin_PROGRAMS = amtu
-amtu_SOURCES = amtu-i86.c amtu-ppc.c amtu-s390.c amtu.c memory.c memsep.c iodisktest.c networkio.c
+amtu_SOURCES = amtu-i86.c amtu-ppc.c amtu-s390.c amtu-ia64.c amtu.c memory.c memsep.c iodisktest.c networkio.c

View file

@ -1,68 +0,0 @@
--- amtu/src/memsep.c.orig 2004-08-18 11:18:42.000000000 -0400
+++ amtu/src/memsep.c 2004-08-18 11:19:18.000000000 -0400
@@ -165,8 +165,6 @@
/************************************************************************/
int memsep(int argc, char *argv[])
{
- struct passwd *pwd;
- uid_t id;
FILE *fp;
char line[200];
char flags[10];
@@ -175,29 +173,6 @@
printf("Executing Memory Separation Test...\n");
- // First, get the UID of the unprivileged user nobody.
- pwd = getpwnam("nobody");
-
- if (pwd == NULL) { // Error
- fprintf(stderr, "Could not obtain info for user nobody");
- LAUS_LOG(("amtu memory separation test: could not"
- " obtain info for user nobody"))
- return -1;
- }
- else {
- id = pwd->pw_uid;
- }
-
- // Now set the effective UID to the unprivileged user nobody.
- if (debug) {
- fprintf(stderr, "Setting effective UID of user nobody to:"
- " %d\n", id);
- }
- seteuid(id);
- if (debug) {
- fprintf(stderr, "Effective UID is now: %d\n", geteuid());
- }
-
// Check that reading and writing to memory addresses is not allowed.
fp = fopen("/proc/self/maps", "r");
if (fp == NULL) {
@@ -258,25 +233,6 @@
last_end = end;
}
- // Reset the UID to root.
- pwd = getpwnam("root");
-
- if (pwd == NULL) { // Error
- fprintf(stderr, "Could not reset UID to root");
- LAUS_LOG(("amtu memory separation test: could not"
- " reset UID to root"))
- return -1;
- }
- else {
- id = pwd->pw_uid;
- }
-
- seteuid(id);
- if (debug) {
- fprintf(stderr, "Reset Effective UID to root: %d\n",
- geteuid());
- }
-
fprintf(stderr, "Memory Separation Test SUCCESS!\n");
LAUS_LOG(("amtu - Memory Separation Test succeeded"))
return 0;

120
amtu.spec
View file

@ -1,120 +0,0 @@
Summary: Abstract Machine Test Utility (AMTU)
Name: amtu
Version: 1.0.5
Release: 1%{?dist}
License: Common Public License
Group: System Environment/Base
URL: http://sourceforge.net/projects/amtueal/
Source0: %{name}-%{version}-1.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: audit-libs-devel >= 1.1.2
BuildRequires: automake
Requires: audit >= 1.1.2
# Red Hat AMTU SPEC file
%description
Abstract Machine Test Utility (AMTU) is an administrative utility to check
whether the underlying protection mechanism of the hardware are still being
enforced. This is a requirement of the Controlled Access Protection Profile
FPT_AMT.1, see
http://www.radium.ncsc.mil/tpep/library/protection_profiles/CAPP-1.d.pdf
%prep
%setup -q
%build
# Determine appropriate compiler
CC="gcc"
%ifarch ppc64 ppc64iseries ppc64pseries
CC="/usr/bin/ppc64-redhat-linux-gcc"
%endif
# Determine appropriate compiler flags
CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -Wall -pipe"
%ifarch x86_64
CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -Wall -pipe -m64"
%endif
export CC CFLAGS
# next 3 items is to quieten autoreconf
touch ChangeLog
touch NEWS
touch AUTHORS
autoreconf -fv --install
%configure
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
install -m 0750 src/amtu $RPM_BUILD_ROOT/%{_bindir}
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man8/
install -m 644 doc/amtu.8 $RPM_BUILD_ROOT/%{_mandir}/man8/amtu.8
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc doc/AMTUHowTo.txt COPYING
%attr(0750,root,root) %{_bindir}/amtu
%attr(0644,root,root) %{_mandir}/man8/*
%changelog
* Thu Mar 08 2007 Steve Grubb <sgrubb@redhat.com> 1.0.5-1
- new upstream version
* Fri Feb 16 2007 Steve Grubb <sgrubb@redhat.com> 1.0.4-6
- change buildroot
* Thu Feb 8 2007 Steve Grubb <sgrubb@redhat.com> 1.0.4-5
- specfile updates
* Tue Jan 9 2007 Steve Grubb <sgrubb@redhat.com> 1.0.4-4
- patch fixing network and disk tests
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.0.4-3.1
- rebuild
* Mon Jun 12 2006 Jesse Keating <jkeating@redhat.com> - 1.0.4-3
- Fix missing BR on automake
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 1.0.4-2.2
- bump again for double-long bug on ppc(64)
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1.0.4-2.1
- rebuilt for new gcc4.1 snapshot and glibc changes
* Tue Jan 3 2006 Jesse Keating <jkeating@redhat.com> 1.0.4-2
- rebuilt
* Fri Dec 9 2005 Steve Grubb <sgrubb@redhat.com> 1.0.4-1
- New upstream version updated for new audit messages
* Mon Dec 5 2005 Steve Grubb <sgrubb@redhat.com> 1.0.2-2
- Fix "clean" section of spec file (bz 172942)
- Add memsep-random patch (bz 174767)
* Thu Jul 14 2005 Steve Grubb <sgrubb@redhat.com> 1.0.2-1
- New upstream version.
* Tue Jul 12 2005 Steve Grubb <sgrubb@redhat.com> 1.0.1-1
- New version fixes bug where audit system was disable at end of test.
* Wed Jun 8 2005 Steve Grubb <sgrubb@redhat.com> 1.0-2
- add a few more include "config.h"
* Fri May 27 2005 Steve Grubb <sgrubb@redhat.com> 1.0-1
- New upstream version from IBM
- Drop memsep patch
- Rework specfile
* Thu Sep 2 2004 root <ccb@redhat.com> 0.1-7RHEL
- integrate memsep patch from Matt Anderson at HP
* Mon Aug 16 2004 root <ccb@redhat.com> 0.1-6RHEL
- Integrate ia64 patches from HP's Matt Anderson, enabling use on ia64
* Tue Jun 29 2004 root <ccb@redhat.com> 0.1-4RHEL
- fix /usr/bin/amtu modes for real this time
* Tue Jun 29 2004 root <ccb@redhat.com> 0.1-4RHEL
- set execute bits on /usr/bin/amtu
* Fri May 28 2004 ccb <ccb@redhat.com> 0.1-3RHEL
- fixed owners and permissions in "files"
* Wed May 26 2004 ccb <ccb@redhat.com> 0.1-2RHEL
- move docs to a version-qualified directory name
* Sat May 1 2004 root <chavezt@cs679156-153.austin.rr.com>
- Initial build.

1
dead.package Normal file
View file

@ -0,0 +1 @@
AMTU was needed for Common Criteria testing. No PP has needed it in about 5 years. Upstream for the package is also dead.

View file

@ -1 +0,0 @@
17cebff95aa836e96a26e156dc00f0d4 amtu-1.0.5-1.tar.gz