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  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:	Mon, 22 Oct 2007 01:27:47 -0400
From:	Theodore Tso <>
To:	Eric Sandeen <>
Cc:	ext4 development <>
Subject: Re: [PATCH e2fsprogs] return status from chattr

On Thu, Sep 20, 2007 at 12:57:14PM -0500, Eric Sandeen wrote:
> I changed this a bit so that if it's explicitly listed on the
> commandline, the link itself gets chattr'd.  I'm not quite sure 
> what is intended here; that the links are not *followed* or
> that they are not chattr'd?  Seems a little odd to me.

Both; you can't chattr a symlink.  You can try, but in fact what
happens is that you end up chattr'ing the destination of the link,
which is probably not what you want.

> I tried to follow the way other recursive commands work, for example
> chmod -R, and carry on in the face of any errors.  If any error
> was encountered, exit with an error.  If no errors, exit 0.

Yep, that makes sense.

> Also, if both flags and -v (version) are specified, and the flag 
> set encounters an error, the version set is not attempted.  Is this 
> ok or should both commands be tried?

I think an atomic failure makes the most amount of sense.

> Finally, I'm curious, the utility ignores anything that's not a link,
> regular file, or dir, but the kernel code doesn't have these checks.
> Should it?

For better or for worse, the ext2/3/4 flags are set via an ioctl.
This means it doesn't work for anything other than a regular file or a
directory.  For a symlink, it will fail, or follow the symlink.
There's a bug in libe2p which I'll fix which causes it to not return
EOPNOTSUPP for symlinks because it's using stat() when it should use

So we should be ignoring symbolic links, as well, since we can't
change them.

						- Ted
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists