diff options
author | James Morris <jmorris@namei.org> | 2009-02-05 19:01:45 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2009-02-05 19:01:45 -0500 |
commit | cb5629b10d64a8006622ce3a52bc887d91057d69 (patch) | |
tree | 7c06d8f30783115e3384721046258ce615b129c5 /fs/autofs | |
parent | 8920d5ad6ba74ae8ab020e90cc4d976980e68701 (diff) | |
parent | f01d1d546abb2f4028b5299092f529eefb01253a (diff) |
Merge branch 'master' into next
Conflicts:
fs/namei.c
Manually merged per:
diff --cc fs/namei.c
index 734f2b5,bbc15c2..0000000
--- a/fs/namei.c
+++ b/fs/namei.c
@@@ -860,9 -848,8 +849,10 @@@ static int __link_path_walk(const char
nd->flags |= LOOKUP_CONTINUE;
err = exec_permission_lite(inode);
if (err == -EAGAIN)
- err = vfs_permission(nd, MAY_EXEC);
+ err = inode_permission(nd->path.dentry->d_inode,
+ MAY_EXEC);
+ if (!err)
+ err = ima_path_check(&nd->path, MAY_EXEC);
if (err)
break;
@@@ -1525,14 -1506,9 +1509,14 @@@ int may_open(struct path *path, int acc
flag &= ~O_TRUNC;
}
- error = vfs_permission(nd, acc_mode);
+ error = inode_permission(inode, acc_mode);
if (error)
return error;
+
- error = ima_path_check(&nd->path,
++ error = ima_path_check(path,
+ acc_mode & (MAY_READ | MAY_WRITE | MAY_EXEC));
+ if (error)
+ return error;
/*
* An append-only file must be opened in append mode for writing.
*/
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'fs/autofs')
-rw-r--r-- | fs/autofs/Kconfig | 21 | ||||
-rw-r--r-- | fs/autofs/inode.c | 2 |
2 files changed, 21 insertions, 2 deletions
diff --git a/fs/autofs/Kconfig b/fs/autofs/Kconfig new file mode 100644 index 000000000000..5f3bea90911e --- /dev/null +++ b/fs/autofs/Kconfig | |||
@@ -0,0 +1,21 @@ | |||
1 | config AUTOFS_FS | ||
2 | tristate "Kernel automounter support" | ||
3 | help | ||
4 | The automounter is a tool to automatically mount remote file systems | ||
5 | on demand. This implementation is partially kernel-based to reduce | ||
6 | overhead in the already-mounted case; this is unlike the BSD | ||
7 | automounter (amd), which is a pure user space daemon. | ||
8 | |||
9 | To use the automounter you need the user-space tools from the autofs | ||
10 | package; you can find the location in <file:Documentation/Changes>. | ||
11 | You also want to answer Y to "NFS file system support", below. | ||
12 | |||
13 | If you want to use the newer version of the automounter with more | ||
14 | features, say N here and say Y to "Kernel automounter v4 support", | ||
15 | below. | ||
16 | |||
17 | To compile this support as a module, choose M here: the module will be | ||
18 | called autofs. | ||
19 | |||
20 | If you are not a part of a fairly large, distributed network, you | ||
21 | probably do not need an automounter, and can say N here. | ||
diff --git a/fs/autofs/inode.c b/fs/autofs/inode.c index c773680d5c60..e1734f2d6e26 100644 --- a/fs/autofs/inode.c +++ b/fs/autofs/inode.c | |||
@@ -251,13 +251,11 @@ struct inode *autofs_iget(struct super_block *sb, unsigned long ino) | |||
251 | inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO; | 251 | inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO; |
252 | inode->i_nlink = 2; | 252 | inode->i_nlink = 2; |
253 | inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; | 253 | inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; |
254 | inode->i_blocks = 0; | ||
255 | 254 | ||
256 | if (ino == AUTOFS_ROOT_INO) { | 255 | if (ino == AUTOFS_ROOT_INO) { |
257 | inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR; | 256 | inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR; |
258 | inode->i_op = &autofs_root_inode_operations; | 257 | inode->i_op = &autofs_root_inode_operations; |
259 | inode->i_fop = &autofs_root_operations; | 258 | inode->i_fop = &autofs_root_operations; |
260 | inode->i_uid = inode->i_gid = 0; /* Changed in read_super */ | ||
261 | goto done; | 259 | goto done; |
262 | } | 260 | } |
263 | 261 | ||