Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29803
b: refs/heads/master
c: 45c9b11
h: refs/heads/master
i:
  29801: effef18
  29799: 49bdde7
v: v3
  • Loading branch information
Ulrich Drepper authored and Linus Torvalds committed Jun 25, 2006
1 parent 95950d2 commit 2ae6d09
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 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: 584e1236bbcdfec3f64c751908b8b4fe868c2d20
refs/heads/master: 45c9b11a1d07770cabb48cb0f7960a77650ffc64
6 changes: 4 additions & 2 deletions trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -2243,14 +2243,16 @@ asmlinkage long sys_linkat(int olddfd, const char __user *oldname,
int error;
char * to;

if (flags != 0)
if ((flags & ~AT_SYMLINK_FOLLOW) != 0)
return -EINVAL;

to = getname(newname);
if (IS_ERR(to))
return PTR_ERR(to);

error = __user_walk_fd(olddfd, oldname, 0, &old_nd);
error = __user_walk_fd(olddfd, oldname,
flags & AT_SYMLINK_FOLLOW ? LOOKUP_FOLLOW : 0,
&old_nd);
if (error)
goto exit;
error = do_path_lookup(newdfd, to, LOOKUP_PARENT, &nd);
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/fcntl.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#define AT_SYMLINK_NOFOLLOW 0x100 /* Do not follow symbolic links. */
#define AT_REMOVEDIR 0x200 /* Remove directory instead of
unlinking file. */
#define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */

#ifdef __KERNEL__

Expand Down

0 comments on commit 2ae6d09

Please sign in to comment.