* [PATCH 1/7] ecryptfs: allow lower fs to interpret ATTR_KILL_S*ID
@ 2007-09-17 11:29 Jeff Layton
0 siblings, 0 replies; 3+ messages in thread
From: Jeff Layton @ 2007-09-17 11:29 UTC (permalink / raw)
To: linux-kernel, linux-fsdevel, akpm
Cc: linux-cifs-client, nfs, ecryptfs-devel, reiserfs-devel, unionfs
This patch makes sure ecryptfs doesn't trip the BUG() in notify_change.
It also allows the lower filesystem to interpret ATTR_KILL_S*ID in its
own way.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
fs/ecryptfs/inode.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
index 131954b..dac4199 100644
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -959,6 +959,14 @@ static int ecryptfs_setattr(struct dentry *dentry, struct iattr *ia)
if (rc < 0)
goto out;
}
+
+ /*
+ * mode change is for clearing setuid/setgid bits. Allow lower fs
+ * to interpret this in its own way.
+ */
+ if (ia->ia_valid & (ATTR_KILL_SUID | ATTR_KILL_SGID))
+ ia->ia_valid &= ~ATTR_MODE;
+
rc = notify_change(lower_dentry, ia);
out:
fsstack_copy_attr_all(inode, lower_inode, NULL);
--
1.5.2.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/7] ecryptfs: allow lower fs to interpret ATTR_KILL_S*ID
@ 2007-09-20 9:10 Jeff Layton
0 siblings, 0 replies; 3+ messages in thread
From: Jeff Layton @ 2007-09-20 9:10 UTC (permalink / raw)
To: linux-kernel, linux-fsdevel, akpm
Cc: linux-cifs-client, nfs, ecryptfs-devel, reiserfs-devel, unionfs
Make sure ecryptfs doesn't trip the BUG() in notify_change. This also
allows the lower filesystem to interpret ATTR_KILL_S*ID in its own way.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
fs/ecryptfs/inode.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
index fc4c6cb..23a2fef 100644
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -959,6 +959,14 @@ static int ecryptfs_setattr(struct dentry *dentry, struct iattr *ia)
if (rc < 0)
goto out;
}
+
+ /*
+ * mode change is for clearing setuid/setgid bits. Allow lower fs
+ * to interpret this in its own way.
+ */
+ if (ia->ia_valid & (ATTR_KILL_SUID | ATTR_KILL_SGID))
+ ia->ia_valid &= ~ATTR_MODE;
+
rc = notify_change(lower_dentry, ia);
out:
fsstack_copy_attr_all(inode, lower_inode);
--
1.5.2.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/7] ecryptfs: allow lower fs to interpret ATTR_KILL_S*ID
@ 2007-09-10 14:52 Jeff Layton
0 siblings, 0 replies; 3+ messages in thread
From: Jeff Layton @ 2007-09-10 14:52 UTC (permalink / raw)
To: linux-kernel, linux-fsdevel
Cc: linux-cifs-client, nfs, ecryptfs-devel, reiserfs-devel, unionfs
Make sure ecryptfs doesn't trip the BUG() in notify_change. This also
allows the lower filesystem to interpret these bits in their own way.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
fs/ecryptfs/inode.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
index 131954b..dac4199 100644
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -959,6 +959,14 @@ static int ecryptfs_setattr(struct dentry *dentry, struct iattr *ia)
if (rc < 0)
goto out;
}
+
+ /*
+ * mode change is for clearing setuid/setgid bits. Allow lower fs
+ * to interpret this in its own way.
+ */
+ if (ia->ia_valid & (ATTR_KILL_SUID | ATTR_KILL_SGID))
+ ia->ia_valid &= ~ATTR_MODE;
+
rc = notify_change(lower_dentry, ia);
out:
fsstack_copy_attr_all(inode, lower_inode, NULL);
--
1.5.2.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-09-20 9:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-17 11:29 [PATCH 1/7] ecryptfs: allow lower fs to interpret ATTR_KILL_S*ID Jeff Layton
-- strict thread matches above, loose matches on Subject: below --
2007-09-20 9:10 Jeff Layton
2007-09-10 14:52 Jeff Layton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®