Re: ORBit-0.5.7 bug: non-root process can't talk to root process!



Hi Yonghong,

> It is very strange that ORBit-0.5.7 can't communicate with a root
> process and non-root-user process.
> 
> For example, compiling with ORBit-0.5.7, the echo example works well if
> the server and client are run by a same user, but if the server is run
> by root and the client is run by the client, the client can't talk to
> the server.
> 
> But with ORBit-0.5.2, I don't meet such kind of problem.  I think ORBit
> shouldn't provide such kind of security and then there is a bug inside
> ORBit-0.5.7.

See Question 2b) on

   http://orbit-resource.sourceforge.net/faq.html#orbit

> Moreover, I believe there is another bug inside the function:
>         giop_send_buffer_write ()
> at file
>         ORBit/src/IIOP/giop-msg-buffer.c,
> which causts the client hangs if the server is turned down while the
> client is running.  I have reported this bug last week but no response,
> so I post it again (I just want to make sure I have done the right
> thing).
> 
> > From: Michael Rumpf <michael rumpfonline de>
> > To: orbit-list gnome org
> > Subject: Re: question object servers going
> down
> > Date: Wed, 13 Sep 2000 23:31:07 +0200
> >
> > Hi,
> >
> > I just tested this with the "echo-server"
> > and the "echo-client IOR_of_Server
> > 10000" and took the server down while the
> > client was running. The client
> > just hangs without any error message.
> 
> I had the same problem that the client just
> hangs after the server is down.
> 
> gdb says:
> 
> #0  0x40157dd3 in __writev (fd=7,
> vector=0x804e988, count=11) at
> ../sysdeps/unix/sysv/linux/writev.c:50
> #1  0x400202a0 in giop_send_buffer_write ()
> from /usr/lib/libIIOP.so.0
> 
> ...
> 
> And then I was refered to file
>         ORBit-0.5.7/src/IIOP/giop-msg-buffer.c .
> After carefully reading through the function
> giop_send_buffer_write(), I think I found the bug inside that function.
> 
> Function giop_send_buffer_write() calls writev() to send out the
> buffer.  The first argument of writev() is a file descriptor fd.
> Certainly fd
> could be invalid sometime.  For instance, in
> the above echo example the server is down, then there is only one half
> of TCP connection
> termincation and nothing happens at the client.  If such event happens,
> SIGPIPE will be throwed out.  Unfortunately, giop_send_buffer_write()
> doesn't handle such event.

....

>   res = writev(fd, curvec, nvecs);
> 
>   sum = (GIOP_MESSAGE_BUFFER(send_buffer)->message_header.message_size +
> sizeof(GIOPMessageHeader));
> 
>   if(res < sum) {
>     if(res < 0) {
>       if(errno != EAGAIN) {
>         giop_main_handle_connection_exception(cnx);
>         goto out;
>       }
> 
>       res = 0;

This is from the original code. This should actually do, what you want, or am
I missing something? In giop_init SIGPIPE is set to ignore, which means, that
write will set errno to EPIPE, which is != EAGAIN and thus the connection is
marked invalid.

Bye,
Sebastian

-- 
Sebastian Wilhelmi
mailto:wilhelmi ira uka de
http://goethe.ira.uka.de/~wilhelmi




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]