Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 327218
b: refs/heads/master
c: 81abe27
h: refs/heads/master
v: v3
  • Loading branch information
Eric W. Biederman committed Aug 4, 2012
1 parent 443c663 commit b759b5f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d755586052e3f3020f7ed25a83945ecd38a5613a
refs/heads/master: 81abe27b10af98f861c955be63da700938dd59c1
6 changes: 3 additions & 3 deletions trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ static inline int may_follow_link(struct path *link, struct nameidata *nd)

/* Allowed if owner and follower match. */
inode = link->dentry->d_inode;
if (current_cred()->fsuid == inode->i_uid)
if (uid_eq(current_cred()->fsuid, inode->i_uid))
return 0;

/* Allowed if parent directory not sticky and world-writable. */
Expand All @@ -687,7 +687,7 @@ static inline int may_follow_link(struct path *link, struct nameidata *nd)
return 0;

/* Allowed if parent directory and link owner match. */
if (parent->i_uid == inode->i_uid)
if (uid_eq(parent->i_uid, inode->i_uid))
return 0;

path_put_conditional(link, nd);
Expand Down Expand Up @@ -757,7 +757,7 @@ static int may_linkat(struct path *link)
/* Source inode owner (or CAP_FOWNER) can hardlink all they like,
* otherwise, it must be a safe source.
*/
if (cred->fsuid == inode->i_uid || safe_hardlink_source(inode) ||
if (uid_eq(cred->fsuid, inode->i_uid) || safe_hardlink_source(inode) ||
capable(CAP_FOWNER))
return 0;

Expand Down

0 comments on commit b759b5f

Please sign in to comment.