fs_crypto_migrate_path()

Mark an entire directory for migration into an encryption domain

Synopsis:

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

int fs_crypto_migrate_path( const char *path,
                            int domain, 
                            int *preply );

Arguments:

path
The path to the directory that you want to migrate.
domain
The domain that you want the directory to migrate to. This can be 0 if you want it to move to the unencrypted domain.
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_migrate_path() function marks the given directory and its contents for migration to the given domain.

Note:
  • In order to use filesystem encryption, download the Encrypted Filesystem package from the QNX Software Center.
  • In order for you to tag files for migration, the source and destination domains must be unlocked.

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

FS_CRYPTO_REPLY_BAD_FILE
The path specifies a restricted file that can't migrate.
FS_CRYPTO_REPLY_COMPLETE
The directory was successfully marked.
FS_CRYPTO_REPLY_INVALID
The command wasn't completed successfully.
FS_CRYPTO_REPLY_READONLY
The filesystem is mounted read-only.
FS_CRYPTO_REPLY_NOSUPPORT
The file isn't a regular file.

Returns:

EOK
Success.
EINVAL
Invalid arguments.

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

Classification:

QNX Neutrino

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