Index: bootadm/usr/src/cmd/boot/bootadm/bootadm.c =================================================================== --- bootadm.orig/usr/src/cmd/boot/bootadm/bootadm.c 2013-01-02 16:35:31.787358064 +0400 +++ bootadm/usr/src/cmd/boot/bootadm/bootadm.c 2013-01-02 16:36:42.247600489 +0400 @@ -2498,67 +2498,13 @@ const char *fcn = "read_list()"; flistp->head = flistp->tail = NULL; - - /* - * build and check path to extract_boot_filelist.ksh - */ - n = snprintf(path, sizeof (path), "%s%s", root, EXTRACT_BOOT_FILELIST); - if (n >= sizeof (path)) { - bam_error(NO_FLIST); - return (BAM_ERROR); - } - - if (is_safe_exec(path) == BAM_ERROR) - return (BAM_ERROR); - - /* - * If extract_boot_filelist is present, exec it, otherwise read - * the filelists directly, for compatibility with older images. - */ - if (stat(path, &sb) == 0) { - /* - * build arguments to exec extract_boot_filelist.ksh - */ - char *rootarg, *platarg; - int platarglen = 1, rootarglen = 1; - if (strlen(root) > 1) - rootarglen += strlen(root) + strlen("-R "); - if (bam_alt_platform) - platarglen += strlen(bam_platform) + strlen("-p "); - platarg = s_calloc(1, platarglen); - rootarg = s_calloc(1, rootarglen); - *platarg = 0; - *rootarg = 0; - - if (strlen(root) > 1) { - (void) snprintf(rootarg, rootarglen, - "-R %s", root); - } - if (bam_alt_platform) { - (void) snprintf(platarg, platarglen, - "-p %s", bam_platform); - } - n = snprintf(cmd, sizeof (cmd), "%s %s %s /%s /%s", - path, rootarg, platarg, BOOT_FILE_LIST, ETC_FILE_LIST); - free(platarg); - free(rootarg); - if (n >= sizeof (cmd)) { - bam_error(NO_FLIST); - return (BAM_ERROR); - } - if (exec_cmd(cmd, flistp) != 0) { - BAM_DPRINTF((D_FLIST_FAIL, fcn, path, strerror(errno))); - return (BAM_ERROR); - } - } else { - /* - * Read current lists of files - only the first is mandatory - */ - rval = read_one_list(root, flistp, BOOT_FILE_LIST); - if (rval != BAM_SUCCESS) - return (rval); - (void) read_one_list(root, flistp, ETC_FILE_LIST); - } + /* + * Read current lists of files - only the first is mandatory + */ + rval = read_one_list(root, flistp, BOOT_FILE_LIST); + if (rval != BAM_SUCCESS) + return (rval); + (void) read_one_list(root, flistp, ETC_FILE_LIST); if (flistp->head == NULL) { bam_error(NO_FLIST);