]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/ecryptfs/main.c
CRED: Pass credentials through dentry_open()
[linux-2.6-omap-h63xx.git] / fs / ecryptfs / main.c
index 64d2ba980df43b28d646fb18efc9842e9b380488..fd630713c5c7be966bb3038904407804e9bde25e 100644 (file)
@@ -115,6 +115,7 @@ void __ecryptfs_printk(const char *fmt, ...)
  */
 int ecryptfs_init_persistent_file(struct dentry *ecryptfs_dentry)
 {
+       const struct cred *cred = current_cred();
        struct ecryptfs_inode_info *inode_info =
                ecryptfs_inode_to_private(ecryptfs_dentry->d_inode);
        int rc = 0;
@@ -127,7 +128,7 @@ int ecryptfs_init_persistent_file(struct dentry *ecryptfs_dentry)
 
                lower_dentry = ecryptfs_dentry_to_lower(ecryptfs_dentry);
                rc = ecryptfs_privileged_open(&inode_info->lower_file,
-                                                    lower_dentry, lower_mnt);
+                                             lower_dentry, lower_mnt, cred);
                if (rc || IS_ERR(inode_info->lower_file)) {
                        printk(KERN_ERR "Error opening lower persistent file "
                               "for lower_dentry [0x%p] and lower_mnt [0x%p]; "