Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23526
b: refs/heads/master
c: b500531
h: refs/heads/master
v: v3
  • Loading branch information
Oleg Drokin authored and Linus Torvalds committed Mar 25, 2006
1 parent ad4b3e0 commit e5f94b1
Show file tree
Hide file tree
Showing 3 changed files with 8 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: 619d5d8a2b3f800ea3a0301a58ede570684956b0
refs/heads/master: b500531e6f5f234ed267bd7060ee06d144faf0ca
4 changes: 2 additions & 2 deletions trunk/fs/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ asmlinkage long sys_uselib(const char __user * library)
struct nameidata nd;
int error;

error = __user_path_lookup_open(library, LOOKUP_FOLLOW, &nd, FMODE_READ);
error = __user_path_lookup_open(library, LOOKUP_FOLLOW, &nd, FMODE_READ|FMODE_EXEC);
if (error)
goto out;

Expand Down Expand Up @@ -477,7 +477,7 @@ struct file *open_exec(const char *name)
int err;
struct file *file;

err = path_lookup_open(AT_FDCWD, name, LOOKUP_FOLLOW, &nd, FMODE_READ);
err = path_lookup_open(AT_FDCWD, name, LOOKUP_FOLLOW, &nd, FMODE_READ|FMODE_EXEC);
file = ERR_PTR(err);

if (!err) {
Expand Down
5 changes: 5 additions & 0 deletions trunk/include/linux/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ extern int dir_notify_enable;
#define FMODE_PREAD 8
#define FMODE_PWRITE FMODE_PREAD /* These go hand in hand */

/* File is being opened for execution. Primary users of this flag are
distributed filesystems that can use it to achieve correct ETXTBUSY
behavior for cross-node execution/opening_for_writing of files */
#define FMODE_EXEC 16

#define RW_MASK 1
#define RWA_MASK 2
#define READ 0
Expand Down

0 comments on commit e5f94b1

Please sign in to comment.