Implements access-control-specific control operations for a file system.
int vfs_aclxcntl (vfsp, vp, cmd, uiop, argsize, crp)
struct vfs *vfsp;
struct vnode *vp;
int cmd;
struct uio *uiop;
size_t *argsize;
struct ucred *crp;
The vfs_aclxcntl entry point is invoked to perform various ACL-specific control operations on the underlying physical file system. If a file system is implemented to support this interface, it needs to adhere to the various commands and arguments defined for the interface. A file system implementation can define cmd parameter values and corresponding control functions that are specific to the file system. The cmd parameter for these functions has values defined globally for all the physical file systems. These control operations can be issued with the ACL library interfaces.
Item | Description |
---|---|
vfsp | Points to the file system for which the control operation is to be issued. |
vp | Points to the virtual node pointer to the file path of the file system for which the control operation is being requested. |
cmd | Specifies which control operation to perform.
Has one of the following values:
|
uiop | Identifies data specific to the control operation. If the cmd parameter has a value of ACLCNTL_GETACLXTYPES, uiop points to a buffer area where the file system stores the supported ACL types. If the cmd parameter has a value of ACLCNTL_GETACLXTYPEINFO, uiop points to a buffer area where the file system stores the ACL characteristics information. |
argsize | Identifies the length of the data specified by the arg parameter. This buffer is used to return the necessary buffer size, in case the buffer size provided by the user is not enough. |
crp | Points to the cred structure. This structure contains data that the file system can use to validate access permission. |
The vfs_aclxcntl entry point can be called from the process environment only.
Upon successful completion, the vfs_aclxcntl entry point returns 0. Nonzero return values are returned from the /usr/include/sys/errno.h file to indicate failure.
Item | Description |
---|---|
EACCES | The cmd parameter requires a privilege that the current process does not have. |
EINVAL | Indicates that the cmd parameter is not a supported control, or the arg parameter is not a valid argument for the command. |
ENOSPC | The input buffer was not sufficient for storing the requested information. |