[<prev] [next>] [day] [month] [year] [list]
Message-ID: <AANLkTikP3uqAhULgHp-K871wZq5RQoZVLOCiySj35ZkC@mail.gmail.com>
Date: Tue, 30 Nov 2010 12:13:14 +0200
From: Laszlo Papp <djszapi@...hlinux.us>
To: netdev@...r.kernel.org
Subject: Get the credentials from the socket peer file struct
Hi,
How can I get the socket peer file struct ?
I would like to implement a new ioctl in my kernelspace code (similar
to SO_PEERCRED), but to get all the credentials.
The file struct of the socket struct has a cred struct members, but
that is for the local file struct, not from the peer file struct.
I tried to grok the documentation, but I do not entirely understand
the 'struct sock' internals.
(http://lxr.free-electrons.com/source/include/net/sock.h?v=2.6.32;a=arm#L144)
SO_PEERCRED just picks 'sk_peercred' struct ucred structure up from
there, but I need a more fine-tuned const struct cred structure in
this special case.
I am not subscrobed for the list, so please add me into the 'CC'
field. Thank you in advance!
Best Regards,
Laszlo Papp
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists