Skip to contentSkip to conversation

linux-next: manual merge of the creds tree

DISCUSSION Stephen Rothwell 3 participants 3 messages Oct 31, 2008 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi David,

Today's linux-next merge of the creds tree got a conflict in security/selinux/hooks.c between commit 8b6a5a37f87a414ef8636e36ec75accb27bb7508 ("SELinux: check open perms in dentry_open not inode_permission") from the security-testing tree and commits 7113316bdf8c9f91df7bd68ab739d9bd0f5e8efc ("CRED: Make inode_has_perm() and file_has_perm() take a cred pointer") and a9018998dcc1e3b4401a7f6d2050ffedbd1b64da ("CRED: Inaugurate COW credentials") from the creds tree.

Overlapping changes. I fixed it up (see below) and can carry the fix.

Signature · 29 lines
Cheers,
Stephen Rothwell                    [email protected]
http://www.canb.auug.org.au/~sfr/

diff --cc security/selinux/hooks.c
index b8ad7ec,b90bbe4..0000000
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@@ -2648,8 -2689,8 +2690,8 @@@ static int selinux_inode_permission(str
  		return 0;
  	}
  
- 	return inode_has_perm(current, inode,
+ 	return inode_has_perm(cred, inode,
 -			      open_file_mask_to_av(inode->i_mode, mask), NULL);
 +			      file_mask_to_av(inode->i_mode, mask), NULL);
  }
  
  static int selinux_inode_setattr(struct dentry *dentry, struct iattr *iattr)
@@@ -3165,7 -3223,7 +3224,7 @@@ static int selinux_dentry_open(struct f
  	 * new inode label or new policy.
  	 * This check is not redundant - do not remove.
  	 */
- 	return inode_has_perm(current, inode, open_file_to_av(file), NULL);
 -	return inode_has_perm(cred, inode, file_to_av(file), NULL);
++	return inode_has_perm(cred, inode, open_file_to_av(file), NULL);
  }
  
  /* task security operations */
#1 lore raw
Quoted 4 lines · Stephen Rothwell
(quoted diff) +1 -1
- 	return inode_has_perm(current, inode,
+ 	return inode_has_perm(cred, inode,
 -			      open_file_mask_to_av(inode->i_mode, mask), NULL);
 +			      file_mask_to_av(inode->i_mode, mask), NULL);

...

Review

Quoted 3 lines
(quoted diff) +1 -1
- 	return inode_has_perm(current, inode, open_file_to_av(file), NULL);
 -	return inode_has_perm(cred, inode, file_to_av(file), NULL);
++	return inode_has_perm(cred, inode, open_file_to_av(file), NULL);

ACK.

#2 lore raw
In reply to Stephen Rothwell
Quoted 11 lines · Stephen Rothwell

Hi David,

Today's linux-next merge of the creds tree got a conflict in security/selinux/hooks.c between commit 8b6a5a37f87a414ef8636e36ec75accb27bb7508 ("SELinux: check open perms in dentry_open not inode_permission") from the security-testing tree and commits 7113316bdf8c9f91df7bd68ab739d9bd0f5e8efc ("CRED: Make inode_has_perm() and file_has_perm() take a cred pointer") and a9018998dcc1e3b4401a7f6d2050ffedbd1b64da ("CRED: Inaugurate COW credentials") from the creds tree.

Quoted 1 line

Overlapping changes. I fixed it up (see below) and can carry the fix.

ACK Looks good to me, thanks.