xfs
[Top] [All Lists]

Re: getfacl gives octal output for Hebrew user/group names

To: acl-devel@xxxxxxxxxx
Subject: Re: getfacl gives octal output for Hebrew user/group names
From: Anoop Vijayan <acv@xxxxxxxxxxxxxxxxxx>
Date: Mon, 22 Jun 2009 13:00:12 +0530
Cc: xfs@xxxxxxxxxxx
In-reply-to: <200906191917.45817.agruen@xxxxxxx>
References: <4A38F04C.9090909@xxxxxxxxxxxxxxxxxx> <200906191917.45817.agruen@xxxxxxx>
User-agent: Thunderbird 2.0.0.21 (X11/20090320)
Andreas,
Removing the checks isprint(*s) and *s == '\\' resolves the issue.
AD shares are associated with a doamin name and AD users/groups will be in
the format Dom\user. Can someone explain why these checks are required?

The '\\' check is required so that backslashes will go through unquote(quote(string)) will come out correctly.

The isprint() check is a misguided attempt to do something reasonable with unprintable characters, but it leads to lots of problems with different encodings, so it should probably be removed. I'll fix that.

There also is a check for '=' in quote(). This is from the attr package which separates names and values with '=', but unnecessary in acl. quote() should probably be passed in a string of additional characters that need to be quoted so that it does the right thing in both packages.

The do_print() in getfacl/getfacl.c calls

printf("# owner: %s\n", xquote(user_name(st->st_uid, opt_numeric)));
printf("# group: %s\n", xquote(group_name(st->st_gid, opt_numeric)));

and xquote simply calls quote().

Also, acl_entry_to_any_str() in libacl/__acl_to_any_text.c calls quote.
I could not find the corresponding unquote calls for these.

If I wrap the above quote() calls with unquote(), the problem seems to be 
resolved.
Attaching a patch for the same.

Cheers!
Anoop

Attachment: getfacl-2.2.47.patch.2
Description: Unix manual page

<Prev in Thread] Current Thread [Next in Thread>