New API call iso_node_set_acl_text()
and automatic update of ACL entries by iso_node_set_permissions()
This commit is contained in:
@ -4126,6 +4126,7 @@ int aaip_xinfo_func(void *data, int flag);
|
||||
|
||||
#endif /* Libisofs_with_aaiP */
|
||||
|
||||
/* ts A90116 */
|
||||
/**
|
||||
* Get an eventual ACL which is associated with the node.
|
||||
* The result will be in "long" text form as of man acl resp. acl_to_text().
|
||||
@ -4142,7 +4143,7 @@ int aaip_xinfo_func(void *data, int flag);
|
||||
* (Linux directories can have a "default" ACL which influences
|
||||
* the permissions of newly created files.)
|
||||
* bit4= if no ACL is available: return *text == NULL
|
||||
else: produce ACL from POSIX permissions
|
||||
* else: produce ACL from POSIX permissions
|
||||
* bit15= free memory and return 1
|
||||
* @return
|
||||
* 2 ACL produced from POSIX permissions
|
||||
@ -4155,15 +4156,47 @@ int aaip_xinfo_func(void *data, int flag);
|
||||
int iso_node_get_acl_text(IsoNode *node, char **text, int flag);
|
||||
|
||||
|
||||
/* ts A90119 */
|
||||
/**
|
||||
* Set the ACL of the given node to the list in parameter text or delete it.
|
||||
*
|
||||
* @param node
|
||||
* The node that is to be manipulated.
|
||||
* @param text
|
||||
* The ACL text to be set into effect. NULL will delete an eventually
|
||||
* existing ACL of the node.
|
||||
* @param flag
|
||||
* Bitfield for control purposes
|
||||
* bit0= set "default" ACL rather than "access" ACL
|
||||
* (Linux directories can have a "default" ACL which influences
|
||||
* the permissions of newly created files.)
|
||||
* bit1= ignore text but rather update eventual "access" ACL to the POSIX
|
||||
* permissions of node. If no ACL exists, then do nothing and
|
||||
* return success.
|
||||
* @return
|
||||
* > 0 success
|
||||
* <=0 failure
|
||||
*/
|
||||
int iso_node_set_acl_text(IsoNode *node, char *text, int flag);
|
||||
|
||||
|
||||
/* ts A90118 */
|
||||
/* Set the ACL of the given file in the local filesystem to a given list
|
||||
in long text form.
|
||||
@param disk_path Path to the file
|
||||
@param text The input text (0 terminated, ACL long text form)
|
||||
@param flag Bitfield for control purposes
|
||||
bit0= set default ACL rather than access ACL
|
||||
@return >0 ok
|
||||
0 no ACL manipulation adapter available
|
||||
-1 failure of system ACL service (see errno)
|
||||
* in long text form.
|
||||
*
|
||||
* @param disk_path
|
||||
* Path to the file
|
||||
* @param text
|
||||
* The input text (0 terminated, ACL long text form)
|
||||
* @param flag
|
||||
* Bitfield for control purposes
|
||||
* bit0= set default ACL rather than access ACL
|
||||
* @return
|
||||
* > 0 ok
|
||||
* 0 no ACL manipulation adapter available
|
||||
* -1 failure of system ACL service (see errno)
|
||||
*
|
||||
* @since 0.6.14
|
||||
*/
|
||||
int iso_local_set_acl_text(char *disk_path, char *text, int flag);
|
||||
|
||||
|
Reference in New Issue
Block a user