git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] Fix testcase failure when extended attributes are in use

From
Deskin Miller <deskinm@umich.edu>
Date
Oct 19, 2008, 12:24 UTC
Message-ID
<20081019122419.GA2015@riemann.deskinm.fdns.net>
In-Reply-To
<7vbpxig4fb.fsf@gitster.siamese.dyndns.org>
On Fri, Oct 17, 2008 at 04:58:16PM -0700, Junio C Hamano wrote:
> With 8ed0a74 (t1301-shared-repo.sh: don't let a default ACL interfere with
> the test, 2008-10-16) applied is this still needed, or can I drop it from
> my review box?
Apologies for a tardy response, was out of town and away from keyboard for a
day.
 
This patch is still needed, as my and Matt's patch are solving two different
issues with t1301.  As he pointed out in the thread regarding his patch, the
issue was that the testcase was intended to specifically test Git's interaction
with permissions set via the umask, but a default ACL on the 'trash directory'
could interfere with this, since they'd override the umask settings.  Remove
the ACL, no problem.

My patch, on the other hand, is to deal with 'ls' output in case a file has certain filesystem extended attributes. These could be e.g. POSIX ACLs, or a SELinux security context, or perhaps others. If such an extended attribute is present, 'ls -l' will print permissions with a '+' appended, e.g. -rw-r--r--+ Instead of -rw-r--r-- However, t1301 reads permissions output by ls for several tests, and compares them to string representations such as that above. Without removing the '+', if present, the strings will not match. Furthermore, since this occurs for other filesystem extended attributes, and not just ACLs, it is not possible to simply strip all extended attributes from the file in question (with SELinux, the kernel won't let you remove a file's security context anyway).

For what it's worth, I've experienced this failure on my Ubuntu 8.04 laptop with SELinux permissive mode, so it's possible ls behaves slightly differently on other systems; I've not been able to determine this one way or another. However, I see no harm in accounting for this situation in the general case, since the typical output of ls on other systems will not be affected nor modified with this patch.

Hope that helps, Deskin Miller

Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 7 in “Fix testcase failure when extended attributes are in use”
  1. Fix testcase failure when extended attributes are in useDeskin Miller, Oct 11, 2008
  2. Fix testcase failure when extended attributes are in useDeskin Miller, Oct 14, 2008
  3. Junio C HamanoOct 17, 2008
  4. Deskin MillerOct 19, 2008
  5. Junio C HamanoOct 19, 2008
  6. Deskin MillerOct 19, 2008
  7. Junio C HamanoOct 20, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.