| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* common/compat.c: Fix "implicit declaration of function 'issetugid'"
warning. On FreeBSD, it's required to define __BSD_VISIBLE to make
issetugid(2) visible
* common/test-message.c: Fix "implicit declaration of function
'asprintf'" by including <stdio.h>
* p11-kit/test-iter.c: Fix "format '%lu' expects argument of
type 'long unsigned int', but argument 3 has type 'int'" by
changing format string to "%d"
|
|
|
|
|
|
| |
This allows daemons outside user's session to use per-user PKCS#11
modules. Useful for letting VPN daemons or wpa_supplicant use
certificates stored in user's GNOME keyring, etc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows us to do nested locking within one thread avoiding a lockup
when remoting the p11-kit-proxy.so module:
#0 0x00007f190f35838d in __lll_lock_wait () from /lib64/libpthread.so.0
#1 0x00007f190f351e4d in pthread_mutex_lock () from /lib64/libpthread.so.0
#2 0x00007f190f98657f in C_GetFunctionList (list=0x7ffe7ec3f798) at p11-kit/proxy.c:2355
#3 0x00007f190f993cc9 in dlopen_and_get_function_list (funcs=0x7ffe7ec3f798, path=0x7ffe7ec40926 "/usr/local/lib/p11-kit-proxy.so", mod=0x249e3d0) at p11-kit/modules.c:337
#4 load_module_from_file_inlock (name=name@entry=0x0, path=path@entry=0x7ffe7ec40926 "/usr/local/lib/p11-kit-proxy.so", result=result@entry=0x7ffe7ec3f7e8) at p11-kit/modules.c:382
#5 0x00007f190f99587f in p11_kit_module_load (module_path=module_path@entry=0x7ffe7ec40926 "/usr/local/lib/p11-kit-proxy.so", flags=flags@entry=0) at p11-kit/modules.c:2427
#6 0x0000000000401c4b in serve_module_from_file (file=0x7ffe7ec40926 "/usr/local/lib/p11-kit-proxy.so") at p11-kit/remote.c:105
#7 main (argc=1, argv=<optimized out>) at p11-kit/remote.c:169
The Windows NT mutex is aready recursive by default.
|
|
|
|
|
| |
Accept and produce 'module-name' and 'module-path' query attributes
defined in RFC 7512.
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Otherwise the file is left in builddir, after make distclean.
|
|
|
|
|
| |
Since $privatedir expands to "${libexecdir}/p11-kit", $libexecdir must
be substituted in the script beforehand.
|
| |
|
|
|
|
| |
https://bugzilla.redhat.com/show_bug.cgi?id=1191209
|
|
|
|
| |
https://bugzilla.redhat.com/show_bug.cgi?id=1191231
|
|
|
|
| |
https://bugzilla.redhat.com/show_bug.cgi?id=1191231
|
|
|
|
| |
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
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=92813
|
|
|
|
| |
https://bugzilla.redhat.com/show_bug.cgi?id=1160783
|
|
|
|
|
|
|
| |
While 'trust anchor' command tries to add CKA_TRUSTED attribute to any
object, it is only valid for a certificate object.
https://bugzilla.redhat.com/show_bug.cgi?id=1158926
|
|
|
|
|
|
|
| |
This fixes issues pointed in:
https://bugzilla.redhat.com/show_bug.cgi?id=985445
except for p11-kit/conf.c:read_config_file(), which was rewritten using
mmap() and thus length calculation is no longer needed.
|
|
|
|
|
|
|
|
|
|
|
| |
According to the GNU Coding Standards[1], private executables should be
installed to libexecdir, not libdir.
Move privatedir to libexecdir.
[1] https://www.gnu.org/prep/standards/
https://bugs.freedesktop.org/show_bug.cgi?id=98817
|
|
|
|
|
|
|
|
| |
Previously p11-kit-trust.so tried to interpret certificate as PEM format
first. This could cause potential conflict if the certificate were
actually in DER format and contained a PEM marker strings.
https://bugs.freedesktop.org/show_bug.cgi?id=92063
|
|
|
|
|
| |
The p11-kit code has moved to GitHub. The documentation needs
an update.
|
|
|
|
|
| |
The temporary directory is often mounted with nosuid, thus whatever runs
from there doesn't get AT_SECURE in auxv.
|
|
|
|
| |
https://bugzilla.redhat.com/show_bug.cgi?id=1154693
|
|
|
|
| |
https://bugzilla.redhat.com/show_bug.cgi?id=1158467
|
|
|
|
|
|
|
| |
Merge changes from utf8.c in FreeBSD's libc:
https://svnweb.freebsd.org/base/head/lib/libc/locale/utf8.c?revision=290494&view=markup#l196
https://bugzilla.redhat.com/show_bug.cgi?id=985449
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Update po/Makevars to the latest template and take advantage of
PO_DEPENDS_ON_POT = no.
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
GCC's asan spotted this:
Direct leak of 338 byte(s) in 13 object(s) allocated from:
#0 0x7f54f03fee20 in malloc (/lib64/libasan.so.3+0xc6e20)
#1 0x445e8c in p11_path_build ../common/path.c:222
#2 0x4385bd in expand_tempdir ../common/test.c:334
#3 0x43869c in p11_test_directory ../common/test.c:361
#4 0x4033e3 in setup_temp ../trust/test-token.c:79
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
The test-module program currently depends on TRUST_PATHS, which is
determined by the configure script and normally points to a resource
outside of the build tree. To make the test system-independent, use
a crafted path for testing.
https://bugs.freedesktop.org/show_bug.cgi?id=89027
|