summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix a typo error in iscsiuio/src/uip/lc-switch.h (#386)HEADmasterbaker9152022-12-241-1/+1
|
* iscsid/iscsiuio: fix OOM adjustment (#377)Lee Duncan2022-10-143-41/+56
| | | | | | | | | | | | | | | | | | | | | | * iscsid/iscsiuio: fix OOM adjustment For both the iscsid and iscsiuio daemons, they try to modify nice value and OOM adjustment value, so they have priority and will not be killed by the OOM-killer. But the code incorrectly set the value to "-17" for modern linux systems, when the maximum is actually "-1000". While making the changes, use "/proc/self/..." instead of "/proc/<PID>/...", so we don't have to use getpid() nor print out the pathname. Now we either write "-16" to the old interface, "-1000" to the new interface, or we print a warning. Several "log_debug()" calls that should have been warnings are changed to "log_warning()" calls in iscsid. * iscsid/iscsiuio: fix OOM adjustment value for older systems On older linux system, "-17" is the maximum, not "-16".
* meson: remove unused 'source_date_epoch' option (#372)Lee Duncan2022-09-261-2/+0
| | | | Use env. variable KBUILD_BUILD_TIMESTAMP to acheive reproducable builds.
* Preparing for version 2.1.8. (#370)Lee Duncan2022-09-263-2/+44
|
* libopeniscsiusr: cleanup recent reallocarray->realloc change (#369)Lee Duncan2022-09-221-4/+8
| | | | Just adding more comment, and removing the check to see if a pointer to a structure is zero.
* libopeniscsiusr: use realloc instead of reallocarray (#368)TIAN Yuanhao2022-09-221-1/+5
| | | | | | | | | | | | | | | realloc is similar to reallocarray, except it doesn't check for integer overflow when computing num * size. On 32-bit systems, integer overflow may not happen because the old array is likely to be smaller than 4G and the new array is smaller than the old array. On 64-bit systems, integer overflow can never happen because num is less than 4G and size is always 8. This fixes build errors when using uClibc. Signed-off-by: TIAN Yuanhao <tianyuanhao3@163.com> Signed-off-by: TIAN Yuanhao <tianyuanhao3@163.com>
* Use meson as the main build system (#365)Lee Duncan2022-09-2128-349/+1313
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Build: Add an iscsiuio 'build_date.sh' script This is currently unused, but will be used by meson to build the "build_date.[ch]" files used by iscsiuio. * Build: have git ignore file '.setup' I commonly use this file for shell aliases/functions. * Add framework to support building using meson. This adds the ability to use meson/ninja to build open-iscsi and iscsiuio, rather than the current system that uses 'autoconf' for iscsiuio and uses 'make' for everything else. The old make/autoconf system is left in place, for now, but deprecated, including a warning about that when running 'make all' or 'make user' from the top-level. * utils/build: enhance iscsi-iname to generate prefix Added new "-g/--generate-iname-prefix" argument to generate the InitiatorName= prefix. Also, updated iscsi-iname to use getopts. Also, use the new option from meson. * git/meson: remove 'builddir' from ignored files The build directory can be called anything. Suggested by: Eli Schwartz * iscsiuio build: fix new build_date.sh script Fixed several issues: - fix option handling for "-S" - fix epoch date handling from env (noticed by Eli Schwartz) - remove debug statements * iscsiuio meson: warn when not creating a symlink for iscsiuio * meson: install man pages more efficiently We don't need to specify path or subdirectory * iscsiuio meson: remove unused source date epoch option This option was never used, since we pass this info from the environment. * meson: no need to set libdir: default is fine * iscsiuio meson: no need to add c_args: already there * Don't generate initiatorname when cross-building (#367) Let it be generated by the iscsi-init service. Signed-off-by: TIAN Yuanhao <tianyuanhao3@163.com> * Set ISCSI_CONFIG_ROOT by meson Signed-off-by: TIAN Yuanhao <tianyuanhao3@163.com> * Set LOCK_DIR from home_dir to lock_dir Signed-off-by: TIAN Yuanhao <tianyuanhao3@163.com> * Install iface.example to db_root/ifaces Signed-off-by: TIAN Yuanhao <tianyuanhao3@163.com> Signed-off-by: TIAN Yuanhao <tianyuanhao3@163.com> Co-authored-by: TIAN Yuanhao <78596099+tianyuanhao@users.noreply.github.com> Co-authored-by: TIAN Yuanhao <tianyuanhao3@163.com>
* Small bug fixes (#364)Lee Duncan2022-09-0619-152/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * build: move utils/sysdeps to top-level The routines here are used by iscsiuio, so move them to the top level. * libopeniscsiusr: fix kernel-doc bugs There were errors in four places, effecting the generated manual pages. * libopeniscsiusr: clean up kernel-doc usage Simplify generation of library interface documentation using the kernel-doc script: * make the kernel-doc perl script executble (the only visible change) * remove mention of sed (not used) * stop compressing man pages -- let distros do that * improve kernel-doc so that doc-preclean.pl and split-man.pl are no longer needed * add list-man-pages.sh to simplify things (copied from libnvme) * build: keep current version number in one place Move the current version number (now 2.1.7) into the top-level Makefile, and out of usr/version.h and libopeniscsiusr/version.h, completely eliminating the need for the latter. Note that this ties the libopeniscsiusr library idea of "version" to the usr/ (iscsid, etc) idea of version, even though they used to be defined separately. But they always had the same value, so nothing lost. * build: insteall man pages uncompressed We were delivering some man pages compressed and other not, and it turns out distros know how to install man pages using the compression they prefer, so stop doing it for them.
* iscsiuio: Use pthread_t for INVALID_THREAD (#363)Khem Raj2022-09-021-1/+1
| | | | | | | | pthread_t is opaque, therefore avoid compiler errors on musl when compiling since pthread_t is not a plain old data type, like glibc Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* Cleanup fwparam makefile (#360)Lee Duncan2022-08-132-2/+1
| | | | | * Ignore template-generated man pages * build: fwparam_ibft does not need libopeniscsiusr
* make: avoid hard-coding path to sed (#357)Chris Hofstaedtler2022-07-304-4/+4
| | | | | | Just use PATH to find sed. Not all distributions have moved to a /usr-merged layout yet. Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
* Fix a possible passing null pointer in usr/iface.c (#356)shugaley2022-07-281-3/+5
|
* etc: install system unit with without executable bit (#354)Christian Hesse2022-07-071-2/+2
| | | | All systemd unit files are expected to be not executable, so install with correct permissions.
* Merge pull request #353 from mchngc/man-changeLee Duncan2022-06-221-0/+8
|\ | | | | Added examples in man file for iscsiadm session commands.
| * Added examples in man file for iscsiadm session commands.Max Cheng2022-06-171-0/+8
|/ | | | | | Added examples in man file for iscsiadm session commands. Signed-off-by: Max Cheng <mchngc@gmail.com>
* Merge pull request #352 from mikechristie/doc-timersLee Duncan2022-06-161-48/+166
|\ | | | | Update README's error handler/timeout section
| * Update README's error handler/timeout sectiondoc-timersMike Christie2022-06-141-48/+166
|/ | | | | The README's error handling and timeout section is out dated or not correct. This patch updates it.
* Merge pull request #342 from wenchao-hao/iface_paramLee Duncan2022-05-201-0/+1
|\ | | | | Add ability to specify name-value parameters when creating a new iface
| * iscsiadm: enable specify iface name-value parameters when creating ifaceWenchao Hao2022-04-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Add ability to specify name-value parameters when creating a new iface like following: root# iscsiadm -m iface -I test -o new -n iface.initiatorname -v iqn.2016-04.com.open-iscsi:17a3c9bc2d test updated. New interface test added root# iscsiadm -m iface -I test | grep initiatorname iface.initiatorname = iqn.2016-04.com.open-iscsi:17a3c9bc2d Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
* | Merge pull request #351 from ericwmackay/boot_context_configLee Duncan2022-05-195-31/+75
|\ \ | | | | | | Use config for iscsistart and iscsiadm fw login
| * | Use config for iscsistart and iscsiadm fw loginEric Mackay2022-05-185-31/+75
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifying name-value pairs as arguments to iscsistart or iscsiadm can become unwieldy very quickly, and is less flexible than using a config file. If a user desires to update settings, modifying a config file and rebuilding initramfs can be simpler than modifying arguments directly in initramfs code or scripts. Node records created from boot context are populated with defaults, then any settings specified in a config file are applied (if config is present). FW and user-specified params are still applicable. User-specified name-value arguments are applied after config settings, so they can serve as a safeguard against config file changes if desired. Added -c|--config options for iscsistart to specify the config Updated iscsistart man page Signed-off-by: Eric Mackay <eric.mackay@oracle.com> Reviewed-by: Mike Christie <michael.christie@oracle.com>
* | Merge pull request #350 from ericwmackay/ipc_auth_uidLee Duncan2022-05-169-26/+89
|\ \ | | | | | | Add ability for MGMT IPC to check UID only
| * | Add ability for MGMT IPC to check UID onlyEric Mackay2022-05-169-26/+89
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default behavior in iscsid, which is to check mgmt IPCs for UID==0 and user explicitly named "root", is unchanged. This option to perform only the UID check for management IPCs can be enabled in iscsid.conf. This can be useful for running iscsid in a constrained environment, e.g., initramfs. For instance, klibc initramfs in Ubuntu and Debian does not include a user DB. Attempting to run iscsid and iscsiadm in klibc initramfs would result in ISCSI_ERR_ACCESS for all MGMT IPCs. Specifying just the UID check allows iscsid and iscsiadm to run in klibc initramfs without a user DB. systemd can still start an iscsid process later in boot with the default full MGMT IPC auth checks, leaving the steady-state behavior of iscsid the same as before. The following setting in iscsid.conf enables this behavior: iscsid.ipc_auth_uid = Yes iscsistart now uses this mechanism to only perform the UID check, rather than statically linking against an alternate implementation of getpwuid(). This is effectively the same behavior as before. Signed-off-by: Eric Mackay <eric.mackay@oracle.com> Reviewed-by: Mike Christie <michael.christie@oracle.com>
* | Merge pull request #348 from gonzoleeman/add-distclean-make-targetLee Duncan2022-05-097-13/+40
|\ \ | | | | | | Add a 'distclean' Makefile top-level target
| * | Add a 'distclean' Makefile top-level targetLee Duncan2022-05-097-13/+40
|/ / | | | | | | | | | | | | | | | | | | This cleans up a little more than "make clean", in particular removing files generated from templates, and automake-generated files in iscsiuio. Also, a ".PHONY:" target was added where needed so that each Makefile has a complete list of phony targets.
* | Merge pull request #343 from mikechristie/fix-logoutLee Duncan2022-05-071-7/+8
|\ \ | | | | | | iscsid: fix logout pdu send failure detection handling
| * | iscsid: fix logout pdu send failure handlingfix-logoutMike Christie2022-04-201-7/+8
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a bug where when we send logout pdu we are incorrectly handling it as an error. This was added in https://github.com/open-iscsi/open-iscsi/pull/317 I think there might have been a mistake for which version of that patch got merged because there are some unhandled review comments in the merged code. The patch also fixes some review comments that were given in that review but were not handled when it was merged: 1. No space before "Dropping session" 2. Don't split error messages.
* | Merge pull request #341 from thesamesam/masterLee Duncan2022-05-071-10/+7
|\ \ | | | | | | iscsiuio: fix LDADD
| * | iscsiuio: fix LDADDSam James2022-04-151-10/+7
| |/ | | | | | | | | | | | | | | | | | | - We don't want to use _LIBS here, we're building a library, not an executable. - We want LDADD for the whole lot (not a mix of LDFLAGS/LIBS/LDADD), but put the objects/libraries (.a files) first so that -l* works correctly. Closes: https://github.com/open-iscsi/open-iscsi/issues/337 Fixes: 9fbd6009cd917f1152a367fa7e5ae3993133c1e4 Signed-off-by: Sam James <sam@gentoo.org>
* | Merge pull request #345 from gonzoleeman/new-versionLee Duncan2022-05-063-2/+75
|\ \ | | | | | | Preparing for version 2.1.7.
| * | Preparing for version 2.1.7.Lee Duncan2022-05-063-2/+75
|/ /
* | Merge pull request #344 from gonzoleeman/fix-ibft-rule-genLee Duncan2022-05-061-1/+1
|\ \ | |/ |/| Fix ibft-rule-generator shell error
| * Fix ibft-rule-generator shell errorLee Duncan2022-05-061-1/+1
|/ | | | | | | | | | Commit fe2c59e06a42 ("Create an systemd iBFT rule generator") created ibft-rule-generator, but it contains a syntax error, causing this error message when its run: > /usr/lib/systemd/system-generators/ibft-rule-generator: line 21: IBFT_RULE_DIR: command not found This fixes that error.
* Merge pull request #340 from gonzoleeman/make-ibft-build-more-stableLee Duncan2022-04-132-1/+23
|\ | | | | Make fwparam_ibft build more reliable.
| * Make fwparam_ibft build more reliable.Lee Duncan2022-04-132-1/+23
|/ | | | | | | | | | | | | | | | This build has lex and bison source files, but they are not normally used to regenerate C files, since that has been done ahead of time, statically, to handle the case when users building the software may not have these tools. But some build systems think the generated C files need to be regenerated because the timestamp on the source and generated files is so close, just because of the order the files were populated in this directory. So we tell the Makefile to only generate C files if those files are missing. This should have no effect, since these files should never need to be regenerated unless we change lex or bison logic.
* Merge pull request #333 from thesamesam/masterLee Duncan2022-04-107-14/+15
|\ | | | | Build system tweaks from downstream
| * libopeniscsiusr: fix version in installed pkgconfig (.pc) fileSam James2022-04-061-1/+1
| | | | | | | | | | | | | | Looks like a typo from libnvme. Previously, the installed .pc file had a blank Version field. Signed-off-by: Sam James <sam@gentoo.org>
| * Makefiles: don't hardcode sed, pkg-configSam James2022-04-062-3/+3
| | | | | | | | | | | | | | | | | | - On my system, sed appears to be at /bin/sed. So, let's allow overriding the location. - Allow different pkg-config paths too (useful for cross). Signed-off-by: Sam James <sam@gentoo.org>
| * Makefiles: respect $(CC) fully (don't hardcode GCC); use $(RM)Sam James2022-04-065-7/+7
| | | | | | | | | | | | | | - Don't hardcode GCC, instead respect the detected CC (or from the environment) - Use $(RM) as the location may vary and we've already done the work to detect it Signed-off-by: Sam James <sam@gentoo.org>
| * iscsiuio: respect LDFLAGS fullySam James2022-04-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | Use LIBS rather than LDFLAGS which ensures automake gets the ordering right (some LDFLAGS values won't work correctly if not placed exactly before libraries). This should functionally work the same as before, just improve compatibility with bits like -Wl,--as-needed. Signed-off-by: Sam James <sam@gentoo.org>
| * iscsiuio: don't clobber LDFLAGS in configure.acSam James2022-04-031-1/+1
| | | | | | | | | | | | | | | | | | The systemd check currently clobbers LDFLAGS from the environment rather than appending to it. But we actually want LIBS here anyway, rather than LDFLAGS. Signed-off-by: Sam James <sam@gentoo.org>
* | Merge pull request #336 from gonzoleeman/use-kernel-initiatorname-if-presentLee Duncan2022-04-102-45/+146
|\ \ | | | | | | Use kernel initiatorname if present
| * | Check for root in iscsi-gen-initiatornameLee Duncan2022-04-082-6/+16
| | | | | | | | | | | | The man page is also updated
| * | utils: remove errant spaces in scriptLee Duncan2022-04-071-5/+5
| | | | | | | | | | | | | | | There were a few spaces accidentally left at the ends of a few lines in iscsi-gen-initiatorname, so remove them.
| * | Use kernel initiatorname when setting local inameLee Duncan2022-04-072-41/+132
|/ / | | | | | | | | | | | | | | | | | | | | Update the iscsi-gen-initatorname script to take its initiator name from the kernel command line, if present. Also, beef up and simplify the error checking. Error messages will now go to stderr, and it is now an error to overwrite the initiatorname file unless the "force" option is set. The man page was updated, as well.
* | Merge pull request #335 from gonzoleeman/latest-build-cleanups-v2Lee Duncan2022-04-056-25/+78
|\ \ | | | | | | Latest build cleanups and bug fixes
| * | Build: install systemd generator file with svc filesLee Duncan2022-04-041-4/+14
| | | | | | | | | | | | | | | | | | | | | Installation of the systemd generator file ibft-rule-generator is added in etc/Makefile to the "install" target, and that target is broken into "install_systemd_service_files", and "install_systemd_generator_files", for caller convenience.
| * | Create an systemd iBFT rule generatorLee Duncan2022-04-041-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | When dracut is booted with 'ip=ibft' it will rename the interfaces to "ibft*". This will cause error messages during booting, as later on systemd is trying to rename the ianterfaces again, which doesn't work as the interface is busy. So create a systemd generator for creating a dynamic udev rule to stop udev from renaming that interface.
| * | Build: add RULESDIR to top-level MakefileLee Duncan2022-04-041-1/+2
| | | | | | | | | | | | | | | | | | | | | Commit 9a2d2f2cf391 ("Make DB and ISCSIHOME directories configurable.") added use of RULESDIR in utils/Makefile, but it needs to be passed down from the top-level Makefile, as well, for it to be configurable at build time.
| * | Build: remove redundant definition in utils MakefileLee Duncan2022-04-041-2/+1
| | | | | | | | | | | | We do not need two definitions for "/etc" in utils/Makefile.