Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 160065
Collapse All | Expand All

(-)a/fs/aufs/export.c (-1 / +1 lines)
Lines 353-359 static struct dentry *au_lkup_by_ino(struct path *path, ino_t ino) Link Here
353
	LKTRTrace("%.*s, i%lu\n", AuDLNPair(parent), (unsigned long )ino);
353
	LKTRTrace("%.*s, i%lu\n", AuDLNPair(parent), (unsigned long )ino);
354
354
355
	path_get(path);
355
	path_get(path);
356
	file = dentry_open(parent, path->mnt, au_dir_roflags);
356
	file = dentry_open(parent, path->mnt, au_dir_roflags, current_cred());
357
	dentry = (void *)file;
357
	dentry = (void *)file;
358
	if (IS_ERR(file))
358
	if (IS_ERR(file))
359
		goto out;
359
		goto out;
(-)a/fs/aufs/file.c (-1 / +2 lines)
Lines 99-105 struct file *au_h_open(struct dentry *dentry, aufs_bindex_t bindex, int flags, Link Here
99
	if (unlikely(file && au_test_nfs(h_dentry->d_sb)))
99
	if (unlikely(file && au_test_nfs(h_dentry->d_sb)))
100
		h_file = au_h_intent(dentry, bindex, file);
100
		h_file = au_h_intent(dentry, bindex, file);
101
	if (!h_file)
101
	if (!h_file)
102
		h_file = dentry_open(dget(h_dentry), mntget(br->br_mnt), flags);
102
		h_file = dentry_open(dget(h_dentry), mntget(br->br_mnt), flags,
103
				     current_cred());
103
104
104
	/*
105
	/*
105
	 * a dirty trick for handling FMODE_EXEC and deny_write_access().
106
	 * a dirty trick for handling FMODE_EXEC and deny_write_access().
(-)a/fs/aufs/inode.c (-1 / +1 lines)
Lines 404-410 int au_test_ro(struct super_block *sb, aufs_bindex_t bindex, Link Here
404
404
405
int au_test_h_perm(struct inode *h_inode, int mask, int dlgt)
405
int au_test_h_perm(struct inode *h_inode, int mask, int dlgt)
406
{
406
{
407
	if (!current->fsuid)
407
	if (!current_fsuid())
408
		return 0;
408
		return 0;
409
	/* todo: fake nameidata? */
409
	/* todo: fake nameidata? */
410
	return vfsub_permission(h_inode, mask, NULL, dlgt);
410
	return vfsub_permission(h_inode, mask, NULL, dlgt);
(-)a/fs/aufs/whout.c (-2 / +2 lines)
Lines 276-282 static int do_unlink_wh(struct au_hinode *hdir, struct inode *h_dir, Link Here
276
	 */
276
	 */
277
	vfsub_args_init(&vargs, &ign, dlgt,
277
	vfsub_args_init(&vargs, &ign, dlgt,
278
			(h_dir->i_mode & S_ISVTX)
278
			(h_dir->i_mode & S_ISVTX)
279
			&& wh_dentry->d_inode->i_uid != current->fsuid);
279
			&& wh_dentry->d_inode->i_uid != current_fsuid());
280
	vfsub_ign_hinode(&vargs, IN_DELETE, hdir);
280
	vfsub_ign_hinode(&vargs, IN_DELETE, hdir);
281
	err = vfsub_unlink(h_dir, wh_dentry, &vargs);
281
	err = vfsub_unlink(h_dir, wh_dentry, &vargs);
282
	AuTraceErr(err);
282
	AuTraceErr(err);
Lines 591-597 static void reinit_br_wh(void *arg) Link Here
591
	struct vfsub_args vargs;
591
	struct vfsub_args vargs;
592
592
593
	AuTraceEnter();
593
	AuTraceEnter();
594
	AuDebugOn(current->fsuid);
594
	AuDebugOn(current_fsuid());
595
595
596
	err = 0;
596
	err = 0;
597
	wbr = a->br->br_wbr;
597
	wbr = a->br->br_wbr;
(-)a/fs/aufs/xino.c (-1 / +2 lines)
Lines 623-629 struct file *au_xino_create2(struct super_block *sb, struct file *base_file, Link Here
623
		goto out_dput;
623
		goto out_dput;
624
	}
624
	}
625
	file = dentry_open(dget(dentry), mntget(base_file->f_vfsmnt),
625
	file = dentry_open(dget(dentry), mntget(base_file->f_vfsmnt),
626
			   O_RDWR | O_CREAT | O_EXCL | O_LARGEFILE);
626
			   O_RDWR | O_CREAT | O_EXCL | O_LARGEFILE,
627
			   current_cred());
627
	if (IS_ERR(file)) {
628
	if (IS_ERR(file)) {
628
		AuErr("%.*s open err %ld\n", AuLNPair(name), PTR_ERR(file));
629
		AuErr("%.*s open err %ld\n", AuLNPair(name), PTR_ERR(file));
629
		goto out_dput;
630
		goto out_dput;
(-)a/fs/aufs25/export.c (-1 / +1 lines)
Lines 353-359 static struct dentry *au_lkup_by_ino(struct path *path, ino_t ino) Link Here
353
	LKTRTrace("%.*s, i%lu\n", AuDLNPair(parent), (unsigned long )ino);
353
	LKTRTrace("%.*s, i%lu\n", AuDLNPair(parent), (unsigned long )ino);
354
354
355
	path_get(path);
355
	path_get(path);
356
	file = dentry_open(parent, path->mnt, au_dir_roflags);
356
	file = dentry_open(parent, path->mnt, au_dir_roflags, current_cred());
357
	dentry = (void *)file;
357
	dentry = (void *)file;
358
	if (IS_ERR(file))
358
	if (IS_ERR(file))
359
		goto out;
359
		goto out;
(-)a/fs/aufs25/file.c (-1 / +2 lines)
Lines 99-105 struct file *au_h_open(struct dentry *dentry, aufs_bindex_t bindex, int flags, Link Here
99
	if (unlikely(file && au_test_nfs(h_dentry->d_sb)))
99
	if (unlikely(file && au_test_nfs(h_dentry->d_sb)))
100
		h_file = au_h_intent(dentry, bindex, file);
100
		h_file = au_h_intent(dentry, bindex, file);
101
	if (!h_file)
101
	if (!h_file)
102
		h_file = dentry_open(dget(h_dentry), mntget(br->br_mnt), flags);
102
		h_file = dentry_open(dget(h_dentry), mntget(br->br_mnt), flags,
103
				     current_cred());
103
104
104
	/*
105
	/*
105
	 * a dirty trick for handling FMODE_EXEC and deny_write_access().
106
	 * a dirty trick for handling FMODE_EXEC and deny_write_access().
(-)a/fs/aufs25/inode.c (-1 / +1 lines)
Lines 404-410 int au_test_ro(struct super_block *sb, aufs_bindex_t bindex, Link Here
404
404
405
int au_test_h_perm(struct inode *h_inode, int mask, int dlgt)
405
int au_test_h_perm(struct inode *h_inode, int mask, int dlgt)
406
{
406
{
407
	if (!current->fsuid)
407
	if (!current_fsuid())
408
		return 0;
408
		return 0;
409
	/* todo: fake nameidata? */
409
	/* todo: fake nameidata? */
410
	return vfsub_permission(h_inode, mask, NULL, dlgt);
410
	return vfsub_permission(h_inode, mask, NULL, dlgt);
(-)a/fs/aufs25/whout.c (-2 / +2 lines)
Lines 276-282 static int do_unlink_wh(struct au_hinode *hdir, struct inode *h_dir, Link Here
276
	 */
276
	 */
277
	vfsub_args_init(&vargs, &ign, dlgt,
277
	vfsub_args_init(&vargs, &ign, dlgt,
278
			(h_dir->i_mode & S_ISVTX)
278
			(h_dir->i_mode & S_ISVTX)
279
			&& wh_dentry->d_inode->i_uid != current->fsuid);
279
			&& wh_dentry->d_inode->i_uid != current_fsuid());
280
	vfsub_ign_hinode(&vargs, IN_DELETE, hdir);
280
	vfsub_ign_hinode(&vargs, IN_DELETE, hdir);
281
	err = vfsub_unlink(h_dir, wh_dentry, &vargs);
281
	err = vfsub_unlink(h_dir, wh_dentry, &vargs);
282
	AuTraceErr(err);
282
	AuTraceErr(err);
Lines 591-597 static void reinit_br_wh(void *arg) Link Here
591
	struct vfsub_args vargs;
591
	struct vfsub_args vargs;
592
592
593
	AuTraceEnter();
593
	AuTraceEnter();
594
	AuDebugOn(current->fsuid);
594
	AuDebugOn(current_fsuid());
595
595
596
	err = 0;
596
	err = 0;
597
	wbr = a->br->br_wbr;
597
	wbr = a->br->br_wbr;
(-)a/fs/aufs25/xino.c (-1 / +2 lines)
Lines 623-629 struct file *au_xino_create2(struct super_block *sb, struct file *base_file, Link Here
623
		goto out_dput;
623
		goto out_dput;
624
	}
624
	}
625
	file = dentry_open(dget(dentry), mntget(base_file->f_vfsmnt),
625
	file = dentry_open(dget(dentry), mntget(base_file->f_vfsmnt),
626
			   O_RDWR | O_CREAT | O_EXCL | O_LARGEFILE);
626
			   O_RDWR | O_CREAT | O_EXCL | O_LARGEFILE,
627
			   current_cred());
627
	if (IS_ERR(file)) {
628
	if (IS_ERR(file)) {
628
		AuErr("%.*s open err %ld\n", AuLNPair(name), PTR_ERR(file));
629
		AuErr("%.*s open err %ld\n", AuLNPair(name), PTR_ERR(file));
629
		goto out_dput;
630
		goto out_dput;

Return to bug 160065