[Devel] [PATCH RHEL7 COMMIT] Revert "ms/fs: Check for invalid i_uid in may_follow_link()"

Konstantin Khorenko khorenko at virtuozzo.com
Fri Jul 21 11:00:36 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 1fcc6e2d3620284c7ffc71777bc929dd04e7678c
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date:   Fri Jul 21 11:57:26 2017 +0400

    Revert "ms/fs: Check for invalid i_uid in may_follow_link()"
    
    This reverts commit fdbfb1c0a4a553def2a3103e9500e842d3cd8072.
    
    Temporary revert due to
    https://jira.sw.ru/browse/PSBM-68599
    
    Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
 fs/namei.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/fs/namei.c b/fs/namei.c
index 1ee459f..ede7535 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -803,7 +803,6 @@ static inline int may_follow_link(struct path *link, struct nameidata *nd)
 {
 	const struct inode *inode;
 	const struct inode *parent;
-	kuid_t puid;
 
 	if (!sysctl_protected_symlinks)
 		return 0;
@@ -819,8 +818,7 @@ static inline int may_follow_link(struct path *link, struct nameidata *nd)
 		return 0;
 
 	/* Allowed if parent directory and link owner match. */
-	puid = parent->i_uid;
-	if (uid_valid(puid) && uid_eq(puid, inode->i_uid))
+	if (uid_eq(parent->i_uid, inode->i_uid))
 		return 0;
 
 	audit_log_link_denied("follow_link", link);


More information about the Devel mailing list