Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libiscsi for openSUSE:Factory checked in at 2022-11-29 10:52:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libiscsi (Old) and /work/SRC/openSUSE:Factory/.libiscsi.new.1597 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libiscsi" Tue Nov 29 10:52:20 2022 rev:21 rq:1038591 version:1.19.0+git.20221112 Changes: -------- --- /work/SRC/openSUSE:Factory/libiscsi/libiscsi.changes 2022-03-18 16:41:43.089163369 +0100 +++ /work/SRC/openSUSE:Factory/.libiscsi.new.1597/libiscsi.changes 2022-11-29 10:52:23.264494619 +0100 @@ -1,0 +2,18 @@ +Mon Nov 28 08:40:46 UTC 2022 - Martin Pluskal <mplus...@suse.com> + +- Update to version 1.19.0+git.20221112: + * ci/build.sh: Enable parallel compilation + * ci: Fix the Appveyor Linux and Windows builds + * ci: Add ci/install.bat + * Add CodeQL workflow for GitHub code scanning + * test-tool: remove a redundant semicolon + * lib/scsi-lowlevel: Make the REPORT LUNS unmarshalling code more flexible + * Fix segmentation fault problem. + * Check return value of scsi_malloc in order to avoid dereferencing NULL return value. + * fix iscsi-ls parameter parse + * iscsi-swp: handle setting of debug_level correctly + * Update iscsi-dd.c + * iscsi-inq: handle setting of debug_level correctly + * Retain the immediate data param during login processing + +------------------------------------------------------------------- Old: ---- libiscsi-1.19.0+git.20220303.obscpio New: ---- libiscsi-1.19.0+git.20221112.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libiscsi.spec ++++++ --- /var/tmp/diff_new_pack.iLg2pu/_old 2022-11-29 10:52:24.004498507 +0100 +++ /var/tmp/diff_new_pack.iLg2pu/_new 2022-11-29 10:52:24.008498528 +0100 @@ -18,7 +18,7 @@ %define sover 9 Name: libiscsi -Version: 1.19.0+git.20220303 +Version: 1.19.0+git.20221112 Release: 0 Summary: iSCSI client library and utilities License: GPL-2.0-only AND LGPL-2.1-only ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.iLg2pu/_old 2022-11-29 10:52:24.052498759 +0100 +++ /var/tmp/diff_new_pack.iLg2pu/_new 2022-11-29 10:52:24.056498780 +0100 @@ -3,6 +3,6 @@ <param name="url">g...@github.com:sahlberg/libiscsi.git</param> <param name="changesrevision">e6bcdf5fdbf39729399c4f0914661ca1055107a1</param></service><service name="tar_scm"> <param name="url">https://github.com/sahlberg/libiscsi.git</param> - <param name="changesrevision">2674070fb80ad7527589a1fbd576ee074d26ed72</param></service></servicedata> + <param name="changesrevision">be9e2d70cb0d4828b955b3cf05b508b471850c0d</param></service></servicedata> (No newline at EOF) ++++++ libiscsi-1.19.0+git.20220303.obscpio -> libiscsi-1.19.0+git.20221112.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libiscsi-1.19.0+git.20220303/.appveyor.yml new/libiscsi-1.19.0+git.20221112/.appveyor.yml --- old/libiscsi-1.19.0+git.20220303/.appveyor.yml 2022-03-03 21:58:08.000000000 +0100 +++ new/libiscsi-1.19.0+git.20221112/.appveyor.yml 2022-11-13 03:16:17.000000000 +0100 @@ -9,7 +9,8 @@ clone_depth: 5 install: - - sh: 'ci/install.sh' + - sh: 'ci/install.sh' + - cmd: 'ci\install.bat' build_script: - sh: 'ci/build.sh' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libiscsi-1.19.0+git.20220303/.github/workflows/codeql.yml new/libiscsi-1.19.0+git.20221112/.github/workflows/codeql.yml --- old/libiscsi-1.19.0+git.20220303/.github/workflows/codeql.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/libiscsi-1.19.0+git.20221112/.github/workflows/codeql.yml 2022-11-13 03:16:17.000000000 +0100 @@ -0,0 +1,41 @@ +name: "CodeQL" + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + schedule: + - cron: "20 1 * * 4" + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ cpp ] + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + queries: +security-and-quality + + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{ matrix.language }}" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libiscsi-1.19.0+git.20220303/ci/build.sh new/libiscsi-1.19.0+git.20221112/ci/build.sh --- old/libiscsi-1.19.0+git.20220303/ci/build.sh 2022-03-03 21:58:08.000000000 +0100 +++ new/libiscsi-1.19.0+git.20221112/ci/build.sh 2022-11-13 03:16:17.000000000 +0100 @@ -9,15 +9,6 @@ case "$(uname)" in MSYS*|MINGW*) - pacman --noconfirm --remove mingw-w64-x86_64-gcc-ada - pacman --noconfirm --remove mingw-w64-x86_64-gcc-fortran - pacman --noconfirm --remove mingw-w64-x86_64-gcc-libgfortran - pacman --noconfirm --remove mingw-w64-x86_64-gcc-objc - pacman --noconfirm --sync --refresh - pacman --noconfirm --sync --needed diffutils - pacman --noconfirm --sync --needed make - pacman --noconfirm --sync --needed mingw-w64-x86_64-gcc - pacman --noconfirm --sync --needed mingw-w64-x86_64-cunit export PATH="/mingw64/bin:$PATH" configure_options+=(--disable-shared) ;; @@ -25,7 +16,7 @@ ./autogen.sh && ./configure "${configure_options[@]}" && - make && + make -j$(nproc) && case "$(uname)" in MSYS*|MINGW*) ;; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libiscsi-1.19.0+git.20220303/ci/install.bat new/libiscsi-1.19.0+git.20221112/ci/install.bat --- old/libiscsi-1.19.0+git.20220303/ci/install.bat 1970-01-01 01:00:00.000000000 +0100 +++ new/libiscsi-1.19.0+git.20221112/ci/install.bat 2022-11-13 03:16:17.000000000 +0100 @@ -0,0 +1 @@ +C:\msys64\usr\bin\bash --login -c 'set -x; cd "${APPVEYOR_BUILD_FOLDER}"; ci/install.sh' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libiscsi-1.19.0+git.20220303/ci/install.sh new/libiscsi-1.19.0+git.20221112/ci/install.sh --- old/libiscsi-1.19.0+git.20220303/ci/install.sh 2022-03-03 21:58:08.000000000 +0100 +++ new/libiscsi-1.19.0+git.20221112/ci/install.sh 2022-11-13 03:16:17.000000000 +0100 @@ -3,9 +3,13 @@ case "$(uname)" in Linux) packages=( + autoconf + automake + docbook-xsl libcunit1-dev libgcrypt20-dev librdmacm-dev + libtool xsltproc ) for p in "${packages[@]}"; do @@ -14,4 +18,20 @@ ;; Darwin) ;; + MSYS*|MINGW*) + pacman --noconfirm --remove mingw-w64-x86_64-gcc-ada + pacman --noconfirm --remove mingw-w64-x86_64-gcc-fortran + pacman --noconfirm --remove mingw-w64-x86_64-gcc-libgfortran + pacman --noconfirm --remove mingw-w64-x86_64-gcc-objc + pacman --noconfirm --remove mingw-w64-x86_64-libgccjit + pacman --noconfirm --sync --refresh + pacman --noconfirm --sync --needed autoconf + pacman --noconfirm --sync --needed automake + pacman --noconfirm --sync --needed diffutils + pacman --noconfirm --sync --needed docbook-xsl + pacman --noconfirm --sync --needed libtool + pacman --noconfirm --sync --needed make + pacman --noconfirm --sync --needed mingw-w64-x86_64-cunit + pacman --noconfirm --sync --needed mingw-w64-x86_64-gcc + ;; esac diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libiscsi-1.19.0+git.20220303/examples/iscsi-dd.c new/libiscsi-1.19.0+git.20221112/examples/iscsi-dd.c --- old/libiscsi-1.19.0+git.20220303/examples/iscsi-dd.c 2022-03-03 21:58:08.000000000 +0100 +++ new/libiscsi-1.19.0+git.20221112/examples/iscsi-dd.c 2022-11-13 03:16:17.000000000 +0100 @@ -131,6 +131,11 @@ } wt = malloc(sizeof(struct write_task)); + if (wt == NULL) { + fprintf(stderr, "failed to alloc write task\n"); + exit(10); + } + wt->rt = task; wt->client = client; @@ -430,6 +435,11 @@ _tgt_desig->designator_type = tgt_desig->designator_type; _tgt_desig->designator_length = tgt_desig->designator_length; _tgt_desig->designator = malloc(tgt_desig->designator_length); + if (_tgt_desig->designator == NULL) { + fprintf(stderr, "failed to alloc designator\n"); + exit(10); + } + memcpy(_tgt_desig->designator, tgt_desig->designator, tgt_desig->designator_length); scsi_free_scsi_task(task); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libiscsi-1.19.0+git.20220303/lib/login.c new/libiscsi-1.19.0+git.20221112/lib/login.c --- old/libiscsi-1.19.0+git.20220303/lib/login.c 2022-03-03 21:58:08.000000000 +0100 +++ new/libiscsi-1.19.0+git.20221112/lib/login.c 2022-11-13 03:16:17.000000000 +0100 @@ -1220,9 +1220,6 @@ * the target said. ImmediateData is NO. */ iscsi->use_immediate_data = ISCSI_IMMEDIATE_DATA_NO; - - } else { - iscsi->use_immediate_data = ISCSI_IMMEDIATE_DATA_YES; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libiscsi-1.19.0+git.20220303/lib/pdu.c new/libiscsi-1.19.0+git.20221112/lib/pdu.c --- old/libiscsi-1.19.0+git.20220303/lib/pdu.c 2022-03-03 21:58:08.000000000 +0100 +++ new/libiscsi-1.19.0+git.20221112/lib/pdu.c 2022-11-13 03:16:17.000000000 +0100 @@ -622,7 +622,7 @@ return -1; } - if (is_finished) { + if (is_finished && iscsi->waitpdu != NULL) { ISCSI_LIST_REMOVE(&iscsi->waitpdu, pdu); iscsi->drv->free_pdu(iscsi, pdu); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libiscsi-1.19.0+git.20220303/lib/scsi-lowlevel.c new/libiscsi-1.19.0+git.20221112/lib/scsi-lowlevel.c --- old/libiscsi-1.19.0+git.20220303/lib/scsi-lowlevel.c 2022-03-03 21:58:08.000000000 +0100 +++ new/libiscsi-1.19.0+git.20221112/lib/scsi-lowlevel.c 2022-11-13 03:16:17.000000000 +0100 @@ -490,9 +490,8 @@ } list_size = task_get_uint32(task, 0) + 8; - if (list_size < task->datain.size) { - return NULL; - } + if (list_size > task->datain.size) + list_size = task->datain.size; num_luns = list_size / 8 - 1; list = scsi_malloc(task, offsetof(struct scsi_reportluns_list, luns) @@ -2912,9 +2911,15 @@ struct scsi_data *data; data = scsi_malloc(task, sizeof(struct scsi_data)); + if (data == NULL) { + return NULL; + } data->size = 20 + hdr_size; data->data = scsi_malloc(task, data->size); + if (data->data == NULL) { + return NULL; + } if (mp->caching.ic) data->data[hdr_size + 2] |= 0x80; if (mp->caching.abpf) data->data[hdr_size + 2] |= 0x40; @@ -2953,9 +2958,15 @@ struct scsi_data *data; data = scsi_malloc(task, sizeof(struct scsi_data)); + if (data == NULL) { + return NULL; + } data->size = 12 + hdr_size; data->data = scsi_malloc(task, data->size); + if (data->data == NULL) { + return NULL; + } data->data[hdr_size + 2] |= (mp->control.tst << 5) & 0xe0; if (mp->control.tmf_only) data->data[hdr_size + 2] |= 0x10; @@ -2993,9 +3004,15 @@ struct scsi_data *data; data = scsi_malloc(task, sizeof(struct scsi_data)); + if (data == NULL) { + return NULL; + } data->size = 40 + hdr_size; data->data = scsi_malloc(task, data->size); + if (data->data == NULL) { + return NULL; + } data->data[hdr_size + 2] |= (mp->power_condition.pm_bg_precedence << 6) & 0xc0; @@ -3035,9 +3052,15 @@ struct scsi_data *data; data = scsi_malloc(task, sizeof(struct scsi_data)); + if (data == NULL) { + return NULL; + } data->size = 16 + hdr_size; data->data = scsi_malloc(task, data->size); + if (data->data == NULL) { + return NULL; + } data->data[hdr_size + 2] = mp->disconnect_reconnect.buffer_full_ratio; data->data[hdr_size + 3] = mp->disconnect_reconnect.buffer_empty_ratio; @@ -3064,9 +3087,15 @@ struct scsi_data *data; data = scsi_malloc(task, sizeof(struct scsi_data)); + if (data == NULL) { + return NULL; + } data->size = 12 + hdr_size; data->data = scsi_malloc(task, data->size); + if (data->data == NULL) { + return NULL; + } if (mp->iec.perf) data->data[hdr_size + 2] |= 0x80; if (mp->iec.ebf) data->data[hdr_size + 2] |= 0x20; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libiscsi-1.19.0+git.20220303/test-tool/test_iscsi_chap.c new/libiscsi-1.19.0+git.20221112/test-tool/test_iscsi_chap.c --- old/libiscsi-1.19.0+git.20220303/test-tool/test_iscsi_chap.c 2022-03-03 21:58:08.000000000 +0100 +++ new/libiscsi-1.19.0+git.20221112/test-tool/test_iscsi_chap.c 2022-11-13 03:16:17.000000000 +0100 @@ -90,7 +90,7 @@ ret = test_iscsi_strip_tag(iscsi, pdu, "CHAP_A="); if (ret == -ENOENT) { logging(LOG_VERBOSE, "ignoring login PDU without CHAP_A"); - goto out;; + goto out; } if (ret < 0) { return ret; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libiscsi-1.19.0+git.20220303/utils/iscsi-inq.c new/libiscsi-1.19.0+git.20221112/utils/iscsi-inq.c --- old/libiscsi-1.19.0+git.20220303/utils/iscsi-inq.c 2022-03-03 21:58:08.000000000 +0100 +++ new/libiscsi-1.19.0+git.20221112/utils/iscsi-inq.c 2022-11-13 03:16:17.000000000 +0100 @@ -241,7 +241,7 @@ static struct option long_options[] = { {"help", no_argument, NULL, 'h'}, {"usage", no_argument, NULL, 'u'}, - {"debug", no_argument, NULL, 'd'}, + {"debug", required_argument, NULL, 'd'}, {"initiator-name", required_argument, NULL, 'i'}, {"evpd", required_argument, NULL, 'e'}, {"pagecode", required_argument, NULL, 'c'}, @@ -249,7 +249,7 @@ }; int option_index; - while ((c = getopt_long(argc, argv, "h?udi:e:c:", long_options, + while ((c = getopt_long(argc, argv, "h?ud:i:e:c:", long_options, &option_index)) != -1) { switch (c) { case 'h': @@ -260,7 +260,7 @@ show_usage = 1; break; case 'd': - debug = 1; + debug = atoi(optarg); break; case 'i': initiator = optarg; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libiscsi-1.19.0+git.20220303/utils/iscsi-ls.c new/libiscsi-1.19.0+git.20221112/utils/iscsi-ls.c --- old/libiscsi-1.19.0+git.20220303/utils/iscsi-ls.c 2022-03-03 21:58:08.000000000 +0100 +++ new/libiscsi-1.19.0+git.20221112/utils/iscsi-ls.c 2022-11-13 03:16:17.000000000 +0100 @@ -40,6 +40,7 @@ #include <stdint.h> #include <string.h> #include <strings.h> +#include <getopt.h> #include "iscsi.h" #include "scsi-lowlevel.h" @@ -328,7 +329,7 @@ fprintf(stderr, " -i, --initiator-name=iqn-name Initiatorname to use\n"); fprintf(stderr, " -d, --debug Print debug information\n"); fprintf(stderr, " -s, --show-luns Show the luns for each target\n"); - fprintf(stderr, " --url Output targets in URL format\n"); + fprintf(stderr, " -U, --url Output targets in URL format\n"); fprintf(stderr, " (does not work with -s)\n"); fprintf(stderr, "\n"); fprintf(stderr, "Help options:\n"); @@ -349,7 +350,8 @@ struct iscsi_url *iscsi_url = NULL; struct client_state state; char *url = NULL; - int i; + int c; + int option_index; static int show_help = 0, show_usage = 0, debug = 0; #ifdef _WIN32 @@ -359,31 +361,44 @@ } #endif - for (i = 1; i < argc; i++) { - if (!strcmp(argv[i], "-?") || - !strcmp(argv[i], "-h") || - !strcmp(argv[i], "--help")) { - show_help = 1; - } else if (!strcmp(argv[i], "-u") || - !strcmp(argv[i], "-usage")) { + static struct option long_options[] = { + {"help", no_argument, NULL, 'h'}, + {"usage", no_argument, NULL, 'u'}, + {"debug", no_argument, NULL, 'd'}, + {"initiator-name", required_argument, NULL, 'i'}, + {"show-luns", no_argument, NULL, 's'}, + {"url", no_argument, NULL, 'U'}, + {0, 0, 0, 0} + }; + + while ((c = getopt_long(argc, argv, "h?udi:sU", long_options, + &option_index)) != -1) { + switch (c) { + case 'h': + case '?': + show_help = 1; + break; + case 'u': show_usage = 1; - } else if (!strcmp(argv[i], "-d") || - !strcmp(argv[i], "--debug")) { + break; + case 'd': debug = 1; - } else if (!strcmp(argv[i], "-i") || - !strcmp(argv[i], "--initiator-name")) { - initiator = argv[++i]; - } else if (!strcmp(argv[i], "-s") || - !strcmp(argv[i], "--show-luns")) { + break; + case 'i': + initiator = optarg; + break; + case 's': showluns = 1; - } else if (!strcmp(argv[i], "-U") || - !strcmp(argv[i], "--url")) { + break; + case 'U': useurls = 1; - } else if (!strncmp("iscsi://", argv[i], 8) || - !strncmp("iser://", argv[i], 7)) { - url = strdup(argv[i]); - } - } + break; + default: + fprintf(stderr, "Unrecognized option '%c'\n\n", c); + print_help(); + exit(0); + } + } if (show_help != 0) { print_help(); @@ -397,6 +412,9 @@ memset(&state, 0, sizeof(state)); + if (argv[optind] != NULL) { + url = strdup(argv[optind]); + } if (url == NULL) { fprintf(stderr, "You must specify iscsi target portal.\n"); print_usage(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libiscsi-1.19.0+git.20220303/utils/iscsi-swp.c new/libiscsi-1.19.0+git.20221112/utils/iscsi-swp.c --- old/libiscsi-1.19.0+git.20220303/utils/iscsi-swp.c 2022-03-03 21:58:08.000000000 +0100 +++ new/libiscsi-1.19.0+git.20221112/utils/iscsi-swp.c 2022-11-13 03:16:17.000000000 +0100 @@ -75,14 +75,14 @@ static struct option long_options[] = { {"help", no_argument, NULL, 'h'}, {"usage", no_argument, NULL, 'u'}, - {"debug", no_argument, NULL, 'd'}, + {"debug", required_argument, NULL, 'd'}, {"initiator-name", required_argument, NULL, 'i'}, {"swp", required_argument, NULL, 's'}, {0, 0, 0, 0} }; int option_index; - while ((c = getopt_long(argc, argv, "h?udi:s:", long_options, + while ((c = getopt_long(argc, argv, "h?ud:i:s:", long_options, &option_index)) != -1) { switch (c) { case 'h': @@ -93,7 +93,7 @@ show_usage = 1; break; case 'd': - debug = 1; + debug = atoi(optarg); break; case 'i': initiator = optarg; ++++++ libiscsi.obsinfo ++++++ --- /var/tmp/diff_new_pack.iLg2pu/_old 2022-11-29 10:52:24.276499935 +0100 +++ /var/tmp/diff_new_pack.iLg2pu/_new 2022-11-29 10:52:24.280499956 +0100 @@ -1,5 +1,5 @@ name: libiscsi -version: 1.19.0+git.20220303 -mtime: 1646341088 -commit: 2674070fb80ad7527589a1fbd576ee074d26ed72 +version: 1.19.0+git.20221112 +mtime: 1668305777 +commit: be9e2d70cb0d4828b955b3cf05b508b471850c0d