* io/ftw.c (process_entry): If dir->streamfd != -1,
use FXSTATAT rather than LXSTAT to find if unstatable file is a dead symlink.
This commit is contained in:
parent
70c50602cc
commit
bb54908866
|
@ -1,4 +1,8 @@
|
||||||
006-03-02 Jakub Jelinek <jakub@redhat.com>
|
2006-03-02 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* io/ftw.c (process_entry): If dir->streamfd != -1,
|
||||||
|
use FXSTATAT rather than LXSTAT to find if unstatable
|
||||||
|
file is a dead symlink.
|
||||||
|
|
||||||
* elf/check-textrel.c: Include config.h.
|
* elf/check-textrel.c: Include config.h.
|
||||||
(AB(handle_file)): Don't fail if PF_X | PF_W on architectures known
|
(AB(handle_file)): Don't fail if PF_X | PF_W on architectures known
|
||||||
|
|
17
io/ftw.c
17
io/ftw.c
|
@ -419,14 +419,23 @@ process_entry (struct ftw_data *data, struct dir_data *dir, const char *name,
|
||||||
{
|
{
|
||||||
if (errno != EACCES && errno != ENOENT)
|
if (errno != EACCES && errno != ENOENT)
|
||||||
result = -1;
|
result = -1;
|
||||||
else if (!(data->flags & FTW_PHYS)
|
else if (data->flags & FTW_PHYS)
|
||||||
&& (d_type == DT_LNK
|
flag = FTW_NS;
|
||||||
|| (LXSTAT (_STAT_VER, name, &st) == 0
|
else if (d_type == DT_LNK)
|
||||||
&& S_ISLNK (st.st_mode))))
|
flag = FTW_SLN;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (dir->streamfd != -1)
|
||||||
|
statres = FXSTATAT (_STAT_VER, dir->streamfd, name, &st,
|
||||||
|
AT_SYMLINK_NOFOLLOW);
|
||||||
|
else
|
||||||
|
statres = LXSTAT (_STAT_VER, name, &st);
|
||||||
|
if (statres == 0 && S_ISLNK (st.st_mode))
|
||||||
flag = FTW_SLN;
|
flag = FTW_SLN;
|
||||||
else
|
else
|
||||||
flag = FTW_NS;
|
flag = FTW_NS;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (S_ISDIR (st.st_mode))
|
if (S_ISDIR (st.st_mode))
|
||||||
|
|
Loading…
Reference in New Issue