Re: EXT2_UNRM_FL

Alexander Viro (viro@math.psu.edu)
Thu, 4 Mar 1999 14:47:35 -0500 (EST)


On Thu, 4 Mar 1999, Tuomas Heino wrote:

> On Thu, 4 Mar 1999, Alexander Viro wrote:
>
> > On Thu, 4 Mar 1999, Tuomas Heino wrote:
> >
> > > ... now this raises another question to my mind:
> > > Would it be possible to create immutable symlinks in a clean way w/ ext2?
> >
> > Set *any* of the aforementioned attributes - symlink's, erm, contents
> > can't be changed, so any redirection is possible only via unlink()/symlink()
> > or rename()/symlink(). Any of IMMUTABLE/APPEND_ONLY/NO_UNLINK gives
> > protection against rename() and unlink(), i.e. on symlinks they are
> > equivalent.
>
> I guess we're not understanding each other properly... I meant to ask
> whether setting immutable/append_only/no_unlink on a symlink is possible?
> as in the current(?) chattr/lsattr follow symlinks...
> # ln -s foo bar
> # lsattr bar
> lsattr 1.10, 24-Apr-97 for EXT2 FS 0.5b, 95/08/09
> lsattr: No such file or directory While reading flags on bar
> ... and no I don't know where those flags are stored; do symlinks even have those flags?

Yes, they do. Flags are stored in inode, indeed. I see your point. Hmm...
OK, I'll look at it. Right now it's done via ioctl and ioctl follows
links. Ideally that should be done via *chmod, but we are tied by POSIX
(AFAICS)... Are there any plans to extend mode_t to 32 bits? Possibly with
new syscalls... Aieee... Too many of them. And assumption that
applications set the high 16 bits to 0 is not based on anything. OTOH if
we set high 16 bits of umask to 1 for anything not posessing appropriate
capability we might get out with it. Hmm...

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