#include <rpc/rpc.h>
#include <rpc/xdr.h>
#include "nfs4.h"
#include <string.h>
#include "fsal_internal.h"
#include "fsal_convert.h"
#include "fsal_common.h"
#include "nfs_proto_functions.h"
#include "fsal_nfsv4_macros.h"
Go to the source code of this file.
Define Documentation
#define FSAL_ACCESS_IDX_OP_ACCESS 1 |
#define FSAL_ACCESS_IDX_OP_GETATTR 2 |
#define FSAL_ACCESS_IDX_OP_PUTFH 0 |
#define FSAL_ACCESS_NB_OP_ACCESS 3 |
Function Documentation
PROXYFSAL_access : Tests whether the user or entity identified by the p_context structure can access the object identified by object_handle, as indicated by the access_type parameter.
- Parameters:
-
object_handle | (input): The handle of the object to test permissions on. |
p_context | (input): Authentication context for the operation (export entry, user,...). |
access_type | (input): Indicates the permissions to be tested. This is an inclusive OR of the permissions to be checked for the user specified by p_context. Permissions constants are :
- FSAL_R_OK : test for read permission
- FSAL_W_OK : test for write permission
- FSAL_X_OK : test for exec permission
- FSAL_F_OK : test for file existence
|
object_attributes | (optional input/output): The post operation attributes for the object. As input, it defines the attributes that the caller wants to retrieve (by positioning flags into this structure) and the output is built considering this input (it fills the structure according to the flags it contains). Can be NULL. |
- Returns:
- Major error codes :
- ERR_FSAL_NO_ERROR (no error, asked permission is granted)
- ERR_FSAL_ACCESS (object permissions doesn't fit asked access type)
- ERR_FSAL_STALE (object_handle does not address an existing object)
- ERR_FSAL_FAULT (a NULL pointer was passed as mandatory argument)
- Other error codes when something anormal occurs.
Definition at line 74 of file FSAL_PROXY/fsal_access.c.