public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Anoop Vijayan <acv@linux.vnet.ibm.com>
To: acl-devel@nongnu.org
Cc: xfs@oss.sgi.com
Subject: Re: getfacl gives octal output for Hebrew user/group names
Date: Mon, 22 Jun 2009 13:00:12 +0530	[thread overview]
Message-ID: <4A3F3304.1080901@linux.vnet.ibm.com> (raw)
In-Reply-To: <200906191917.45817.agruen@suse.de>

[-- Attachment #1: Type: text/plain, Size: 1348 bytes --]

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 #2: getfacl-2.2.47.patch.2 --]
[-- Type: application/x-troff-man, Size: 1142 bytes --]

[-- Attachment #3: Type: text/plain, Size: 121 bytes --]

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2009-06-22  7:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-17 13:31 getfacl gives octal output for Hebrew user/group names Anoop Vijayan
2009-06-17 14:18 ` Eric Sandeen
2009-06-19 17:17 ` Andreas Gruenbacher
2009-06-22  7:30   ` Anoop Vijayan [this message]
2009-06-23  9:48     ` [Acl-devel] " Andreas Gruenbacher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A3F3304.1080901@linux.vnet.ibm.com \
    --to=acv@linux.vnet.ibm.com \
    --cc=acl-devel@nongnu.org \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox