To avoid iterating through the API Session list Anchor->SessListBeg
every time we need a session reference, use the session's own
pointer as handle.
This change MAY introduce segfaults if the caller application
passes invalid session handlers that cannot be directly dereferenced,
but that usually only means that the application is buggy and needs
fixing.
Also removes tests with invalid session handlers from obj_mgmt.c
Signed-off-by: Klaus Heinrich Kiwi <klausk@linux.vnet.ibm.com>
pkcsslotd executable creates a pidfile as /var/lib/opencryptoki/.slotpid
(CONFIG_PATH + "/.slotpid"), but the corresponding initscipt expects the
pidfile at /var/run/pkcsslotd.pid and this one is used to check whether
the service is running etc. The attached patch switches pkcsslotd to using
the /var/run/pkcsslotd.pid one and also simplifies the logic in the initscript
because the daemon function takes care of the checked cases.
Signed-off-by: Dan Horák <dan@danny.cz>
structures padded due to alignment variations between x86_64 64bit
and 32 bit (i386) binaries.
Full path removed from pk_config_data file. Library paths added to
ld.so.conf.d files for library location.