credential_set_access_policy()

Update the access policy of a given credential.

Synopsis:

#include <sys/credential/credential_policy.h>
 
int credential_set_access_policy(credential_t *cred,
                                 const credential_access_subject_t *subject,
                                 credential_access_permission_mask_t permission)

Since:

BlackBerry 10.3.1

Arguments:

cred

The credential which is protected by the access policy.

subject

The access subject whose access permissions you wish to update. Set this parameter to 0 to modify the global permissions.

permission

Access permission flags that should be assigned to target subject.

Library:

libcredential (For the qcc command, use the -l bps option to link against this library)

Description:

This function update the permission flags for the given credential for the specified access subject.

For example, for an credential, a read-only permission can be granted to everyone, or a read/write permission can be granted to a specific application.

Returns:

0 if operation was successful, error code otherwise.