Hello community, here is the log from the commit of package open-iscsi for openSUSE:Factory checked in at 2018-03-26 12:32:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/open-iscsi (Old) and /work/SRC/openSUSE:Factory/.open-iscsi.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "open-iscsi" Mon Mar 26 12:32:45 2018 rev:70 rq:590442 version:unknown Changes: -------- --- /work/SRC/openSUSE:Factory/open-iscsi/open-iscsi.changes 2018-02-23 15:28:40.428959660 +0100 +++ /work/SRC/openSUSE:Factory/.open-iscsi.new/open-iscsi.changes 2018-03-26 12:33:49.740624130 +0200 @@ -1,0 +2,11 @@ +Thu Mar 22 18:35:10 UTC 2018 - [email protected] + +- Cleaned up complaints by gcc-8 about strings (bsc#1084640) +- Fixed rpmlint complaint about libopeniscsiusr summary + not starting with a capital letter +- Fixed libopeniscsiusr global variable overload +- No functional changes. This updates: + * open-iscsi-SUSE-latest.diff.bz2, and + * open-iscsi.spec + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ open-iscsi.spec ++++++ --- /var/tmp/diff_new_pack.li8Avs/_old 2018-03-26 12:33:51.444562949 +0200 +++ /var/tmp/diff_new_pack.li8Avs/_new 2018-03-26 12:33:51.452562661 +0200 @@ -60,7 +60,7 @@ %package -n libopeniscsiusr0_1_0 Version: 2.0.876 Release: 0 -Summary: iSCSI userspace API +Summary: Userspace iSCSI API Group: System/Libraries %description -n libopeniscsiusr0_1_0 ++++++ open-iscsi-SUSE-latest.diff.bz2 ++++++ --- /var/tmp/diff_new_pack.li8Avs/_old 2018-03-26 12:33:51.488561369 +0200 +++ /var/tmp/diff_new_pack.li8Avs/_new 2018-03-26 12:33:51.492561225 +0200 @@ -66,6 +66,19 @@ } } arp_retry = 0; +diff --git a/iscsiuio/src/unix/nic_utils.c b/iscsiuio/src/unix/nic_utils.c +index e2f294389840..786f2a4d5b5d 100644 +--- a/iscsiuio/src/unix/nic_utils.c ++++ b/iscsiuio/src/unix/nic_utils.c +@@ -305,7 +305,7 @@ static int nic_util_enable_disable_multicast(nic_t *nic, uint32_t cmd) + /* Prepare the request */ + memset(&ifr, 0, sizeof(ifr)); + strncpy(ifr.ifr_name, nic->eth_device_name, +- sizeof(nic->eth_device_name)); ++ sizeof(ifr.ifr_name)); + memcpy(ifr.ifr_hwaddr.sa_data, multicast_addr.addr, ETH_ALEN); + + fd = socket(AF_INET, SOCK_DGRAM, 0); diff --git a/libopeniscsiusr/Makefile b/libopeniscsiusr/Makefile index 8b9b523c1d96..748ec6e6e24b 100644 --- a/libopeniscsiusr/Makefile @@ -103,3 +116,88 @@ $(INSTALL) -m 644 -D $(PKGFILE).in $(DESTDIR)$(PKGCONF_DIR)/$(PKGFILE) perl -i -pe 's|__VERSION__|$(LIBNVME_VERSION)|g' \ $(DESTDIR)$(PKGCONF_DIR)/$(PKGFILE) +diff --git a/libopeniscsiusr/sysfs.c b/libopeniscsiusr/sysfs.c +index 70298f21a0df..6f590f428efa 100644 +--- a/libopeniscsiusr/sysfs.c ++++ b/libopeniscsiusr/sysfs.c +@@ -311,6 +311,9 @@ int _iscsi_host_id_of_session(struct iscsi_context *ctx, uint32_t sid, + int n = 0; + const char *host_id_str = NULL; + int i = 0; ++ const char iscsi_host_dir_str[] = "/iscsi_host/"; ++ const unsigned int iscsi_host_dir_strlen = strlen(iscsi_host_dir_str); ++ + + assert(ctx != NULL); + assert(sid != 0); +@@ -323,8 +326,16 @@ int _iscsi_host_id_of_session(struct iscsi_context *ctx, uint32_t sid, + + _good(sysfs_get_dev_path(ctx, sys_se_dir_path, sys_dev_path), rc, out); + +- snprintf(sys_scsi_host_dir_path, PATH_MAX, "%s/iscsi_host/", +- sys_dev_path); ++ if ((strlen(sys_dev_path) + iscsi_host_dir_strlen) >= PATH_MAX) { ++ rc = LIBISCSI_ERR_SYSFS_LOOKUP; ++ _error(ctx, "Pathname too long: %s%s", ++ sys_dev_path, iscsi_host_dir_str); ++ goto out; ++ } ++ ++ strncpy(sys_scsi_host_dir_path, sys_dev_path, PATH_MAX); ++ strncat(sys_scsi_host_dir_path, iscsi_host_dir_str, ++ PATH_MAX - iscsi_host_dir_strlen); + + n = scandir(sys_scsi_host_dir_path, &namelist, _scan_filter_skip_dot, + alphasort); +diff --git a/usr/iscsi_sysfs.c b/usr/iscsi_sysfs.c +index 0cc55b97bde9..a5106945006a 100644 +--- a/usr/iscsi_sysfs.c ++++ b/usr/iscsi_sysfs.c +@@ -1153,7 +1153,7 @@ int iscsi_sysfs_for_each_iface_on_host(void *data, uint32_t host_no, + int rc = 0, i, n; + struct iface_rec iface; + char devpath[PATH_SIZE]; +- char sysfs_path[PATH_SIZE]; ++ char sysfs_dev_iscsi_iface_path[PATH_SIZE]; + char id[NAME_SIZE]; + + snprintf(id, sizeof(id), "host%u", host_no); +@@ -1163,11 +1163,11 @@ int iscsi_sysfs_for_each_iface_on_host(void *data, uint32_t host_no, + return ISCSI_ERR_SYSFS_LOOKUP; + } + +- sprintf(sysfs_path, "/sys"); +- strlcat(sysfs_path, devpath, sizeof(sysfs_path)); +- strlcat(sysfs_path, "/iscsi_iface", sizeof(sysfs_path)); ++ sprintf(sysfs_dev_iscsi_iface_path, "/sys"); ++ strlcat(sysfs_dev_iscsi_iface_path, devpath, sizeof(sysfs_dev_iscsi_iface_path)); ++ strlcat(sysfs_dev_iscsi_iface_path, "/iscsi_iface", sizeof(sysfs_dev_iscsi_iface_path)); + +- n = scandir(sysfs_path, &namelist, trans_filter, alphasort); ++ n = scandir(sysfs_dev_iscsi_iface_path, &namelist, trans_filter, alphasort); + if (n <= 0) + /* older kernels or some drivers will not have ifaces */ + return 0; +@@ -1806,7 +1806,7 @@ int iscsi_sysfs_for_each_device(void *data, int host_no, uint32_t sid, + int h, b, t, l, i, n, err = 0, target; + char devpath[PATH_SIZE]; + char id[NAME_SIZE]; +- char path_full[PATH_SIZE]; ++ char path_full[3*PATH_SIZE]; + + target = get_target_no_from_sid(sid, &err); + if (err) +@@ -1821,6 +1821,13 @@ int iscsi_sysfs_for_each_device(void *data, int host_no, uint32_t sid, + + snprintf(path_full, sizeof(path_full), "%s%s/device/target%d:0:%d", + sysfs_path, devpath, host_no, target); ++ ++ if (strlen(path_full) > PATH_SIZE) { ++ log_debug(3, "Could not lookup devpath for %s %s (too long)", ++ ISCSI_SESSION_SUBSYS, id); ++ return ISCSI_ERR_SYSFS_LOOKUP; ++ } ++ + n = scandir(path_full, &namelist, trans_filter, + alphasort); + if (n <= 0)
