summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0009-eCryptfs-Copy-up-lower-inode-attrs-after-setting-low.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0009-eCryptfs-Copy-up-lower-inode-attrs-after-setting-low.patch')
-rw-r--r--recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0009-eCryptfs-Copy-up-lower-inode-attrs-after-setting-low.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0009-eCryptfs-Copy-up-lower-inode-attrs-after-setting-low.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0009-eCryptfs-Copy-up-lower-inode-attrs-after-setting-low.patch
new file mode 100644
index 00000000..fc0e8152
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.9/0009-eCryptfs-Copy-up-lower-inode-attrs-after-setting-low.patch
@@ -0,0 +1,43 @@
1From 6b6cd603f9bde174d9cf18060264204587d4a9fb Mon Sep 17 00:00:00 2001
2From: Tyler Hicks <tyhicks@canonical.com>
3Date: Tue, 7 Feb 2012 17:55:40 -0600
4Subject: [PATCH 09/73] eCryptfs: Copy up lower inode attrs after setting
5 lower xattr
6
7commit 545d680938be1e86a6c5250701ce9abaf360c495 upstream.
8
9After passing through a ->setxattr() call, eCryptfs needs to copy the
10inode attributes from the lower inode to the eCryptfs inode, as they
11may have changed in the lower filesystem's ->setxattr() path.
12
13One example is if an extended attribute containing a POSIX Access
14Control List is being set. The new ACL may cause the lower filesystem to
15modify the mode of the lower inode and the eCryptfs inode would need to
16be updated to reflect the new mode.
17
18https://launchpad.net/bugs/926292
19
20Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
21Reported-by: Sebastien Bacher <seb128@ubuntu.com>
22Cc: John Johansen <john.johansen@canonical.com>
23Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
24---
25 fs/ecryptfs/inode.c | 2 ++
26 1 files changed, 2 insertions(+), 0 deletions(-)
27
28diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
29index d2039ca..af11098 100644
30--- a/fs/ecryptfs/inode.c
31+++ b/fs/ecryptfs/inode.c
32@@ -1104,6 +1104,8 @@ ecryptfs_setxattr(struct dentry *dentry, const char *name, const void *value,
33 }
34
35 rc = vfs_setxattr(lower_dentry, name, value, size, flags);
36+ if (!rc)
37+ fsstack_copy_attr_all(dentry->d_inode, lower_dentry->d_inode);
38 out:
39 return rc;
40 }
41--
421.7.7.4
43