From: Casey Schaufler <casey@schaufler-ca.com>
To: Julia Lawall <julia@diku.dk>
Cc: James Morris <jmorris@namei.org>,
linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 2/2] security/smack: Use AF_INET for sin_family field
Date: Wed, 05 Aug 2009 12:38:23 -0700 [thread overview]
Message-ID: <4A79DFAF.2010605@schaufler-ca.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0908051434340.20453@pc-004.diku.dk>
Julia Lawall wrote:
> From: Julia Lawall <julia@diku.dk>
>
> Elsewhere the sin_family field holds a value with a name of the form
> AF_..., so it seems reasonable to do so here as well. Also the values of
> PF_INET and AF_INET are the same.
>
> The semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> struct sockaddr_in sip;
> @@
>
> (
> sip.sin_family ==
> - PF_INET
> + AF_INET
> |
> sip.sin_family !=
> - PF_INET
> + AF_INET
> |
> sip.sin_family =
> - PF_INET
> + AF_INET
> )
> // </smpl>
>
> Signed-off-by: Julia Lawall <julia@diku.dk>
>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Yes, this is a correction. Thank you.
> ---
> security/smack/smack_lsm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff -u -p a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
> --- a/security/smack/smack_lsm.c
> +++ b/security/smack/smack_lsm.c
> @@ -2464,7 +2464,7 @@ static int smack_socket_sendmsg(struct s
> /*
> * Perfectly reasonable for this to be NULL
> */
> - if (sip == NULL || sip->sin_family != PF_INET)
> + if (sip == NULL || sip->sin_family != AF_INET)
> return 0;
>
> return smack_netlabel_send(sock->sk, sip);
> --
> To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
>
next prev parent reply other threads:[~2009-08-05 19:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-05 12:34 [PATCH 2/2] security/smack: Use AF_INET for sin_family field Julia Lawall
2009-08-05 19:38 ` Casey Schaufler [this message]
2009-08-05 22:47 ` James Morris
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=4A79DFAF.2010605@schaufler-ca.com \
--to=casey@schaufler-ca.com \
--cc=jmorris@namei.org \
--cc=julia@diku.dk \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@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