[Python-Dev] PATCH/RFC for AF_NETLINK support

Philippe Biondi phil at secdev.org
Tue Jan 11 09:45:09 CET 2005


On Tue, 11 Jan 2005, [ISO-8859-1] "Martin v. Löwis" wrote:

> Philippe Biondi wrote:
> > I've done a small patch to use linux AF_NETLINK sockets (see below).
> > Please comment!
>
> I have a high-level comment - python-dev is normally the wrong place
> for patches; please submit them to sf.net/projects/python instead.

OK, I'll post it here.

>
> Apart from that, the patch looks fine.

Fine!

>
> > Is there a reason for recvmsg() and sendmsg() not to be implemented
> > yet in socketmodule ?
>
> I'm not sure what you mean by "implemented": these functions are
> implemented by the operating system, not in the socketmodule.
>
> If you ask "why are they not exposed to Python yet?": There has been no
> need to do so, so far. What do I get with recvmsg that I cannot get with
> recv/recvfrom just as well?

You can have access to ancillary messages. You can, for example transmit
credentials or file descriptors through unix sockets, which is very
interesting for privilege separation.


-- 
Philippe Biondi <phil@ secdev.org>      SecDev.org
Security Consultant/R&D                 http://www.secdev.org
PGP KeyID:3D9A43E2  FingerPrint:C40A772533730E39330DC0985EE8FF5F3D9A43E2



More information about the Python-Dev mailing list