| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Like memcpy(), the 'void *' argument of p11_buffer_add() points to the
memory area ordered in host's endianness. Add typecast of int->char to
avoid the confusion.
Reported by Andreas Metzler in:
https://lists.freedesktop.org/archives/p11-glue/2017-January/000633.html
|
|
|
|
| |
Put the pin-* attributes where they belong: to the query part.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The pin-* attributes belong to the query part. We should not parse them
until we see a '?' and they're separated with a '&'.
This might be an important thing -- some of the query attributes may
have security implications reaching outside scope of the token itself, to the
host system itself. E.g. a pin-source may cause the consumer to access a file
or module-path (unimplemented) execute code. The user may want to just chop the
attribute part off if they want the consumer access the token and not take the
security considerations into account.
|
|
|
|
|
|
|
|
|
|
| |
- Current command for creation of the p11-kit-proxy symlink
uses shell brace expansion that isn't supported by all
the shells (e.g. FreeBSD's /bin/sh does not support that).
Replace it with the old-fashioned 'for' loop
- Match extension of the source and the target, i.e. so links
to so, dylib links to dylib (previously dylib linked to so)
- Add an uninstall-local target to clean up the symlink
|
| |
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=93589
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=93588
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=92815
|
|
|
|
|
| |
The variable is mentioned in the manual but wasn't exposed from the
pkg-config.
|
|
|
|
|
| |
The files created with AC_CONFIG_FILES are automatically added to the
distribution.
|
|
|
|
|
|
|
| |
This test hasn't been working since the removal of the pthread_atfork()
deinit code. To properly clean up, the child process needs to call
C_Initialize() and C_Finalize(), and it is already tested by
/proxy/initialize-child.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reset mod->init_count when forkid has changed. Otherwise C_Finalize
does not get called.
GCC's asan spotted this:
Direct leak of 48 byte(s) in 1 object(s) allocated from:
#0 0x7f89bc7bfe20 in malloc (/lib64/libasan.so.3+0xc6e20)
#1 0x7f89bc47a1f1 in p11_dict_new ../common/dict.c:278
#2 0x7f89bc42143d in managed_C_Initialize ../p11-kit/modules.c:1477
#3 0x7f89bc464c72 in binding_C_Initialize ../p11-kit/virtual.c:121
#4 0x7f89bc1b0a51 in ffi_closure_unix64_inner (/lib64/libffi.so.6+0x5a51)
#5 0x7f89bc1b0dbf in ffi_closure_unix64 (/lib64/libffi.so.6+0x5dbf)
#6 0x7f89bc44f9e8 in rpc_C_Initialize ../p11-kit/rpc-server.c:691
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure to call p11_virtual_uninit() on managed module. Otherwise the
associated lower_module will not be released.
GCC's asan spotted this:
Direct leak of 56 byte(s) in 1 object(s) allocated from:
#0 0x7f6c5368dfe0 in calloc (/lib64/libasan.so.3+0xc6fe0)
#1 0x4436ba in p11_rpc_client_init ../p11-kit/rpc-client.c:2082
#2 0x42c147 in p11_rpc_transport_new ../p11-kit/rpc-transport.c:850
#3 0x415d95 in setup_module_for_remote_inlock ../p11-kit/modules.c:411
|
|
|
|
|
|
|
|
| |
GCC's asan spotted this:
Direct leak of 120 byte(s) in 1 object(s) allocated from:
#0 0x7f8d4f221fe0 in calloc (/lib64/libasan.so.3+0xc6fe0)
#1 0x427f55 in rpc_socket_new ../p11-kit/rpc-transport.c:100
#2 0x42bc1b in rpc_exec_connect ../p11-kit/rpc-transport.c:767
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=97245
|
|
|
|
|
|
|
| |
The commit 63644dc introduced several memcmp() calls without checking
the length of the first argument.
https://bugs.freedesktop.org/show_bug.cgi?id=97245
|
|
|
|
|
|
|
| |
Signed-off-by: Stef Walter <stefw@redhat.com>
* Fixed up indentation
https://bugs.freedesktop.org/show_bug.cgi?id=80519
|
|
|
|
|
|
|
| |
p11_virtual_init() should take a CK_FUNCTION_LIST as the 3rd argument,
if the 2nd argument is &p11_virtual_base.
https://bugs.freedesktop.org/show_bug.cgi?id=87192
|
|
|
|
|
|
|
|
|
| |
However, on Mac OS X the library is named libp11-kit.dylib so
in the above command the source of the link resolves to nothing,
the destination becomes the source and the link to a non-existent
file is created in the working directory.
https://bugs.freedesktop.org/show_bug.cgi?id=98022
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=97245
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=97245
|
|
|
|
|
|
| |
Accept 'slot-id' path attribute defined in RFC 7512.
https://bugs.freedesktop.org/show_bug.cgi?id=97245
|
|
|
|
|
|
|
| |
Accept 'slot-description' and 'slot-manifacturer' path attributes
defined in RFC 7512.
https://bugs.freedesktop.org/show_bug.cgi?id=97245
|
|
|
|
|
|
|
|
|
|
|
| |
For every path/query component, p11_kit_uri_parse() allocates a small
buffer to strip whitespace out. This patch removes any whitespace in
the URI at the entry of the function to simplify the code.
Note that RFC 7512 actually suggests to ignore whitespace at the
extracting phase rather than the parsing phase.
https://bugs.freedesktop.org/show_bug.cgi?id=97245
|
|
|
|
|
|
|
| |
The test case added for bug 90289 (commit c73edd00) revealed that some
of the C_Initialize() implementations do not consider the case where it
is called from the parent process and then from the child process,
without calling C_Finalize() in between.
|
| |
|
|
|
|
|
|
|
|
| |
p11_kit_module_load() hands on the module_path argument to
load_module_from_file_inlock() which accepts relative paths, prepending
P11_MODULE_PATH. Update API documentation accordingly.
https://lists.freedesktop.org/archives/p11-glue/2016-February/000587.html
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=93587
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fd_set and friends, according to POSIX.1-2001, needs sys/select.h, so
include it otherwise the build fails for uClibc:
p11-kit/rpc-transport.c: In function ‘rpc_socket_read’:
p11-kit/rpc-transport.c:350:2: error: unknown type name ‘fd_set’
p11-kit/rpc-transport.c:416:4: warning: implicit declaration of function
‘FD_ZERO’ [-Wimplicit-function-declaration]
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
https://bugs.freedesktop.org/show_bug.cgi?id=93211
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=92532
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=92551
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=92445
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=92434
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=89081
|
|
|
|
|
|
|
|
|
|
|
| |
That function allows to obtain the filename used by the PKCS #11
module. That is the filename used by dlopen().
Note that we don't provide p11_kit_module_for_filename() because
it would have to deal with filename equivalences.
Signed-off-by: Stef Walter <stefw@redhat.com>
* Fixed up whitespace
|
|
|
|
|
|
|
|
|
|
|
|
| |
This corrects a deadlock on the forked process. The deadlock
happened because the proxy called C_Finalize prior to a C_Initialize
which is wrong according to PKCS #11 (2.40). This patch eliminates
the C_Finalize call in that case.
This resolves #90289
https://bugs.freedesktop.org/show_bug.cgi?id=90289
Reviewed-by: Stef Walter <stefw@redhat.com>
|
|
|
|
| |
Reviewed-by: Stef Walter <stefw@redhat.com>
|
|
|
|
|
|
|
|
| |
Libffi uses shared memory to store them, and a deallocation
in a child will cause issues for the parent or vice versa.
Signed-off-by: Stef Walter <stefw@redhat.com>
* Use #if to comment out code, avoid compiler warnings
|
|
|
|
| |
Reviewed-by: Stef Walter <stefw@redhat.com>
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=90827
|
|
|
|
|
|
|
|
|
|
|
|
| |
We continue to accept both the older style 'object-type' field
in addition to the new 'type' field. However we start generating
URIs in the new form.
In other words we have backwards compatibility, but not forwards
compatibility. Given the fact that PKCS#11 URIs are now standardizing
this is an acceptable compromise.
https://bugs.freedesktop.org/show_bug.cgi?id=86474
|
|
|
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=87582
Signed-off-by: Stef Walter <stefw@redhat.com>
* Added test for bad encoded pin-value in uri
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=87582
|
| |
|
|
|
|
| |
This was a later change to the PKCS#11 specification drafts
|
|
|
|
|
|
|
| |
Add missing header for strdup(3).
When EPROTO is not available, fallback to EIO.
https://bugs.freedesktop.org/show_bug.cgi?id=84665
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of trying to perform actions in pthread_atfork() which
are not async-signal-safe, just increment a counter so we can
later tell if the process has forked.
Note this does not make it safe to mix threads and forking without
immediately execing. This is a far broader problem that p11-kit,
however we now do the right thing when fork+exec is used from a
thread.
https://bugs.freedesktop.org/show_bug.cgi?id=84567
|
|
|
|
|
| |
This allows security frameworks like SELinux or AppArmor to target
it specifically.
|
|
|
|
|
|
| |
External binaries are searched for in $(libdir)/p11-kit. The
P11_KIT_PRIVATEDIR can be used to override that, for example during
'make check'
|
|
|
|
|
|
| |
This option was not completed in time, and as implemented suffers
from limitations that the module is not really completely isolated
as it still runs under the same user id as the calling process.
|