Correcting my statement in the previous commit:

There is defined correspondence between ACL and st_mode in Linux man 5 acl.
It is complicated and libisofs will have to ensure integrity of ACL
manipulations and st_mode manipulations. (It will not check integrity when
loading ACLs and st_mode from filesystems.)
This commit is contained in:
Thomas Schmitt 2009-01-19 10:48:34 +01:00
parent 6ad6d3c219
commit 6659ec1566
1 changed files with 25 additions and 0 deletions

View File

@ -288,6 +288,31 @@ const char *iso_node_get_name(const IsoNode *node)
void iso_node_set_permissions(IsoNode *node, mode_t mode)
{
node->mode = (node->mode & S_IFMT) | (mode & ~S_IFMT);
#ifdef Libisofs_with_aaiP
/* Linux man 5 acl says:
The permissions defined by ACLs are a superset of the permissions speci-
fied by the file permission bits. The permissions defined for the file
owner correspond to the permissions of the ACL_USER_OBJ entry. The per-
missions defined for the file group correspond to the permissions of the
ACL_GROUP_OBJ entry, if the ACL has no ACL_MASK entry. If the ACL has an
ACL_MASK entry, then the permissions defined for the file group corre-
spond to the permissions of the ACL_MASK entry. The permissions defined
for the other class correspond to the permissions of the ACL_OTHER_OBJ
entry.
Modification of the file permission bits results in the modification of
the permissions in the associated ACL entries. Modification of the per-
missions in the ACL entries results in the modification of the file per-
mission bits.
*/
/* >>> if the node has ACL info : */
/* >>> update ACL */
#endif
}
/**