fs_crypto_domain_unlock_dynamic()

Unlock a dynamic domain

Synopsis:

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

int fs_crypto_domain_unlock_dynamic(
                   const char *path,
                   int length,
                   const uint8_t bytes[],
                   int *preply)

Arguments:

path
The path to the filesystem's mountpoint.
length
The number of bytes available in the key array, bytes.
bytes
The binary representation of the key.
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_unlock_dynamic() function unlocks a dynamic domain. Original file contents become available once this call completes.

Note:
  • In order to use filesystem encryption, download the Encrypted Filesystem package from the QNX Software Center.
  • You must be in the group that owns the filesystem's mountpoint in order to unlock a domain.

This function sets the variable pointed to by preply to one of the following values:

FS_CRYPTO_REPLY_ALREADY
The domain is already unlocked.
FS_CRYPTO_REPLY_BAD_KEY
The key is invalid.
FS_CRYPTO_REPLY_COMPLETE
The domain is now unlocked.
FS_CRYPTO_REPLY_ERRNO
See the error code for more information.
FS_CRYPTO_REPLY_INVALID
The command wasn't completed successfully.
FS_CRYPTO_REPLY_UNKNOWN_DOMAIN
There's no domain with the given number.
FS_CRYPTO_REPLY_UNKNOWN_TYPE
The type of encryption used for the domain is invalid.

Returns:

EOK
Success.
EBADFSYS
An inconsistency was found in the domain key in the filesystem.
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