bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] [GNU tar 1.26] testsuite: 39 failed


From: Paul Eggert
Subject: Re: [Bug-tar] [GNU tar 1.26] testsuite: 39 failed
Date: Thu, 26 Jul 2012 09:27:16 -0700
User-agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120714 Thunderbird/14.0

On 07/26/2012 03:33 AM, Jez Wain wrote:
> On the new server, which produced the erroneous result,
> fcntl.h defines both O_NOFOLLOW and AT_SYMLINK_NOFOLLOW

OK, thanks, but why do you later mention
_XOPEN_SOURCE?  Is that relevant?

It sounds like we need to add a test for this AIX bug,
and then put a workaround into tar.  Let's start with the
test.  Suppose you compile the following test program:

  #include <fcntl.h>

  int
  main (void)
  {
    int flags = O_NOFOLLOW | O_WRONLY | O_CREAT;
    mode_t perms = S_IRUSR | S_IWUSR;
    return openat (AT_FDCWD, "symlink", flags, perms) < 0 ? 0 : 1;
  }

Put this into a.out, and then run these shell commands:

   rm -f file symlink
   touch file
   ln -s file symlink
   truss ./a.out

What does the tail end of the "truss" output say,
starting with the first mention of "symlink"?
On a working system, openat should fail and the
program should exit with status 0.  My guess is
that on AIX openat succeeds, and the program exits
with status 1.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]