glibc/iconv
Avinal Kumar 25258aef78 iconv: Fix iconv functions not following symlinks [BZ #32339]
On some file systems iconv do not follow symlinks.  This happens because
read_conf_file() function's directory traversal loop reject symbolic
links and then lstat64() call do not follow symlinks.

This commit fixes the directory traversal loop to accept symbolic links
and then follow the link using stat64().

The test works by creating a temporary directory and placing a symbolic
link inside it that points to a configuration file.  It then runs
iconvconfig on this directory.

The test passes if iconvconfig successfully follows the symlink and
generates the cache correctly, confirming that the directory traversal
logic now properly handles symbolic links.

Signed-off-by: Avinal Kumar <avinal.xlvii@gmail.com>
Co-authored-by: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Reviewed-by: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
2025-08-05 14:15:33 -03:00
..
Makefile iconv: Fix iconv functions not following symlinks [BZ #32339] 2025-08-05 14:15:33 -03:00
Versions
dummy-repertoire.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
gconv.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
gconv.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
gconv_builtin.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
gconv_builtin.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
gconv_cache.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
gconv_charset.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
gconv_charset.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
gconv_close.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
gconv_conf.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
gconv_db.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
gconv_dl.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
gconv_int.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
gconv_open.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
gconv_parseconfdir.h iconv: Fix iconv functions not following symlinks [BZ #32339] 2025-08-05 14:15:33 -03:00
gconv_simple.c iconv: use bswap_32 instead of __builtin_bswap32 2025-08-05 10:07:18 +02:00
gconv_trans.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
iconv.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
iconv.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
iconv_charmap.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
iconv_close.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
iconv_open.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
iconv_prog.c iconv: iconv -o should not create executable files (bug 33164) 2025-07-17 14:44:10 +02:00
iconv_prog.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
iconvconfig.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
iconvconfig.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
loop.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
skeleton.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
strtab.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
test-gconv-modules Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tst-gconv-init-failure-mod.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tst-gconv-init-failure.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tst-iconv-mt.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tst-iconv-opt.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tst-iconv-sticky-input-error.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tst-iconv1.c
tst-iconv2.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tst-iconv3.c
tst-iconv4.c
tst-iconv5.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tst-iconv6.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tst-iconv7.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tst-iconv8.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tst-iconv9.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tst-iconv_prog-buffer.sh iconv: iconv -o should not create executable files (bug 33164) 2025-07-17 14:44:10 +02:00
tst-iconv_prog.sh Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tst-iconvconfig.sh iconv: Fix iconv functions not following symlinks [BZ #32339] 2025-08-05 14:15:33 -03:00
tst-translit-locale iconv: Fix matching of multi-character transliterations (bug 31859) 2024-08-05 16:49:57 +02:00
tst-translit-mchar.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tst-translit-mchar.sh Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00