Here's a trivial update to zipl (s390-tools) to get it to write an audit
message to syslog to report all writes of the bootloader. It simply provides
some of the parameters used to invoke it. I wrote it to provide me with a
record of when the kernel/parameters may have changed.
--- zipl/src/zipl.c 2003/07/23 23:37:26 1.1
+++ zipl/src/zipl.c 2003/07/23 23:36:50
@@ -30,10 +30,11 @@
#include <zipldiag.h>
#undef WUNTRACED
#undef WNOHANG
#include <linux/fs.h>
#include <linux/mtio.h>
+#include <syslog.h>
#define REISERFS
#ifdef REISERFS
#ifndef REISERFS_SUPER_MAGIC
#define REISERFS_SUPER_MAGIC 0x52654973
@@ -998,10 +999,11 @@
return -1;
}
writect+=rc;
}
printf ("Bootloader for FBA type devices installed.\n");
+ syslog(LOG_INFO, "Kernel installed for boot using FBA layout: %s %s
%s", options.zipl_conf_name, options.section_name, options.target_dir);
return 0;
}
// Function: zipl_install_ipleckd_classic - installs a bootloader for
initial program load onto a ECKD-Type disk
// with a Linux/390 classic disc
layout (AIX alike)
@@ -1125,10 +1127,11 @@
return -1;
}
writect+=rc;
}
printf ("Bootloader for ECKD type devices with classic layout
installed.\n");
+ syslog(LOG_INFO, "Kernel installed for boot using classic layout: %s %s
%s", options.zipl_conf_name, options.section_name, options.target_dir);
return 0;
}
// Function: zipl_install_ipleckd_compatible - installs a bootloader for
initial program load onto a ECKD disk with
// OS/390 compatible layout
@@ -1269,10 +1272,11 @@
}
}
free(blockbuffer);
close(sfd);
printf ("Bootloader for ECKD type devices with z/OS compatible layout
installed.\n");
+ syslog(LOG_INFO, "Kernel installed for boot using compatible layout: %s
%s %s", options.zipl_conf_name, options.section_name, options.target_dir);
return 0;
}
// Function: zipl_install_ipldiag_eckd - installs a bootloader for initial
program load onto a DIAG-type disks on ECKD hardware
// Parameters: