Description of problem: Always return error codes defined in iscsi_err.h from libiscsi calls. Errno is too high-level for proper error handling and this makes troubles for consumers to know what happened. Parsing error string from libiscsi_context isn't "the good way", I think. Version-Release number of selected component (if applicable): iscsi-initiator-utils-6.2.0.873-29.git4c9d6f9.fc24 How reproducible: One of several examples: Try to perform iSCSI login with wrong credentials. Steps to Reproduce: 1. call libiscsi_node_login() with wrong credentials 2. examine the returned error code Actual results: libiscsi_node_login() returns ENOTCONN (107) from errno.h Expected results: libiscsI_node_login() returns ISCSI_ERR_LOGIN_AUTH_FAILED (24) from iscsi_err.h Additional info: Include path(s) need to be slightly modified. See attached patches from https://github.com/phatina/open-iscsi.
Created attachment 1086761 [details] libiscsi: always return iscsi_err codes instead of standard errno codes For better error handling, return error codes from iscsi_err.h.
Created attachment 1086762 [details] remove iscsi_err uninitialized symbol from iscsi_err.h Remove uninitialized, unused iscsi_err symbol from iscsi_err.h. This makes only troubles, when linking the library to a binary.
Created attachment 1086766 [details] spec file: install libiscsi.h and iscsi_err.h We need to provide client the enum with proper error codes. I suggest to install libiscsi.h and iscsi_err.h into %{_includedir}/libiscsi/. /usr/include/ ├── libiscsi │ ├── iscsi_err.h │ └── libiscsi.h └── libiscsi.h ^^^^^^^^^^ libiscsi can be used in the same way as before.
Created attachment 1086769 [details] top-level libiscsi.h header file Top level header file which includes the actual libiscsi.h and iscsi_err.h and provides unchanged include path.
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle. Changing version to '24'. More information and reason for this action is here: https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase
This message is a reminder that Fedora 24 is nearing its end of life. Approximately 2 (two) weeks from now Fedora will stop maintaining and issuing updates for Fedora 24. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '24'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 24 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.