[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: KSocket connections
From:       Thiago Macieira <thiago.macieira () poli ! usp ! br>
Date:       2001-04-27 0:28:51
[Download RAW message or body]

Adriaan de Groot wrote:
> Since when does KSocket try /tmp/portnumber as an alternative when
> localhost:portnumber fails?

Since we (I, actually) made it use getaddrinfo. Since getaddrinfo is 
supposed to work for any kinds of sockets, when it encounters a 
localhost situation, it will also try Unix sockets. In systems that it 
doesn't, our wrapper function will do that.

I have given that a lot of thought from the security point of view. I 
have come to the conclusion that, if security is an issue, you should 
be using finer control over your socket anyways, so KSocket wouldn't be 
in use (use KExtendedSocket).

And note that only happens in localhost situations. You'll never get a 
Unix socket when trying to browse a remote web page.

> Not that that is a real problem, I was just very surprised to see
> this in the debug output from one of KPilot's conduits (who try to
> connect to the KPilot daemon on port 10159).

One of my planned tasks is to add more stuff to KSocket to allow the 
programmer to access interesting stuff from KExtendedSocket without 
having to use KExtendedSocket directly. Namely, I want to add 
string-based services/ports, as opposed to numeric only, and flags. 
That way, you can always pass down an KExtendedSocket::inetSocket 
option to make it never use the Unix socket.

-- 
  Thiago Macieira - UFOT Registry number: 1001
 thiagom@mail.com talha@geocities.com
   ICQ UIN: 1967141  PGP: 0x8F2978D5 and 0xEA9037A5 (PGP 2.x)
     Registered Linux user #65028

13/392. You broke your little ships. -- Lily Sloane, Star Trek: First 
Contact
 
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic