Thread (14 messages) 14 messages, 4 authors, 2005-11-23

Re: netlink nlmsg_pid supposed to be pid or tid?

flat view

From: Alexey Kuznetsov <hidden>
Date: 2005-11-21 22:49:38
Also in: lkml

Hello!
TIPC wants the user to fill in the pid to use in the nlmsghdr portion of 
a particular message.
It is wrong. netlink_pid used not to be associated with process pids.
Kernel used pid just as a seed to calculate a random value to bind,
when user did not bind explicitly. It is equal to current->pid occasionally.
F.e. libnetlink from iproute autobinds and gets netlink_pid with
getsockname().

When user binds the socket himself, he was free to bind to any value,
including pid and tgid.

Actually, I remember one discussion. Herbert, wait a minute...
That's it: February 2005, Subject: [PATCH] Add audit uid to netlink credentials
We decided (or not?) that binding to anything but tgid and pid
must be prohibited by security reasons. Apaprently, the finding was lost.

Alexey
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help