inode.c (e219aafe50fd546b8686582ddbafd24c3c2eda04) | inode.c (fceef393a538134f03b778c5d2519e670269342f) |
---|---|
1/** 2 * eCryptfs: Linux filesystem encryption layer 3 * 4 * Copyright (C) 1997-2004 Erez Zadok 5 * Copyright (C) 2001-2004 Stony Brook University 6 * Copyright (C) 2004-2007 International Business Machines Corp. 7 * Author(s): Michael A. Halcrow <mahalcro@us.ibm.com> 8 * Michael C. Thompsion <mcthomps@us.ibm.com> --- 660 unchanged lines hidden (view full) --- 669 goto out; 670 rc = ecryptfs_decode_and_decrypt_filename(&buf, bufsiz, dentry->d_sb, 671 lower_buf, rc); 672out: 673 kfree(lower_buf); 674 return rc ? ERR_PTR(rc) : buf; 675} 676 | 1/** 2 * eCryptfs: Linux filesystem encryption layer 3 * 4 * Copyright (C) 1997-2004 Erez Zadok 5 * Copyright (C) 2001-2004 Stony Brook University 6 * Copyright (C) 2004-2007 International Business Machines Corp. 7 * Author(s): Michael A. Halcrow <mahalcro@us.ibm.com> 8 * Michael C. Thompsion <mcthomps@us.ibm.com> --- 660 unchanged lines hidden (view full) --- 669 goto out; 670 rc = ecryptfs_decode_and_decrypt_filename(&buf, bufsiz, dentry->d_sb, 671 lower_buf, rc); 672out: 673 kfree(lower_buf); 674 return rc ? ERR_PTR(rc) : buf; 675} 676 |
677static const char *ecryptfs_follow_link(struct dentry *dentry, void **cookie) | 677static const char *ecryptfs_get_link(struct dentry *dentry, 678 struct inode *inode, 679 struct delayed_call *done) |
678{ 679 size_t len; | 680{ 681 size_t len; |
680 char *buf = ecryptfs_readlink_lower(dentry, &len); | 682 char *buf; 683 684 if (!dentry) 685 return ERR_PTR(-ECHILD); 686 687 buf = ecryptfs_readlink_lower(dentry, &len); |
681 if (IS_ERR(buf)) 682 return buf; 683 fsstack_copy_attr_atime(d_inode(dentry), 684 d_inode(ecryptfs_dentry_to_lower(dentry))); 685 buf[len] = '\0'; | 688 if (IS_ERR(buf)) 689 return buf; 690 fsstack_copy_attr_atime(d_inode(dentry), 691 d_inode(ecryptfs_dentry_to_lower(dentry))); 692 buf[len] = '\0'; |
686 return *cookie = buf; | 693 set_delayed_call(done, kfree_link, buf); 694 return buf; |
687} 688 689/** 690 * upper_size_to_lower_size 691 * @crypt_stat: Crypt_stat associated with file 692 * @upper_size: Size of the upper file 693 * 694 * Calculate the required size of the lower file based on the --- 395 unchanged lines hidden (view full) --- 1090 rc = d_inode(lower_dentry)->i_op->removexattr(lower_dentry, name); 1091 mutex_unlock(&d_inode(lower_dentry)->i_mutex); 1092out: 1093 return rc; 1094} 1095 1096const struct inode_operations ecryptfs_symlink_iops = { 1097 .readlink = generic_readlink, | 695} 696 697/** 698 * upper_size_to_lower_size 699 * @crypt_stat: Crypt_stat associated with file 700 * @upper_size: Size of the upper file 701 * 702 * Calculate the required size of the lower file based on the --- 395 unchanged lines hidden (view full) --- 1098 rc = d_inode(lower_dentry)->i_op->removexattr(lower_dentry, name); 1099 mutex_unlock(&d_inode(lower_dentry)->i_mutex); 1100out: 1101 return rc; 1102} 1103 1104const struct inode_operations ecryptfs_symlink_iops = { 1105 .readlink = generic_readlink, |
1098 .follow_link = ecryptfs_follow_link, 1099 .put_link = kfree_put_link, | 1106 .get_link = ecryptfs_get_link, |
1100 .permission = ecryptfs_permission, 1101 .setattr = ecryptfs_setattr, 1102 .getattr = ecryptfs_getattr_link, 1103 .setxattr = ecryptfs_setxattr, 1104 .getxattr = ecryptfs_getxattr, 1105 .listxattr = ecryptfs_listxattr, 1106 .removexattr = ecryptfs_removexattr 1107}; --- 28 unchanged lines hidden --- | 1107 .permission = ecryptfs_permission, 1108 .setattr = ecryptfs_setattr, 1109 .getattr = ecryptfs_getattr_link, 1110 .setxattr = ecryptfs_setxattr, 1111 .getxattr = ecryptfs_getxattr, 1112 .listxattr = ecryptfs_listxattr, 1113 .removexattr = ecryptfs_removexattr 1114}; --- 28 unchanged lines hidden --- |