[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: test-openat-safer failure on older kernel
From: |
Eric Blake |
Subject: |
Re: test-openat-safer failure on older kernel |
Date: |
Sat, 05 Sep 2009 10:28:38 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Jim Meyering on 9/5/2009 9:29 AM:
>> an empty argument to openat, which is why my test-openat-safer was the
>> first thing to catch this in nearly 3 years of use.
>> + openat: fail with ENOENT on empty name
>> + * lib/openat-proc.c (openat_proc_name): Special-case the empty
>> + buffer.
>
> Good catch. Thanks.
Ouch. glibc has the same bug. We may need to provide *at wrappers
unconditionally on Linux, if anyone is running against an older kernel but
newer glibc that uses the /proc/self/fd fallbacks without needing the
current state of the gnulib wrappers. Are there still systems in the wild
like that?
http://sources.redhat.com/bugzilla/show_bug.cgi?id=10609
Oh, and POSIX has a bug - it says that readlinkat returns 0 instead of the
symlink size on success. The Linux man pages copied the POSIX text, but
implemented things correctly (ie. whether readlink is a call to
readlinkat(AT_FDCWD), or readlinkat is a call to
readlink("/proc/self/fd/n/name"), the return value should be the same).
https://www.opengroup.org/sophocles/show_mail.tpl?CALLER=index.tpl&source=L&listname=austin-group-l&id=12734
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkqikbYACgkQ84KuGfSFAYCcoACfSkESp2E8HdhpVIxp+RtMcGvI
1LgAn2HLCdlVxm6AWVZ8HxiMfYhkKViN
=HCjL
-----END PGP SIGNATURE-----