Re: Your backup is unsafe!

Robert de Bath (rd103979@home-box.demon.co.uk)
Mon, 2 Aug 1999 18:53:20 +0100 (BST)


On Mon, 2 Aug 1999, Wakko Warner wrote:

> > > Even if you backup a vfat partition when under wingdoze, what's to say that
> > > restoring under wingdoze will produce the same short filenames? All of my
> > > experiences have been that it's always ~1. As far as I care, vfat sucks
> > > anyway.
>
> I've been damned to having to use it, just often enough.
<g>

> > Exactly. This is why I've changed my mind. In an effort to make it a little
> > less sucky all traces of the short names should be hidden from linux. It'll
>
> I hope not, I feel it's easier to type progra~1 than the entire thing (which
> I normally do when looking through things)
What about when it's progra~2 ?

> > then be sane if a little limited. You then have a couple of ioctls to read
> > and write the short names for programs that _must_ have them. (A shortname
> > write that would cause a collision will error)
>
> What would be funny if you really wanted to have an 8.3 file ending with ~1
> and another already exists <g>
This is quite likely if you're restoring short names where the long name
restore has generated the wrong shortnames.
This says nothing about access from standard UNIX commands, they would only
ever see or write long names, short names would be even more invisable than
inode numbers.

> > Hopefully this is what Alexander will do, I don't see and problem living
> > with a "sfn_backup". Or with an LD_PRELOAD you could simulate the brain
> > damage and/or uglyness of any of the other schemes suggested here. (Mine
> > included)
>
> Preload should be the way to go on this. What's 'sfn_backup'? I don't
> recall it.
Short File Name backup of course :-)

> > BY Alexander Viro <viro@math.psu.edu>
> > > Some @#$^ing programs apparently want to be able to access the files via
> > > short names.
>
> What about the user too lazy to type in all those blasted spaces? =)
The user uses wildcards like (s)he would on a real unix filesystem ...

$ cd Prog*

or even
$ cd P*

> > Then they use the ioctls.
> > In fact, Alexander, be nice to them, provide one that gives the long
> > name given the short name ... as well as vis-versa.
>
> Personally, I prefer it just the way it is, we really don't need to see the
> sfn anyway. But still I'd like to access it as I said above.
Use wildcards - or arn't you that lazy ? :-)

> > Remember they are already providing special code for VFAT partitons,
> > it shouldn't be too difficult to use a slightly more hidden (but still
> > documented) interface.
> >
> > Well Alexander, is that the decision ?
>
> As long as everyone can have it their way with mount options.. I understand
> that some people are too afraid of options <g>
The problem with mount options is they are just that, you have to remount
the filesystem to change them, and it might not be very easy at that moment.

The ioctls give you enough control so that a particular program can change
it's own view, or have it changed through a LD_PRELOAD shared library.

There is one more thing ... for consistancy it'd be reasonable for the ioctls
to work on an MSDOS filesystem too, to access the hidden long names.

-- 
Rob.                          (Robert de Bath <http://poboxes.com/rdebath>)
                    <rdebath @ poboxes.com> <http://www.cix.co.uk/~mayday>

- 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/