netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the security-testing tree with the net tree
@ 2011-01-07  0:44 Stephen Rothwell
  2011-01-07  1:05 ` Casey Schaufler
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Rothwell @ 2011-01-07  0:44 UTC (permalink / raw)
  To: James Morris
  Cc: linux-next, linux-kernel, David Miller, netdev, Casey Schaufler

Hi James,

Today's linux-next merge of the security-testing tree got a conflict in
security/smack/smack_lsm.c between commit
3610cda53f247e176bcbb7a7cca64bc53b12acdb ("af_unix: Avoid socket->sk NULL
OOPS in stream connect security hooks") from the net tree and commit
b4e0d5f0791bd6dd12a1c1edea0340969c7c1f90 ("Smack: UDS revision") from the
security-testing tree.

I fixed it up (I think - see below) and can carry the fix as necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc security/smack/smack_lsm.c
index ccb71a0,05dc4da..0000000
--- a/security/smack/smack_lsm.c
+++ b/security/smack/smack_lsm.c
@@@ -2415,17 -2534,21 +2534,21 @@@ static int smack_setprocattr(struct tas
   * Return 0 if a subject with the smack of sock could access
   * an object with the smack of other, otherwise an error code
   */
 -static int smack_unix_stream_connect(struct socket *sock,
 -				     struct socket *other, struct sock *newsk)
 +static int smack_unix_stream_connect(struct sock *sock,
 +				     struct sock *other, struct sock *newsk)
  {
- 	struct inode *sp = SOCK_INODE(sock->sk_socket);
- 	struct inode *op = SOCK_INODE(other->sk_socket);
 -	struct socket_smack *ssp = sock->sk->sk_security;
 -	struct socket_smack *osp = other->sk->sk_security;
++	struct socket_smack *ssp = sock->sk_security;
++	struct socket_smack *osp = other->sk_security;
  	struct smk_audit_info ad;
+ 	int rc = 0;
  
  	smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_NET);
 -	smk_ad_setfield_u_net_sk(&ad, other->sk);
 +	smk_ad_setfield_u_net_sk(&ad, other);
- 	return smk_access(smk_of_inode(sp), smk_of_inode(op),
- 				 MAY_READWRITE, &ad);
+ 
+ 	if (!capable(CAP_MAC_OVERRIDE))
+ 		rc = smk_access(ssp->smk_out, osp->smk_in, MAY_WRITE, &ad);
+ 
+ 	return rc;
  }
  
  /**

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: linux-next: manual merge of the security-testing tree with the net tree
  2011-01-07  0:44 linux-next: manual merge of the security-testing tree with the net tree Stephen Rothwell
@ 2011-01-07  1:05 ` Casey Schaufler
  2011-01-09 22:48   ` James Morris
  0 siblings, 1 reply; 3+ messages in thread
From: Casey Schaufler @ 2011-01-07  1:05 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: James Morris, linux-next, linux-kernel, David Miller, netdev,
	Casey Schaufler

On 1/6/2011 4:44 PM, Stephen Rothwell wrote:
> Hi James,
>
> Today's linux-next merge of the security-testing tree got a conflict in
> security/smack/smack_lsm.c between commit
> 3610cda53f247e176bcbb7a7cca64bc53b12acdb ("af_unix: Avoid socket->sk NULL
> OOPS in stream connect security hooks") from the net tree and commit
> b4e0d5f0791bd6dd12a1c1edea0340969c7c1f90 ("Smack: UDS revision") from the
> security-testing tree.
>
> I fixed it up (I think - see below) and can carry the fix as necessary.

The change looks like it addresses the change in interface. Thank you.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: linux-next: manual merge of the security-testing tree with the net tree
  2011-01-07  1:05 ` Casey Schaufler
@ 2011-01-09 22:48   ` James Morris
  0 siblings, 0 replies; 3+ messages in thread
From: James Morris @ 2011-01-09 22:48 UTC (permalink / raw)
  To: Casey Schaufler
  Cc: Stephen Rothwell, linux-next, linux-kernel, David Miller, netdev

On Thu, 6 Jan 2011, Casey Schaufler wrote:

> On 1/6/2011 4:44 PM, Stephen Rothwell wrote:
> > Hi James,
> >
> > Today's linux-next merge of the security-testing tree got a conflict in
> > security/smack/smack_lsm.c between commit
> > 3610cda53f247e176bcbb7a7cca64bc53b12acdb ("af_unix: Avoid socket->sk NULL
> > OOPS in stream connect security hooks") from the net tree and commit
> > b4e0d5f0791bd6dd12a1c1edea0340969c7c1f90 ("Smack: UDS revision") from the
> > security-testing tree.
> >
> > I fixed it up (I think - see below) and can carry the fix as necessary.
> 
> The change looks like it addresses the change in interface. Thank you.

Thanks, applied.


-- 
James Morris
<jmorris@namei.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-01-09 22:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-07  0:44 linux-next: manual merge of the security-testing tree with the net tree Stephen Rothwell
2011-01-07  1:05 ` Casey Schaufler
2011-01-09 22:48   ` James Morris

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).