From: Kenan Kalajdzic <kenan@unix.ba>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] socket: Merge getsockname and getpeername into a single function
Date: Tue, 9 Mar 2010 16:30:19 +0100 [thread overview]
Message-ID: <e0929ea61003090730p23aae935q1f34030df8cc527e@mail.gmail.com> (raw)
In-Reply-To: <20100308.122413.158901144.davem@davemloft.net>
On Mon, Mar 8, 2010 at 9:24 PM, David Miller <davem@davemloft.net> wrote:
>
> Since you still have to conditionalize things like the security
> calls, this doesn't look any cleaner to me than what we have
> there already.
You are absolutely right about this - the condition around security
calls ruins the whole refactoring attempt. It could easily go away if
we were ready to make minor changes to the security code. It is
because getting the local socket info and getting the peer socket info
are essentially the same type of operation. Therefore, both
security_socket_getsockname() and security_socket_getpeername()
eventually evaluate to a call to socket_has_perm() with
SOCKET__GETATTR. The question remains whether it is worth breaking
the cleanness of the security hooks code to get rid of the condition
in 'our' two functions?
--
Kenan
prev parent reply other threads:[~2010-03-09 15:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-04 3:26 [PATCH] socket: Merge getsockname and getpeername into a single function Kenan Kalajdzic
2010-03-08 20:24 ` David Miller
2010-03-09 15:30 ` Kenan Kalajdzic [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e0929ea61003090730p23aae935q1f34030df8cc527e@mail.gmail.com \
--to=kenan@unix.ba \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).