bugacl - Bugs: bug #33195, wish concerning tabular output...

 
 

bug #33195: wish concerning tabular output getfacl

Submitted by:  None
Submitted on:  Sun 01 May 2011 07:45:46 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Works For Me
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 03 May 2011 02:05:25 PM UTC, comment #3:

I really don't see the point of using tabular format for that in the first place. Finding all files which have a uid/gid which doesn't map to a user/group is quite simple using getfacl's "normal" format.

getfacl --recursive <where> \
| awk '
/^# file: / {
file=substr($0, 9)
bad=0
}
/^(default:)?(user|group):[0-9]/ {
if (!bad) {
print file
bad=1
}
}
'

(Perl works just as well for that of course.)

Andreas Gruenbacher <agruen>
Project Administrator
Mon 02 May 2011 02:56:42 PM UTC, comment #2:

I use the tabular output as an input for a perl script which analysis the results to figure out which ACl's are not appropriate because the UID or GID, which are stored in a OpenLDAP directory, are gone. Most likely because accounts or groups are inactivated or deleted. The ACL file is quite big (300Mb).

As far as I have tested (it's a long time ago) the tabular file was the easiest format to parse.

Speed is not the main concern. We checked the ACL file once a year or something like that. Building the ACL file takes an hour or so. Analyzing takes 15 minutes about 15 minutes.

I have not considered join. I don't see the relevance. The problem with the tabular format is: (1) field separator is one or more blanc's,(2) the fields user and group name may contain one or more blanc's, (3) the line length is not fixed which implies that field separation based on columns is impossible.

Anonymous
Mon 02 May 2011 01:12:25 PM UTC, comment #1:

What is the script using the getfacl --tabular output for? The non-tabular output may be more appropriate in your case; if you are going via getfacl, speed probably is not your main concern. Did you consider using join(1)?

Andreas Gruenbacher <agruen>
Project Administrator
Sun 01 May 2011 07:45:46 PM UTC, original submission:

When the group- or username contains a blanc the tabular output of getfacl is hard to analyse in other scripts. This can be solved by using a delimiter, but getfacl does not have that option. Perhaps an idea for the next release?

Example:
getfacl -tR somedir
# file: somdir/profiles/janssent
USER nillessena rwx rwx
GROUP medewerkers rwx rwx
group Domain Admins rwx rwx
mask rwx rwx
other --- rwx

getfacl -tR --delimiter='~' somedir
# file: somedir/profiles/janssent
USER~nillessena~rwx~rwx
GROUP~medewerkers~rwx~rwx
group~Domain Admins~rwx~rwx
mask~rwx~rwx
other~---~rwx

Ruud Baart

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by agruen (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 03 May 2011 02:05:25 PM UTCagruenStatusNone=>Works For Me
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1