[Devel] [PATCH RHEL7 COMMIT] Revert "ms/cred: Reject inodes with invalid ids in set_create_file_as()"

Konstantin Khorenko khorenko at virtuozzo.com
Fri Jul 21 11:00:35 MSK 2017


The commit is pushed to "branch-rh7-3.10.0-514.26.1.vz7.33.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-514.26.1.vz7.33.12
------>
commit a03fc8264b9f9d3417674fb031b4f70be0cff2f8
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date:   Fri Jul 21 11:57:23 2017 +0400

    Revert "ms/cred: Reject inodes with invalid ids in set_create_file_as()"
    
    This reverts commit c8e3c4c433fa08bca9633481085ec888e3c308b1.
    
    Temporary revert due to
    https://jira.sw.ru/browse/PSBM-68599
    
    Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
 kernel/cred.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/cred.c b/kernel/cred.c
index f6bd635..eb7c547 100644
--- a/kernel/cred.c
+++ b/kernel/cred.c
@@ -682,8 +682,6 @@ EXPORT_SYMBOL(set_security_override_from_ctx);
  */
 int set_create_files_as(struct cred *new, struct inode *inode)
 {
-	if (!uid_valid(inode->i_uid) || !gid_valid(inode->i_gid))
-		return -EINVAL;
 	new->fsuid = inode->i_uid;
 	new->fsgid = inode->i_gid;
 	return security_kernel_create_files_as(new, inode);


More information about the Devel mailing list