nfs-ganesha 1.4
Functions

fsal_access.c File Reference

#include "fsal.h"
#include "fsal_internal.h"
#include "fsal_convert.h"
#include "FSAL/access_check.h"

Go to the source code of this file.

Functions

fsal_status_t XFSFSAL_access (fsal_handle_t *p_object_handle, fsal_op_context_t *p_context, fsal_accessflags_t access_type, fsal_attrib_list_t *p_object_attributes)

Function Documentation

fsal_status_t XFSFSAL_access ( fsal_handle_t p_object_handle,
fsal_op_context_t p_context,
fsal_accessflags_t  access_type,
fsal_attrib_list_t p_object_attributes 
)

FSAL_access : Tests whether the user or entity identified by its cred can access the object identified by object_handle, as indicated by the access_type parameters.

Parameters:
object_handle(input): The handle of the object to test permissions on.
cred(input): Authentication context for the operation (user,...).
access_type(input): Indicates the permissions to test. This is an inclusive OR of the permissions to be checked for the user identified by cred. 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). May be NULL.
Returns:
Major error codes :
  • ERR_FSAL_NO_ERROR (no error)
  • Another error code if an error occured.

Definition at line 75 of file FSAL_XFS/fsal_access.c.