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 #include #include #include 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 (iconv == (iconv_t)-1) {

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 #include #include #include void

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

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 ___ Linux-il mailing list Linux-il@cs.

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 su