summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Preparing for version 2.0.8762.0.876Lee Duncan2018-01-222-1/+59
| | | | Update Changelog and version number
* remove kernel subdir from clean Makefile targetLee Duncan2018-01-221-1/+0
| | | | the kernel subdirectory no longer exists
* Do not set LDFLAGS directly in usr/MakefileLee Duncan2018-01-221-4/+4
| | | | | | | We were setting LDFLAGS for libopeniscsiusr, but that is overridden by any value passed in on the command line, which is not what was intended. Instead, use a new/different variable for this.
* libopeniscsiusr: Use libopeniscsiusr in iscsiadmGris Ge2018-01-229-181/+368
| | | | | | | | | | | * Use libopeniscsiusr for `iscsiadm -m session -P <0-3>` command. * Use libopeniscsiusr for iSCSI session information used by `iscsiadm -m node -H <host_no> -P <2 - 4>`command. * Since `/sys/class/iscsi_session/session1/username` require root permission, this patch require `iscsiadm` been ran with root privilege. Signed-off-by: Gris Ge <fge@redhat.com>
* libopeniscsiusr: Add basic iface support into iscsi session.Gris Ge2018-01-2211-2/+670
| | | | | | | | | | | | | * New function `iscsi_session_iface_get()` to query in use iface of specified iscsi session. * Only basic information included required by command 'iscsiadm -m session -P 3' * The iface name does not support old kernel yet. Will fix that in full iface support patches. Signed-off-by: Gris Ge <fge@redhat.com>
* libopeniscsiusr: Add iSCSI session support.Gris Ge2018-01-2212-13/+1281
| | | | | | | | | | | | * iscsi_sessions_get()/iscsi_sessions_free() for query all iSCSI session. * iscsi_session_get()/iscsi_session_free() for query specified iSCSI session id. * And a lot more functions for property query of `struct iscsi_session`. * New unit test case created 'tests/test_session.c'. Signed-off-by: Gris Ge <fge@redhat.com>
* Introducing iSCSI userspace library.Gris Ge2018-01-2216-1/+4106
| | | | | | | | | | * This is the initial patch of the library libopenscsiusr.so, so we have no actual code on iscsi functionality, just introduce a code layout. * The library is created by following the guideline of libabc. * Documentation is done by using linux kernel-doc script generating manpages out of header files. Signed-off-by: Gris Ge <fge@redhat.com>
* Fix memory leak of session_info_print_tree() in usr/session_info.c.Gris Ge2018-01-191-0/+1
| | | | Signed-off-by: Gris Ge <fge@redhat.com>
* Remove white spaces.Gris Ge2018-01-192-2/+2
| | | | Signed-off-by: Gris Ge <fge@redhat.com>
* Merge pull request #85 from gonzoleeman/fixes/ipc-should-not-be-nullLee Duncan2018-01-181-5/+0
|\ | | | | Discovery via non-tcp transport needs "ipc" value
| * Discovery via non-tcp transport needs "ipc" valueLee Duncan2018-01-181-5/+0
|/ | | | | | | | The "ipc" variable was being set to NULL because the discovery code was thought to rely on that value, but that was not the case, and non-tcp transport needs this variable set to its default (non-null) value to work.
* Merge pull request #84 from gonzoleeman/fixes/add_ip_prefixLee Duncan2018-01-186-0/+9
|\ | | | | Add in tracking IP prefix length, in addition to mask.
| * Add in tracking IP prefix length, in addition to mask.Lee Duncan2018-01-186-0/+9
| | | | | | | | | | The modern IP standard stresses the IP prefix length rather than the mask, so track the IP prefix length.
* | Merge pull request #83 from gonzoleeman/fixes/update-top-level-makefileLee Duncan2018-01-181-2/+4
|\ \ | |/ |/| Add some scripts and man pages to the top Makefile. No functional changes.
| * Add some scripts and manpages to the top Makefile.Lee Duncan2018-01-181-2/+4
|/ | | | | This is just cleanup, as these scripts and man pages are present but just not named in the top-level Makefile.
* Merge pull request #82 from gonzoleeman/updates/iscsiuio-Makefile.am-updatesLee Duncan2018-01-181-4/+8
|\ | | | | Cleanup iscsiuio master Makefile template.
| * Cleanup iscsiuio master Makefile template.Lee Duncan2018-01-171-4/+8
| | | | | | | | | | | | Make sure needed directories exist, and make sure install/symbolic linking of target works, even when not in root=/.
* | Merge pull request #81 from gonzoleeman/updates/iscsid.conf-changes-v2Lee Duncan2018-01-181-4/+6
|\ \ | |/ |/| Update iscsid.conf attribute iscsid.startup.
| * Update iscsid.conf attribute iscsid.startup.Lee Duncan2018-01-181-4/+6
|/ | | | | | The comments for this attribute were outdated. In general, with systemd, we do not want to manually start the iscsid daemon ourselves.
* Merge pull request #80 from cleech/masterLee Duncan2018-01-1724-17401/+3
|\ | | | | Repo cleanup, delete old kernel stuff and unused stub code
| * delete unused BSD stub codeChris Leech2018-01-164-571/+2
| | | | | | | | | | | | | | | | | | | | | | This never supported any BSD drivers, they have their own tools, this is just old unused stub code. This is a Linux only project. The cleanup of usr/Makefile also stops checking for kernel version. NETLINK_ISCSI should come from a kernel supplied netlink.h, and should always be 8. The values of 11 or 12 I think were speculating on what the assigned value might be when the iSCSI code was still out of tree, it's been assigned as 8 since 2005.
| * delete old kernel codeChris Leech2018-01-1620-16830/+1
| | | | | | | | | | | | The out of tree kernel code in this repo has not been maintained for a very long time. We're only maintaining the user-space tools here, the kernel side is in the Linux kernel.
* | Merge pull request #79 from gonzoleeman/updates/add-iscsi_fw_loginLee Duncan2018-01-174-3/+54
|\ \ | | | | | | Automate logging into iSCSI FW targets.
| * | Automate logging into iSCSI FW targets.Lee Duncan2018-01-164-3/+54
| |/ | | | | | | | | | | | | Add a script that logs into all iSCSI firmware targets, and add a udev rule to call that script when new targets are detected. Also, add a man page for the script.
* | Merge pull request #78 from gonzoleeman/updates/ignore-standard-build-filesLee Duncan2018-01-171-0/+4
|\ \ | |/ |/| Ignore common build output files
| * Ignore common build output filesLee Duncan2018-01-161-0/+4
|/
* Merge pull request #72 from gonzoleeman/iscsiuio-fixesLee Duncan2017-12-195-25/+81
|\ | | | | Iscsiuio fixes, needed to fix some possible vulnerabilities
| * tell git to ignore the iscsiuio binaryLee Duncan2017-12-151-0/+1
| |
| * Check iscsiuio ping data length for validityLee Duncan2017-12-153-1/+8
| | | | | | | | | | We do not trust that the received ping packet data length is correct, so sanity check it. Found by Qualsys.
| * Skip useless strcopy, and validate CIDR lengthLee Duncan2017-12-151-3/+2
| | | | | | | | | | | | Remove a useless strcpy() that copies a string onto itself, and ensure the CIDR length "keepbits" is not negative. Found by Qualsys.
| * Ensure strings from peer are copied correctly.Lee Duncan2017-12-151-18/+6
| | | | | | | | | | | | | | | | The method of using strlen() and strcpy()/strncpy() has a couple of holes. Do not try to measure the length of strings supplied from peer, and ensure copied strings are NULL-terminated. Use the new strlcpy() instead. Found by Qualsys.
| * Do not double-close IPC file stream to iscsidLee Duncan2017-12-151-2/+7
| | | | | | | | | | A double-close of a file descriptor and its associated FILE stream can be an issue in multi-threaded cases. Found by Qualsys.
| * Ensure all fields in iscsiuio IPC response are setLee Duncan2017-12-151-0/+2
| | | | | | | | | | | | Make sure all fields in the response strcuture are set, or info from the stack can be leaked to our caller. Found by Qualsys.
| * iscsiuio should ignore bogus iscsid broadcast packetsLee Duncan2017-12-151-0/+6
| | | | | | | | | | | | | | When iscsiuio is receiving broadcast packets from iscsid, if the 'payload_len', carried in the packet, is too large then ignore the packet and print a message. Found by Qualsys.
| * Check for root peer user for iscsiuio IPCLee Duncan2017-12-152-1/+49
| | | | | | | | | | This fixes a possible vulnerability where a non-root process could connect with iscsiuio. Fouund by Qualsys.
| * Merge pull request #3 from open-iscsi/masterLee Duncan2017-12-1522-1087/+1070
| |\ | |/ |/| Merge from upstream
* | Merge pull request #69 from gonzoleeman/new-compiler-fixesLee Duncan2017-12-0722-1087/+1070
|\ \ | |/ |/| New compiler fixes, having heard no objections, are being merged.
| * Declare inline best_match_bufcmp() as static.Lee Duncan2017-12-021-1/+1
| | | | | | | | | | The 7.2.1 version of gcc seems to be more strict about this. See https://gcc.gnu.org/onlinedocs/gcc/Inline.html
| * Include <sys/sysmacros.h> to properly define minor()Lee Duncan2017-12-021-0/+1
| |
| * Remove unused variables. No functional change.Lee Duncan2017-12-025-14/+0
| | | | | | | | | | This makes the compiler much happier, and debugging easier.
| * Fix undefined call to writev(): include <sys/uio.h>Lee Duncan2017-12-021-0/+1
| |
| * Ignore library file for iscsiuio/srcLee Duncan2017-12-021-0/+1
| |
| * Fix compiler warnings about string overflows in prom_parseLee Duncan2017-12-024-1065/+1057
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Gcc compiler version 7.2.1 complains about possible string overflow from prom_parse.y: > prom_parse.tab.c: In function ‘yyparse’: > prom_parse.y:98:25: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 0 and 255 [-Wformat-overflow=] > sprintf($$, "%s/%s", $<str>1, $<str>3); > ^~~~~~~ So make the string buffer larger. Also, tell the compiler it is ok if we truncate strings, since our buffer is very large. Lastly, ensure we use strncpy() when copying strings.
| * Rename local strings.[ch] to local_strings.[ch]Lee Duncan2017-12-024-3/+3
| | | | | | | | | | | | This avoids linker and human confusion with the <usr/strings.h> include file. No functional change.
| * Replace deprecated _SVID_SOURCE with _DEFAULT_SOURCELee Duncan2017-12-022-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Gcc version 7.2.1 and linux-glibc-devel version 4.14 complain about _SVID_SOURCE, which is deprecated, so use the replacement of _DEFAULT_SOURCE. The error message looks like: > In file included from /usr/include/ftw.h:25:0, > from fwparam_sysfs.c:23: > /usr/include/features.h:183:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp] > # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" > ^~~~~~~
| * Fix compiler warning: possible string truncationLee Duncan2017-12-022-2/+2
| | | | | | | | | | | | | | | | | | | | | | Gcc version 7.2.1 complains about string formatting that may be truncated, generating messages such as: > fwparam_sysfs.c: In function ‘fwparam_sysfs_boot_info’: > fwparam_sysfs.c:45:25: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 242 [-Wformat-truncation=] > #define ISCSI_LLD_ROOT "/sys/firmware/" Making the destination strings longer fixes this issue.
| * Fix duplicate define of __bitwiseLee Duncan2017-12-021-0/+2
|/ | | | | | Gcc version 7.2.1 and linux glibc devel version 4.14 define __bitwise and does not need open-iscsi to do it, so check for define before doing it ourselves.
* iscsi_if.h: use attribute instead of '__packed'Khazhismel Kumykov2017-09-051-1/+1
| | | | | | More consistent, doesn't rely on __packed being defined in userspace. Signed-off-by: Khazhismel Kumykov <khazhy@google.com>
* Prepare for version 2.0.8752.0.875Lee Duncan2017-09-012-1/+74
|
* Merge pull request #55 from apatters/bnx2-software-ibft-supportLee Duncan2017-08-305-34/+66
|\ | | | | Add bnx2{,x} software initiator IBFT support