Updated: April 19, 2023 |
Verify that the client has a given resource manager ability
#include <sys/iofunc.h> int iofunc_ability_check( const resmgr_context_t * const ctp, const iofunc_ability_e iofuncability );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The iofunc_ability_check() function verifies that the client has the given resource manager ability. The resource manager library creates the following IDs (shown with the ability name and the corresponding constant):
Ability ID | Ability name | Description |
---|---|---|
IOFUNC_ABILITYID_CHOWN | iofunc/chown (IOFUNC_ABILITY_CHOWN) | Allow the client to set the ownership of files, even if not root |
IOFUNC_ABILITYID_DUP | iofunc/dup (IOFUNC_ABILITY_DUP) | Allow the client to duplicate another process's handle |
IOFUNC_ABILITYID_EXEC | iofunc/exec (IOFUNC_ABILITY_EXEC) | Grant execute access to files and directories that the client wouldn't normally have access to |
IOFUNC_ABILITYID_READ | iofunc/read (IOFUNC_ABILITY_READ) | Allow the client to access files for reading, even if it doesn't have the required permissions |
You typically use this function to check for special abilities after a call to iofunc_check_access() indicates that the client doesn't have the appropriate permissions to do an operation. These abilities can reduce the number of process manager abilities (see procmgr_ability()) that a client needs to keep.
true if the client has the given ability; false if it doesn't.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |