Displaying "+" with lslx if ACL is detected

master
Thomas Schmitt 14 years ago
parent 5d21c97de7
commit af43ee46fd
  1. 6
      xorriso/xorriso.c
  2. 2
      xorriso/xorriso_timestamp.h
  3. 31
      xorriso/xorrisoburn.c
  4. 3
      xorriso/xorrisoburn.h

@ -8349,7 +8349,7 @@ int Xorriso_lsx_filev(struct XorrisO *xorriso, char *wd,
int filec, char **filev, off_t boss_mem, int flag)
{
int i, ret, was_error= 0, dfilec= 0, pass, passes;
char sfe[5*SfileadrL], sfe2[5*SfileadrL], path[SfileadrL];
char sfe[5*SfileadrL], sfe2[5*SfileadrL], path[SfileadrL], *acl_text= NULL;
char *rpt, link_target[SfileadrL], **dfilev= NULL;
off_t size;
struct stat stbuf;
@ -8430,7 +8430,9 @@ int Xorriso_lsx_filev(struct XorrisO *xorriso, char *wd,
link_target[0]= 0;
rpt[0]= 0;
if((flag&5)==1) {
ret= Xorriso_format_ls_l(xorriso, &stbuf, 0);
ret= Xorriso_local_getfacl(xorriso, path, &acl_text, 16);
ret= Xorriso_format_ls_l(xorriso, &stbuf, (acl_text != NULL) << 1);
Xorriso_local_getfacl(xorriso, path, &acl_text, 1 << 15);
if(ret<=0)
continue;
if(S_ISLNK(stbuf.st_mode)) {

@ -1 +1 @@
#define Xorriso_timestamP "2009.02.08.132116"
#define Xorriso_timestamP "2009.02.08.151354"

@ -9151,3 +9151,34 @@ ex:;
return(ret);
}
/*
@param flag
Bitfield for control purposes
bit0= get default ACL rather than access ACL
bit4= set *text = NULL and return 2
if the ACL matches st_mode permissions.
bit5= in case of symbolic link: inquire link target
bit15= free text and return 1
@return
1 ok
2 ok, trivial ACL found while bit4 is set, *text is NULL
0 no ACL manipulation adapter available
-1 failure of system ACL service (see errno)
-2 attempt to inquire ACL of a symbolic link without bit4 or bit5
resp. with no suitable link target
*/
int Xorriso_local_getfacl(struct XorrisO *xorriso, char *disk_path,
char **text, int flag)
{
int ret;
#ifdef Xorriso_with_aaiP
ret= iso_local_get_acl_text(disk_path, text,
flag & (1 | 16 | 32 | (1 << 15)));
#else
ret= 0;
#endif
Xorriso_process_msg_queues(xorriso,0);
return(ret);
}

@ -420,6 +420,9 @@ int Xorriso_setfattr(struct XorrisO *xorriso, void *in_node, char *path,
size_t num_attrs, char **names,
size_t *value_lengths, char **values, int flag);
int Xorriso_local_getfacl(struct XorrisO *xorriso, char *disk_path,
char **text, int flag);
/* A pseudo file type for El-Torito bootsectors as in man 2 stat :
For now take the highest possible value.

Loading…
Cancel
Save