iconv_open fails when suid bit is on

2012-02-13 Thread Elazar Leibovich
In RHEL 5 system, libc-6, I'm seeing the following strange phenomena $ cat iconv_test.c #include stdio.h #include errno.h #include fcntl.h #include iconv.h void iconv_test() { static int nr = 0; iconv_t iconv = iconv_open(MSCP949,UTF-8); //iconv_t iconv = iconv_open(UTF-16,UTF-8); if

Re: iconv_open fails when suid bit is on

2012-02-13 Thread guy keren
running strace on an suid binary - ignores the 'suid' bit. so the test with strace is not relevant. --guy On 02/13/2012 10:56 AM, Elazar Leibovich wrote: In RHEL 5 system, libc-6, I'm seeing the following strange phenomena $ cat iconv_test.c #include stdio.h #include errno.h #include

Re: iconv_open fails when suid bit is on

2012-02-13 Thread Yedidyah Bar-David
On Mon, Feb 13, 2012 at 11:45:26AM +0200, guy keren wrote: running strace on an suid binary - ignores the 'suid' bit. so the test with strace is not relevant. Indeed, and to strace programs that do this, I do something like that: Open a root shell: # echo $$ let's say it printed 1234, so its

Re: iconv_open fails when suid bit is on

2012-02-13 Thread Oleg Goldshmidt
2) If someone can test this on a RHEL-5 machine, and report if it happens to him too, it could be helpful. FWIW, I see no problems on either RHEL 5.4 or Fedora 15. -- Oleg Goldshmidt | p...@goldshmidt.org o...@goldshmidt.org ___ Linux-il mailing

Re: iconv_open fails when suid bit is on [SOLVED]

2012-02-13 Thread Elazar Leibovich
On Mon, Feb 13, 2012 at 12:22 PM, Yedidyah Bar-David linux...@didi.bardavid.org wrote: Indeed, and to strace programs that do this, I do something like that: Thanks! Worked like a charm. Here's the trouble: [pid 31526] open($ORIGIN/tls/i686/sse2/libKSC.so, O_RDONLY) = -1 ENOENT (No such