Thread (7 messages) 7 messages, 4 authors, 2017-10-27

Re: [RFC] xfs_repair: clear file / directory attribute on symlinks

From: "Luis R. Rodriguez" <mcgrof@kernel.org>
Date: 2017-10-27 19:56:23

On Fri, Oct 27, 2017 at 07:03:39PM +0200, Luis R. Rodriguez wrote:
quoted
quoted
	file = argv[2];

	fd = open(file, open_flags);
	if (!fd) {
		printf("Could not open file for operation: %s\n", cmd_str);
		usage();
	}
This open() will though.
That's because the special mushrooms I took the day I wrote the above
code made me forget to instead check for:

	if (fd < 0)

That will always fail.

So open() on a dangling symlink will fail as well.

So it seems we can't set these attributes via userspace, unless you
use xfs_db and as noted by Darrick that's not a valid use case, it'd
be fuzzing.

  Luis
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help