fs_crypto_domain_whitelist_ctrl()

Updated: May 06, 2022

Perform a control action for a domain whitelist

Synopsis:

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

int fs_crypto_domain_whitelist_ctrl(
    const char *path,
    int domain,
    unsigned action,
    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.
action
The action to carry out on the whitelist. The following actions are supported :
  • FS_CRYPTO_WHITELIST_ACTION_ACCESS_GRANT — add the specified client data to the whitelist for the specified domain. The result is the client will be granted access to the domain when a hard lock is pending.
  • FS_CRYPTO_WHITELIST_ACTION_ACCESS_REVOKE — remove the specified client data from the whitelist for the specified domain. The result is the client will be revoked access from the domain when a hard lock is pending.
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() function performs a control action for a domain whitelist based on the specified type of whitelist client data. 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