group
group__libshare__fsattr
Provides the ability to manage inode attributes.

Inode Attributes

Read, write, and execution permissions may be applied. Here is a summary of the boolean inode attributes supported:
  • SHATTR_ARCH A directory composed of an archive of files.
  • SHATTR_DB A (sqlite) database inode.
  • SHATTR_ENC An inode that has been encrypted.
  • SHATTR_FLOCK An inode that has been locked.
  • SHATTR_LINK An inode referencing another inode.
  • SHATTR_SYNC An inode that is synchronized with sharenet.
  • SHATTR_VER An inode that tracks a revision history.
  • SHATTR_COMP An inode that is stored in compressed format.
function
int shfs_access_read
(shfs_ino_t *file, shkey_t *id_key)
Check whether a user has read permission to an inode.
function
int shfs_access_write
(shfs_ino_t *file, shkey_t *id_key)
Check whether a user has write permission to an inode.
function
int shfs_access_exec
(shfs_ino_t *file, shkey_t *id_key)
Check whether a user has exec permission to an inode.
function
int shfs_access_owner_set
(shfs_ino_t *file, shkey_t *id_key)
Set the owner of a file to an identity key.
function
shkey_t* shfs_access_owner_get
(shfs_ino_t *file)
Get a file owner's identity key.
function
char* shfs_attr_label
(int attr_idx)
function
shfs_attr_t shfs_block_attr
(shfs_block_t *blk)
function
shfs_attr_t shfs_attr
(shfs_ino_t *inode)
function
char* shfs_attr_str
(shfs_attr_t attr)
function
int shfs_attr_set
(shfs_ino_t *file, int attr)
function
int shfs_attr_unset
(shfs_ino_t *file, int attr)
function
int shfs_cred_store
(shfs_ino_t *file, shkey_t *key, unsigned char *data, size_t data_len)
function
int shfs_cred_load
(shfs_ino_t *file, shkey_t *key, unsigned char *data, size_t max_len)