lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 30 May 2014 09:49:33 +0100
From:	David Howells <dhowells@...hat.com>
To:	"J. R. Okajima" <hooanon05g@...il.com>
Cc:	dhowells@...hat.com, Miklos Szeredi <miklos@...redi.hu>,
	viro@...IV.linux.org.uk, torvalds@...ux-foundation.org,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	hch@...radead.org, akpm@...ux-foundation.org, apw@...onical.com,
	nbd@...nwrt.org, neilb@...e.de, jordipujolp@...il.com,
	ezk@....cs.sunysb.edu, sedat.dilek@...il.com, mszeredi@...e.cz
Subject: Re: Unionmount and overlayfs testsuite

J. R. Okajima <hooanon05g@...il.com> wrote:

> I've found some interesting cases.
> 
> - impermissible.test,
> 	open_file_as_bin -t -w $file -E EACCES
>   When $termslash is "/", a '/' is appended to the expanded $file, such
>   as "/path/fileA/". If fileA is a regular file, that path is obviously
>   wrong. Does UnionMount expect EACCES in this case too?
>   Should it be ENOTDIR?
>   It might be better to change
> 	errcode=EACCES
> 	test ! "$termslash" = "" && errcode=ENOTDIR
> 	open_file_as_bin -t -w $file -E $errcode

I'd never got to the end of the impermissible test because the utimes test
fails on both unionmount and overlayfs.  I'll have to address the termslash
alterations at some point.

> - readlink.test,
> 	fs_op readlink $file -R $testdir/direct_dir_sym100 ${termslash:+-E EINVAL}
>   It expects "$testdir/direct_dir_sym100". Does it mean UnionMount
>   converts the target path?
>   For example,
>   - /u = /rw + /ro
>   - /rw/symlinkA doesn't exist
>   - /ro/symlinkA points to /ro/fileA

No.  Unionmount unions are constructed by mounting the lower layers all on the
same mountpoint and then mounting the union over them, also on the same
mountpoint.  So their paths are coincident.

>   Does readlink(2) return "/u/fileA" instead of /ro/fileA?"

No.

The test suite sets the lower symlink to point to the union path for its target.

[root@...romeda union-testsuite]# readlink /lower/a/indirect_dir_sym100 
/mnt/a/direct_dir_sym100

> And all tests should be done by a superuser?

Yes.  It also will test things like mknod at some point and runs things as
other users to test permissions.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ