| To: | xfs@xxxxxxxxxxx |
|---|---|
| Subject: | [PATCH v3 2/4] xfs: initialize inode security on tmpfile creation |
| From: | Brian Foster <bfoster@xxxxxxxxxx> |
| Date: | Tue, 15 Apr 2014 12:18:24 -0400 |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <1397578706-5385-1-git-send-email-bfoster@xxxxxxxxxx> |
| References: | <1397578706-5385-1-git-send-email-bfoster@xxxxxxxxxx> |
Initialize security for inodes allocated via the tmpfile interface. This
ensures security is initialized if the inode is subsequently linked back
into the namespace.
Signed-off-by: Brian Foster <bfoster@xxxxxxxxxx>
---
fs/xfs/xfs_iops.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
index 8fdbc38..2b1d1bd 100644
--- a/fs/xfs/xfs_iops.c
+++ b/fs/xfs/xfs_iops.c
@@ -1063,6 +1063,12 @@ xfs_vn_tmpfile(
inode = VFS_I(ip);
+ error = xfs_init_security(inode, dir, &dentry->d_name);
+ if (unlikely(error)) {
+ iput(inode);
+ return -error;
+ }
+
d_tmpfile(dentry, inode);
return 0;
--
1.8.3.1
|
| Previous by Date: | [PATCH v3 4/4] xfs: fold xfs_create_tmpfile() into xfs_create(), Brian Foster |
|---|---|
| Next by Date: | [PATCH v3 0/4] xfs: tmpfile fixes, Brian Foster |
| Previous by Thread: | Re: [PATCH v3 4/4] xfs: fold xfs_create_tmpfile() into xfs_create(), Christoph Hellwig |
| Next by Thread: | Re: [PATCH v3 2/4] xfs: initialize inode security on tmpfile creation, Christoph Hellwig |
| Indexes: | [Date] [Thread] [Top] [All Lists] |