This patch fixes the following Coverity complaint:
CID 275308 (#1-2 of 2): Uninitialized scalar variable (UNINIT)
uninit_use_in_call: Using uninitialized value
multi.multi_cmd.replies_done when calling fprintf.
Transport Target mode server need to able to function when running in
containerized form factor in a secure and multi-tenant platform.
Solution: Such applications when containerized can run in any container
based platform such as Kubernetes/OpenShift or a custom one. These
applications are generic in nature and all they need is access to SCST
user storage device driver (/dev/scst_user). The security policy of the
platform may not allow these applications to manage Fibre Channel (FC)
port and /sys file-system. The platform, however, can manage the FC ports
on behalf of these applications. The containerized applications can
remain generic in nature and run on any containerized platforms. The
sequence of operations would be 1. The platform converts the desired FC
ports to target mode prior to starting the containerized application 2.
The application does device registration using exported the SCST user
storage device driver 3. The platform, at this point, asynchronously adds
FC port LUNs to the user device registered by the application. As the
application inside the container can auto or manual restart
asynchronously, the platform would add the LUNs every time the
application does device registration.
Patch description: The SCST event mechanism is leveraged to achieve the
asynchronous LUN additions when application does device registration. The
current set of SCST events is extended to send a new event whenever there
is a virtual user device registration happens. The platform can watch for
the specific event and make business logic decisions to allow target mode
applications function securely. By extending the set of event, the SCST
module will be friendly to containerized applications and platforms.
Signed-off-by: Vikas Goel <vikas.goel@veritas.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9210 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Suppress the following Coverity complaint:
CID 361202: Error handling issues (NEGATIVE_RETURNS)
"page_size" is passed to a parameter that cannot be negative.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9116 d57e44dd-8a1f-0410-8b47-8ef2f437770f
User space code must not use PAGE_SIZE but must use sysconf(_SC_PAGESIZE)
instead to obtain the page size.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8997 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Move the build_mode file from the top level into the scst directory. Write
build mode defines into scst/include/build_mode.h and include that file
directly or indirectly in all source files that depend on these #defines.
This approach has the advantage that "make clean" does no longer has to
be run when switching between build modes because the kernel build system
recognizes build_mode.h as a dependency and triggers a rebuild of all
source files that directly or indirectly include the build_mode.h header
file.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8347 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Avoid that the compiler complains that the assert() expression compares a
signed with an unsigned integer.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8269 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Since RHEL 5 and kernel versions before 2.6.26 rely on procfs support,
this patch removes support for RHEL 5.x and also for kernel versions
before 2.6.26.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7829 d57e44dd-8a1f-0410-8b47-8ef2f437770f
When DESTDIR is a relative path, make install fails to install
`scst_on_stpg` for not having created `$(DESTDIR)$(PREFIX)/bin/scst`.
When DESTDIR is an absolute path, make install doesn't fail to install
`scst_on_stpg` because usr/fileio has already created the directory.
usr/stpgd should explicitly create `$(DESTDIR)$(PREFIX)/bin/scst`
so that it can handle a relative DESTDIR, plus be independent of
usr/fileio installation.
--
# cd usr
# make install DESTDIR=./aaa
cd fileio && make install
make[1]: Entering directory '/tmp/scst/usr/fileio'
install -d ./aaa/usr/local/bin/scst
install -m 755 fileio_tgt ./aaa/usr/local/bin/scst
make[1]: Leaving directory '/tmp/scst/usr/fileio'
cd stpgd && make install
make[1]: Entering directory '/tmp/scst/usr/stpgd'
install -d ./aaa/usr/local/sbin
install -m 700 stpgd ./aaa/usr/local/sbin
install -m 700 scst_on_stpg ./aaa/usr/local/bin/scst/scst_on_stpg
install: cannot create regular file './aaa/usr/local/bin/scst/scst_on_stpg': No such file or directory
Makefile:60: recipe for target 'install' failed
make[1]: *** [install] Error 1
make[1]: Leaving directory '/tmp/scst/usr/stpgd'
Makefile:32: recipe for target 'install' failed
make: *** [install] Error 2
Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@osnexus.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7403 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Add "XXX" comments in a few places about potential problems seen in SCST code,
for future investigation and possible repair.
Signed-off-by: David Butterfield <dab21774@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7123 d57e44dd-8a1f-0410-8b47-8ef2f437770f