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