zipl: allow stand alone secure option on command line

Allow that --secure or -S is specified on command line without the need to
allow all options on the command line.
Also ensure that the command line option overrules the config option and
correctly ensure that secure boot is only set for SCSI devices.

Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
Reviewed-by: Philipp Rudo <prudo@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Stefan Haberland
2019-09-13 13:42:16 +02:00
committed by Jan Höppner
parent 0652c687e3
commit 27f6c0a167
2 changed files with 31 additions and 27 deletions
+6
View File
@@ -1134,6 +1134,12 @@ bootmap_create(struct job_data *job, disk_blockptr_t *program_table,
disk_get_type_name(info->type));
goto out_disk_free_info;
}
/* Check if secure boot was enabled only for SCSI */
if (job->is_secure == SECURE_BOOT_ENABLED &&
info->type != disk_type_scsi) {
error_reason("Secure boot forced for non-SCSI disk type");
goto out_disk_free_info;
}
if (verbose) {
printf("Target device information\n");
disk_print_info(info);