int (*stat) ( resmgr_context_t *ctp, io_stat_t *msg, RESMGR_OCB_T *ocb )
struct _io_stat { uint16_t type; uint16_t combine_len; union { uint32_t zero; uint32_t format; }; }; typedef union { struct _io_stat i; struct __stat_t32_2001 o_t32_2001; struct __stat_t32_2008 o_t32_2008; struct __stat_t64_2008 o_t64_2008; struct stat o; } io_stat_t;
The default implementation iofunc_stat_default() is expected to work on files opened without either read or write permission. The helper function iofunc_stat() does not do any permission checking. No additional permission checking is required.
If you are implementing a resource manager that deals with user input, be careful not to leak timing data through the last accessed or last modified timestamps. Similarly, do not use the size parameter to keep track of bytes sent or received over serial ports or other potentially sensitive information that should not be observable.