fs_crypto_domain_whitelist_ctrl_access_grant()

Updated: May 06, 2022

Grant a client access to a domain

Synopsis:

#include <fs_crypto_api.h>
#include <sys/fs_crypto.h>

int fs_crypto_domain_whitelist_ctrl_access_grant(
    const char *path,
    int domain,
    unsigned type,
    const void *data,
    int *preply)

Arguments:

path
The path to the filesystem's mountpoint.
domain
The number of the domain that you want to modify the list for.
type
The type of whitelist to carry out the action on. Must be one of the following:
  • FS_CRYPTO_WHITELIST_TYPE_PID — process ID.
  • FS_CRYPTO_WHITELIST_TYPE_GID — group ID.
data
A pointer to the client data the action refers to.
preply
A pointer to a location where the function can store additional success or error information.

Library:

libfscrypto

Use the -l fscrypto option to qcc to link against this library.

Description:

The fs_crypto_domain_whitelist_ctrl_access_grant() function performs a control action for a domain whitelist based on the specified type of whitelist client data. This function calls fs_crypto_domain_whitelist_ctrl(), with the action specified as FS_CRYPTO_WHITELIST_ACTION_ACCESS_GRANT. The data argument must point to a single data item associated with the type. For example, when FS_CRYPTO_WHITELIST_TYPE_PID is specified, data must be a pointer to a pid_t value.

Note: In order to use filesystem encryption, download the Encrypted Filesystem package from the QNX Software Center.

Returns:

EOK
Success.
EINVAL
Invalid arguments.
ENOMEM
Insufficent free memory.

This function can also return any of the errors indicated by devctl() or open().

Classification:

QNX Neutrino

Safety:  
Cancellation point Yes
Interrupt handler No
Signal handler No
Thread Yes