Browse Source

voiding to store empty ACL for all directories withou ACL

release-1.5.4.branch
Thomas Schmitt 14 years ago
parent
commit
aae339fe49
  1. 4
      libisofs/aaip-os-linux.c
  2. 14
      libisofs/fs_local.c

4
libisofs/aaip-os-linux.c

@ -31,11 +31,13 @@
with bit15 of flag.
@param flag Bitfield for control purposes
bit0= obtain default ACL rather than access ACL
behave like bit4 if ACL is empty
bit4= set *text = NULL and return 2
if the ACL matches st_mode permissions.
bit15= free text and return 1
@return 1 ok
2 only st_mode permissions exist and bit 4 is set
or empty ACL and bit0 is set
-1 failure of system ACL service (see errno)
*/
int aaip_get_acl_text(char *path, char **text, int flag)
@ -65,6 +67,8 @@ int aaip_get_acl_text(char *path, char **text, int flag)
if(!(ret & (7 | 64)))
(*text)[0]= 0;
}
}
if(flag & (1 | 16)) {
if((*text)[0] == 0 || strcmp(*text, "\n") == 0) {
acl_free(text);
*text= NULL;

14
libisofs/fs_local.c

@ -509,11 +509,15 @@ int lfs_get_aa_string(IsoFileSource *src, unsigned char **aa_string, int flag)
ret = ISO_FILE_ERROR;
goto ex;
}
sret = aaip_encode("AA", num_attrs, names,
value_lengths, values, &result_len, &result, 0);
if (sret == 0) {
ret = ISO_OUT_OF_MEM;
goto ex;
if (num_attrs == 0)
result = NULL;
else {
sret = aaip_encode("AA", num_attrs, names,
value_lengths, values, &result_len, &result, 0);
if (sret == 0) {
ret = ISO_OUT_OF_MEM;
goto ex;
}
}
*aa_string = result;
ret = 1;

Loading…
Cancel
Save