You've already forked opencryptoki
mirror of
https://github.com/opencryptoki/opencryptoki.git
synced 2026-10-24 05:39:17 +03:00
A new optional key value pair named 'usergroup' can be specified within a slot structure to specify the user group name that is set as the owner of the token directory. Only users that are members of this group have access to the token and its objects. Users that are not a member of this group will not see the token as being available (e.g. via 'pkcsconf -t' or via 'C_GetTokenInfo'). If no token group is specified, then the token is owned by the 'pkcs11' group like before this change. If a token user group is specified, then the pkcsslotd checks if that group exists, and if all members of that group are also members of the 'pkcs11' group. This is required to be able to access the pkcsslotd socket at all. Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
43 lines
1.1 KiB
C
43 lines
1.1 KiB
C
/*
|
|
* COPYRIGHT (c) International Business Machines Corp. 2012-2017
|
|
*
|
|
* This program is provided under the terms of the Common Public License,
|
|
* version 1.0 (CPL-1.0). Any use, reproduction or distribution for this
|
|
* software constitutes recipient's acceptance of CPL-1.0 terms which can be
|
|
* found in the file LICENSE file or at
|
|
* https://opensource.org/licenses/cpl1.0.php
|
|
*/
|
|
|
|
/*
|
|
* OpenCryptoki ICSF token - Shared memory abstraction for OpenCryptoki
|
|
*
|
|
* Author: Marcelo Cerri (mhcerri@br.ibm.com)
|
|
*
|
|
* Note: the functions in this files are implemented as an abstraction layer for
|
|
* POSIX shared memory functions but they can be extended to support other
|
|
* APIs of shared memory.
|
|
*/
|
|
|
|
#ifndef OCK_SHARED_MEMORY_H
|
|
#define OCK_SHARED_MEMORY_H
|
|
|
|
#include <limits.h>
|
|
|
|
#define SM_NAME_LEN (NAME_MAX)
|
|
|
|
|
|
int sm_open(const char *sm_name, int mode, void **p_addr, size_t len,
|
|
int force, const char *group);
|
|
|
|
int sm_close(void *addr, int destroy, int ignore_ref_count);
|
|
|
|
int sm_destroy(const char *name);
|
|
|
|
int sm_sync(void *addr);
|
|
|
|
int sm_copy_name(void *addr, char *buffer, size_t len);
|
|
|
|
int sm_get_count(void *addr);
|
|
|
|
#endif
|