inode.c (c7c7a1a18af4c3bb7749d33e3df3acdf0a95bbb5) | inode.c (0d56a4518d5eaf595a24ab2202e171330bb2ed72) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/** 3 * eCryptfs: Linux filesystem encryption layer 4 * 5 * Copyright (C) 1997-2004 Erez Zadok 6 * Copyright (C) 2001-2004 Stony Brook University 7 * Copyright (C) 2004-2007 International Business Machines Corp. 8 * Author(s): Michael A. Halcrow <mahalcro@us.ibm.com> --- 963 unchanged lines hidden (view full) --- 972 u32 request_mask, unsigned int flags) 973{ 974 struct dentry *dentry = path->dentry; 975 struct ecryptfs_mount_crypt_stat *mount_crypt_stat; 976 int rc = 0; 977 978 mount_crypt_stat = &ecryptfs_superblock_to_private( 979 dentry->d_sb)->mount_crypt_stat; | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/** 3 * eCryptfs: Linux filesystem encryption layer 4 * 5 * Copyright (C) 1997-2004 Erez Zadok 6 * Copyright (C) 2001-2004 Stony Brook University 7 * Copyright (C) 2004-2007 International Business Machines Corp. 8 * Author(s): Michael A. Halcrow <mahalcro@us.ibm.com> --- 963 unchanged lines hidden (view full) --- 972 u32 request_mask, unsigned int flags) 973{ 974 struct dentry *dentry = path->dentry; 975 struct ecryptfs_mount_crypt_stat *mount_crypt_stat; 976 int rc = 0; 977 978 mount_crypt_stat = &ecryptfs_superblock_to_private( 979 dentry->d_sb)->mount_crypt_stat; |
980 generic_fillattr(d_inode(dentry), stat); | 980 generic_fillattr(&init_user_ns, d_inode(dentry), stat); |
981 if (mount_crypt_stat->flags & ECRYPTFS_GLOBAL_ENCRYPT_FILENAMES) { 982 char *target; 983 size_t targetsiz; 984 985 target = ecryptfs_readlink_lower(dentry, &targetsiz); 986 if (!IS_ERR(target)) { 987 kfree(target); 988 stat->size = targetsiz; --- 11 unchanged lines hidden (view full) --- 1000 struct kstat lower_stat; 1001 int rc; 1002 1003 rc = vfs_getattr(ecryptfs_dentry_to_lower_path(dentry), &lower_stat, 1004 request_mask, flags); 1005 if (!rc) { 1006 fsstack_copy_attr_all(d_inode(dentry), 1007 ecryptfs_inode_to_lower(d_inode(dentry))); | 981 if (mount_crypt_stat->flags & ECRYPTFS_GLOBAL_ENCRYPT_FILENAMES) { 982 char *target; 983 size_t targetsiz; 984 985 target = ecryptfs_readlink_lower(dentry, &targetsiz); 986 if (!IS_ERR(target)) { 987 kfree(target); 988 stat->size = targetsiz; --- 11 unchanged lines hidden (view full) --- 1000 struct kstat lower_stat; 1001 int rc; 1002 1003 rc = vfs_getattr(ecryptfs_dentry_to_lower_path(dentry), &lower_stat, 1004 request_mask, flags); 1005 if (!rc) { 1006 fsstack_copy_attr_all(d_inode(dentry), 1007 ecryptfs_inode_to_lower(d_inode(dentry))); |
1008 generic_fillattr(d_inode(dentry), stat); | 1008 generic_fillattr(&init_user_ns, d_inode(dentry), stat); |
1009 stat->blocks = lower_stat.blocks; 1010 } 1011 return rc; 1012} 1013 1014int 1015ecryptfs_setxattr(struct dentry *dentry, struct inode *inode, 1016 const char *name, const void *value, --- 143 unchanged lines hidden --- | 1009 stat->blocks = lower_stat.blocks; 1010 } 1011 return rc; 1012} 1013 1014int 1015ecryptfs_setxattr(struct dentry *dentry, struct inode *inode, 1016 const char *name, const void *value, --- 143 unchanged lines hidden --- |